C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Offset curve in three-dimensional space. More...

#include <cur_offset_curve3d.h>

+ Inheritance diagram for MbOffsetCurve3D:
+ Collaboration diagram for MbOffsetCurve3D:

Public Member Functions

 MbOffsetCurve3D (const MbCurve3D &baseCurve, const MbVector3D &offsetVector, bool sameCurve, bool ort, VERSION version=Math::DefaultMathVersion())
 Constructor.
More...
 
 MbOffsetCurve3D (const MbCurve3D &baseCurve, bool sameCurve, c3d::ConstSurfaceSPtr &surface, const MbVector3D &offsetVector, bool ort, VERSION version=Math::DefaultMathVersion())
 Constructor.
More...
 
void Init (double d1, double d2, MbeOffsetType t, double dt1, double dt2)
 Initialization by offset and increments of parameters.
More...
 
MbeSpaceType IsA () const override
 Get the type of the object.
 
MbSpaceItemDuplicate (MbRegDuplicate *=nullptr) const override
 Create a copy of the object. More...
 
bool IsSame (const MbSpaceItem &other, double accuracy=LENGTH_EPSILON) const override
 Determine whether an object is equal. More...
 
bool SetEqual (const MbSpaceItem &) override
 Make objects equal if they are similar. More...
 
bool IsSimilar (const MbSpaceItem &) const override
 Determine whether an object is similar. More...
 
void Transform (const MbMatrix3D &, MbRegTransform *ireg) override
 Convert the object according to the matrix. More...
 
void Move (const MbVector3D &, MbRegTransform *ireg) override
 Move an object along a vector. More...
 
void Rotate (const MbAxis3D &, double angle, MbRegTransform *ireg) override
 Rotate an object around an axis at a given angle. More...
 
void Refresh () override
 Translate all the time (mutable) data objects in an inconsistent (initial) state.
 
void PrepareIntegralData (const bool forced) const override
 Calculate temporary (mutable) data of an object. More...
 
void AddYourGabaritTo (MbCube &) const override
 Expand sent bounding box (a.k.a. gabarit), so that it included the object. More...
 
void GetProperties (MbProperties &) override
 Outstanding properties of the object. More...
 
void SetProperties (const MbProperties &) override
 Change the properties of an object. More...
 
void GetBasisItems (RPArray< MbSpaceItem > &) override
 Outstanding reference objects in a container sent.
 
void GetBasisPoints (MbControlData3D &) const override
 Get control points of object.
 
void SetBasisPoints (const MbControlData3D &) override
 Change the object by control points.
 
double GetTMin () const override
 Get the minimum value of parameter.
 
double GetTMax () const override
 Get the maximum value of parameter.
 
bool IsClosed () const override
 Define whether the curve is periodic. More...
 
double GetPeriod () const override
 Return period. If a curve is not periodic then 0.
 
void PointOn (double &t, MbCartPoint3D &p) const override
 Calculate a point on the curve. More...
 
void FirstDer (double &t, MbVector3D &fd) const override
 Calculate first derivative.
 
void SecondDer (double &t, MbVector3D &sd) const override
 Calculate second derivative.
 
void ThirdDer (double &t, MbVector3D &td) const override
 Calculate third derivative.
 
void Explore (double &t, bool ext, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec, MbVector3D *thir) const override
 Calculate point and derivatives of object for given parameter. More...
 
double Step (double t, double sag) const override
 Calculate parameter step. More...
 
double DeviationStep (double t, double angle) const override
 Calculate parameter step. More...
 
const MbCurve3DGetBasisCurve () const override
 Returns the base curve if exists or itself.
 
MbCurve3DSetBasisCurve () override
 Returns the base curve if exists or itself.
 
void Inverse (MbRegTransform *iReg=nullptr) override
 Change direction of a curve.
 
size_t GetCount () const override
 Define the number of splittings for one passage in operations.
 
void ChangeCarrier (const MbSpaceItem &item, MbSpaceItem &init) override
 Change the carrier. For surface curves.
 
bool IsStraight (bool ignoreParams=false) const override
 Whether the line is straight?
 
bool IsPlanar (double accuracy=METRIC_EPSILON) const override
 Is a curve planar?
 
bool GetPlacement (MbPlacement3D &place, PlanarCheckParams params=PlanarCheckParams()) const override
 Fill the placement if a curve is planar.
 
bool IsContinuousDerivative (bool &contLength, bool &contDirect, c3d::DoubleVector *params=nullptr, double epsilon=EPSILON) const override
 Have the first derivative of the curve the continuous length and direction? More...
 
bool SetContinuousDerivativeLength (VERSION version, double epsilon=EPSILON) override
 Eliminate the discontinuities of the first derivative at length. More...
 
const MbVector3DGetOffsetVector () const
 Offset in the start point.
 
void SetFactor (double d, size_t i)
 Set offset multiplier.
More...
 
void FindBreakParams (SArray< double > &breakParams) const
 Search of break points of the offset curve. More...
 
- Public Member Functions inherited from MbCurve3D
virtual ~MbCurve3D ()
 Destructor.
 
virtual void Accept (Visitor &visitor)
 Implementation of a function initializing a visit of an object.
 
virtual MbResultType Extend (const MbCurveExtensionParameters3D &parameters, c3d::SpaceCurveSPtr &resCurve) const
 Extend the curve. More...
 
size_t size () const
 Size of curve interpreted as vector of curves.
 
const MbCurve3Doperator[] (size_t) const
 An access operator.
 
MbeSpaceType Type () const override
 Get the group object type.
 
MbeSpaceType Family () const override
 Get family of objects.
 
virtual MbCurve3DInverseDuplicate () const
 Create a copy with changed direction.
 
double DistanceToPoint (const MbCartPoint3D &) const override
 Determine the distance to the point. More...
 
void AddYourGabaritTo (MbCube &) const override
 Expand sent bounding box (a.k.a. gabarit), so that it included the object. More...
 
void Refresh () override
 Translate all the time (mutable) data objects in an inconsistent (initial) state.
 
virtual bool IsSpaceSame (const MbSpaceItem &item, double eps=METRIC_REGION) const
 Are the objects identical in space?
 
virtual bool IsPeriodic () const
 Define whether the curve is periodic. More...
 
bool IsTouch (double eps=Math::metricPrecision) const
 Determine whether a curve is closed regardless of the smoothness of the closure. More...
 
virtual void Tangent (double &t, MbVector3D &) const
 Calculate tangent vector (normalized).
 
virtual void Normal (double &t, MbVector3D &) const
 Calculate main normal vector.
 
virtual void BNormal (double &t, MbVector3D &) const
 Calculate binormal vector.
 
virtual void _PointOn (double t, MbCartPoint3D &p) const
 Calculate point at curve and its extension. More...
 
virtual void _FirstDer (double t, MbVector3D &) const
 Calculate first derivative at curve and its extension.
 
virtual void _SecondDer (double t, MbVector3D &) const
 Calculate second derivative at curve and its extension.
 
virtual void _ThirdDer (double t, MbVector3D &) const
 Calculate third derivative at curve and its extension.
 
virtual void _Tangent (double t, MbVector3D &) const
 Calculate tangent vector (normalized) at curve and its extension.
 
virtual void _Normal (double t, MbVector3D &) const
 Calculate main normal vector (normalized) at curve and its extension.
 
virtual void _BNormal (double t, MbVector3D &) const
 Calculate binormal vector (normalized) at curve and its extension.
 
virtual void FastApproxExplore (double &t, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec) const
 Calculate point and derivatives on the curve. More...
 
virtual double MetricStep (double t, double length) const
 Calculate parameter step. More...
 
double CurveStep (const double &t, const MbStepData &stepData) const
 Calculate parameter step. More...
 
virtual void ResetTCalc () const
 Reset the current value of parameter.
 
virtual double Curvature (double t) const
 Calculate curvature of curve.
 
virtual void ThirdMetricDer (double t, MbVector3D &vect) const
 Calculate second derivative of tangent.
 
MbNurbs3DNurbsCurve (const MbCurveIntoNurbsInfo *nInfo=nullptr) const
 Construct a NURBS copy of a curve. More...
 
virtual MbNurbs3DNurbsCurve (const MbCurveIntoNurbsInfo &nInfo) const
 Construct a NURBS copy of a curve. More...
 
virtual MbCurve3DNurbsCurve (const MbNurbsParameters &tParameters) const
 Construct a NURBS copy of a curve. More...
 
virtual size_t NurbsCurveMinPoints (const MbNurbsParameters &tParameters, double epsilon=c3d::METRIC_DELTA) const
 Define the number of knots of a NURBS curve which is required to approximate the curve with the given tolerance. More...
 
virtual MbCurve3DTrimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const
 Construct a trimmed curve. More...
 
virtual MbCurve3DTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const
 Construct a trimmed curve with the given two-dimensional accuracy. More...
 
double GetParamLength () const
 Return the parametric length of a curve.
 
virtual double GetMetricLength () const
 Calculate the metric length of a curve.
 
virtual double CalculateMetricLength () const
 Calculate the metric length of a curve.
 
virtual double CalculateLength (double t1, double t2) const
 Calculate the metric length of a curve. More...
 
virtual bool DistanceAlong (double &t, double len, int curveDir, double eps=Math::metricPrecision, VERSION version=Math::DefaultMathVersion()) const
 Translate parameter along the curve. More...
 
virtual double GetLengthEvaluation () const
 Calculate the metric length of a curve. More...
 
virtual void CalculateGabarit (MbCube &cube) const
 Calculate bounding box of a curve.
 
void CalculateLocalGabarit (const MbMatrix3D &into, MbCube &cube) const override
 To compute bounding box in a local coordinate system. More...
 
virtual bool IsDegenerate (double eps=METRIC_PRECISION) const
 Check whether the curve is degenerated.calculate.
 
virtual bool IsSmoothConnected (double angleEps) const
 Are joints of contour/curve smooth?
 
virtual bool ChangeCarrierBorne (const MbSpaceItem &item, MbSpaceItem &init, const MbMatrix &matr)
 Change the carrier. More...
 
MbPropertyCreateProperty (MbePrompt name) const override
 Create your own property with the name.
 
void CalculateMesh (const MbStepData &stepData, const MbFormNote &note, MbMesh &mesh) const override
 Build polygonal copy mesh. More...
 
virtual void CalculatePolygon (const MbStepData &stepData, MbPolygon3D &polygon) const
 Calculate an array of points for drawing. More...
 
virtual void GetCentre (MbCartPoint3D &) const
 Give the curve center.
 
virtual void GetWeightCentre (MbCartPoint3D &) const
 Give the gravity center of a curve.
 
virtual MbeNewtonResult PointProjectionNewton (const MbCartPoint3D &p, size_t iterLimit, double &t, bool ext) const
 Find the point projection to the curve. More...
 
virtual bool NearPointProjection (const MbCartPoint3D &pnt, double &t, bool ext, MbRect1D *tRange=nullptr) const
 Find the point projection to the curve. More...
 
virtual MbeNewtonResult IsoclinalNewton (const MbVector3D &dir, size_t iterLimit, double &t) const
 Find isoclines of a curve. More...
 
virtual void GetIsoclinal (const MbVector3D &nor, SArray< double > &tIso) const
 Find all isoclines of a curve. More...
 
virtual double DistanceToCurve (const MbCurve3D &curve2, double &t1, double &t2) const
 Calculate the nearest distance to a curve.
 
virtual double DistanceToPlace (const MbPlacement3D &place, double &t0, double &angle) const
 The nearest point of a curve by the placement.
 
virtual double GetRadius (double accuracy=METRIC_REGION) const
 Get the physical radius of the curve or zero if it impossible. More...
 
virtual bool GetCircleAxis (MbAxis3D &axis) const
 Get an axis of a circle which is geometrically coincident to the given curve. More...
 
virtual MbCurveGetMap (const MbMatrix3D &into, MbRect1D *pRegion=nullptr, VERSION version=Math::DefaultMathVersion(), bool *coincParams=nullptr) const
 Construct a planar projection of a piece of a space curve. More...
 
virtual MbCurveGetMapPsp (const MbMatrix3D &into, double zNear, MbRect1D *pRegion=nullptr) const
 Construct a planar projection of a piece of a space curve. More...
 
virtual MbCurveGetProjection (const MbPlacement3D &place, VERSION version) const
 Construct a planar projection of a space curve to a plane. More...
 
void GetPointsByEvenParamDelta (size_t n, std::vector< MbCartPoint3D > &pnts) const
 Get n points of a curve with equal intervals by parameter.
 
void GetPointsByEvenParamDelta (size_t n, SArray< MbCartPoint3D > &pnts) const
 
virtual void GetPointsByEvenLengthDelta (size_t n, std::vector< MbCartPoint3D > &pnts) const
 Get n points of a curve with equal intervals by arc length.
 
void GetPointsByEvenLengthDelta (size_t n, SArray< MbCartPoint3D > &pnts) const
 
void GetBasisPoints (MbControlData3D &) const override
 Get control points of object.
 
void SetBasisPoints (const MbControlData3D &) override
 Change the object by control points.
 
bool IsSpaceNear (const MbCurve3D &curve, double eps, bool ext, double devSag=5.0 *Math::deviateSag) const
 Check whether the two curves are metrically close. More...
 
bool IsPointOn (const MbCartPoint3D &, double eps=METRIC_PRECISION) const
 Check whether a point is on a curve or not.
 
double GetTMid () const
 Return the middle of parametric range of a curve.
 
double GetTRange () const
 Return the parametric length of a curve.
 
MbCartPoint3D PointOn (double &t) const
 Calculate point on the curve.
 
MbVector3D FirstDer (double &t) const
 Calculate first derivative.
 
MbVector3D SecondDer (double &t) const
 Calculate second derivative.
 
MbVector3D ThirdDer (double &t) const
 Calculate third derivative.
 
virtual void GetCurvatureSpecialPoints (std::vector< c3d::DoublePair > &points) const
 Find all the special points of the curvature function of the curve. More...
 
virtual void GetAnalyticalFunctionsBounds (std::vector< double > &params) const
 Get the boundaries of the curve sections that are described by one analytical function. More...
 
virtual void BreakPoints (std::vector< double > &vBreaks, double precision=ANGLE_REGION) const
 \ ru Определение точек излома кривой. The determination of curve smoothness break points.
 
MbCartPoint3D GetLimitPoint (ptrdiff_t number) const
 Calculate the boundary point. More...
 
void GetLimitPoint (ptrdiff_t number, MbCartPoint3D &pnt) const
 Calculate the boundary point. More...
 
MbVector3D GetLimitTangent (ptrdiff_t number) const
 Calculate a tangent vector to the boundary point. More...
 
void GetLimitTangent (ptrdiff_t number, MbVector3D &v) const
 Calculate a tangent vector to the boundary point. More...
 
bool AreLimitPointsEqual () const
 Are boundary points equal? More...
 
bool SetInParamRegion (double &t) const
 Move to the parametric region.
 
bool IsParamOn (double t, double eps) const
 Check whether a parameter is in the range of the curve.
 
bool IsInverseSame (const MbCurve3D &curve, double accuracy=LENGTH_EPSILON) const
 Whether an inversed curve is the same.
 
virtual bool IsReparamSame (const MbCurve3D &curve, double &factor) const
 Define whether a reparameterized curve is the same. More...
 
virtual double GetParamToUnit () const
 Get increment of parameter, corresponding to the unit length in space.
 
virtual double GetParamToUnit (double t) const
 Get increment of parameter, corresponding to the unit length in space.
 
double GetTEpsilon () const
 Get the minimum distinguishable value of parameter.
 
double GetTEpsilon (double t) const
 Get the minimum distinguishable value of parameter.
 
double GetTRegion () const
 Get the minimum distinguishable value of parameter.
 
double GetTRegion (double t) const
 Get the minimum distinguishable value of parameter.
 
double GetTRegion (double t, const MbDimAccuracy &xyzEps) const
 Get the minimum distinguishable value of parameter with the given three-dimensional accuracy according to parameter.
 
virtual const MbCurve3DGetSubstrate () const
 Get a substrate or itself.
 
virtual MbCurve3DSetSubstrate ()
 Get a substrate or itself.
 
virtual int SubstrateCurveDirection () const
 Direction of a substrate relative to a curve or vice versa.
 
virtual void SubstrateToCurve (double &) const
 Transform a substrate parameter to the curve parameter.
 
virtual void CurveToSubstrate (double &) const
 Transform a curve parameter to the substrate parameter.
 
virtual bool GetPlaneCurve (MbCurve *&curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const
 Get planar curve and placement if the space curve is planar. More...
 
bool GetPlaneCurve (SPtr< MbCurve > &curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const
 Get planar curve and placement if the space curve is planar. More...
 
bool GetPlaneCurve (SPtr< const MbCurve > &curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const
 Get planar curve and placement if the space curve is planar. More...
 
virtual bool GetSurfaceCurve (MbCurve *&curve2d, MbSurface *&surface, VERSION version=Math::DefaultMathVersion()) const
 Get surface curve if the space curve is surface (after the using call DeleteItem for arguments)
 
bool GetSurfaceCurve (SPtr< MbCurve > &curve2d, SPtr< MbSurface > &surface, VERSION version=Math::DefaultMathVersion()) const
 Get surface curve if the space curve is surface (after the using call DeleteItem for arguments)
 
bool GetSurfaceCurve (SPtr< const MbCurve > &curve2d, SPtr< const MbSurface > &surface, VERSION version=Math::DefaultMathVersion()) const
 Get surface curve if the space curve is surface (after the using call DeleteItem for arguments)
 
virtual bool IsShift (const MbSpaceItem &, MbVector3D &, bool &isSame, double accuracy=LENGTH_EPSILON) const
 Is the object is a shift?
 
virtual bool IsSimilarToCurve (const MbCurve3D &other, double precision=METRIC_PRECISION) const
 Whether the curves to union (joining) are similar.
 
void CalculateGrid (double radius, const MbStepData &stepData, MbMesh &mesh) const
 Approximation of a curve by the flat tube with the given radius.
 
SimpleName GetCurveName () const
 A curve name.
 
void SetCurveName (SimpleName newName)
 Set a curve name.
 
- Public Member Functions inherited from MbSpaceItem
virtual ~MbSpaceItem ()
 Destructor.
 
void PrepareWrite () const
 Register object. More...
 
MbeRefType RefType () const override
 Get a registration type (for copying, duplication).
 
bool IsFamilyRegistrable () const override
 Whether the object belongs to a registrable family.
 
void CalculateWire (const MbStepData &stepData, MbMesh &mesh) const
 
void CalculateWire (double sag, MbMesh &mesh) const
 
- Public Member Functions inherited from TapeBase
 TapeBase (RegistrableRec regs=noRegistrable)
 Constructor.
 
 TapeBase (const TapeBase &)
 Copy-constructor.
 
virtual ~TapeBase ()
 Destructor.
 
RegistrableRec GetRegistrable () const
 Whether the stream class is registrable.
 
void SetRegistrable (RegistrableRec regs=registrable) const
 Set the state of registration of the stream class.
 
virtual const char * GetPureName (const VersionContainer &) const
 Get the class name.
 
- Public Member Functions inherited from MbRefItem
refcount_t GetUseCount () const
 Get count of references (get count of owners of an object).
 
refcount_t AddRef () const
 Increase count of references by one.
 
refcount_t DecRef () const
 Decrease count of references by one.
 
refcount_t Release () const
 Decrease count of references by one and if count of references became zero, then remove itself.
 
- Public Member Functions inherited from MbNestSyncItem
void Lock () const
 Switch lock on (locking happens only in parallel region).
 
void Unlock () const
 Switch lock off if locking has been set.
 
CommonRecursiveMutexGetLock () const
 Get a pointer to the mutex object. Return nullptr if no parallelism. For use in ScopedLock.
 

Protected Attributes

MbSpinebasisCurve
 The base curve.
 
double tmin
 Start parameter of basisCurve.
 
double tmax
 End parameter of basisCurve.
 
bool closed
 Closedness of basisCurve.
 
MbVector3D offset
 Offset in start point.
 
double factorTmin
 The offset multiplier in point tmin of base curve.
 
double factorTmax
 The offset multiplier in point tmax of base curve.
 
MbeOffsetType type
 The type of offset: constant, or linear, or cubic.
 
double deltaTmin
 Increase of tmin of base curve parameter.
 
double deltaTmax
 Increase of tmax of base curve parameter.
 
MbCube cube
 Bounding box.
 
- Protected Attributes inherited from MbCurve3D
SimpleName name
 A curve name. The object data is temporary and used internally.
 

Additional Inherited Members

- Protected Member Functions inherited from MbCurve3D
 MbCurve3D ()
 Default constructor.
 
 MbCurve3D (const MbCurve3D &other)
 Copy-constructor.
 
- Protected Member Functions inherited from MbSpaceItem
 MbSpaceItem ()
 Default constructor.
 
- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 

Detailed Description

Offset curve in three-dimensional space.

Offset curve is constructed by shifting points of the base curve along some vector, direction of which can be changed along the curve.
Vector "offset" sets the offset of start point of the base curve. While moving along a curve the vector "offset" keeps the position in the moving local coordinate system, origin coincides with the current point of the base curve. One of the axes of the moving local coordinate system is always the same as the tangent of the base curve, and the other two axes are orthogonal to it. Base curve for offset curve can not be other offset curve. In this situation it changes to the initial base curve.

Constructor & Destructor Documentation

◆ MbOffsetCurve3D() [1/2]

MbOffsetCurve3D::MbOffsetCurve3D ( const MbCurve3D baseCurve,
const MbVector3D offsetVector,
bool  sameCurve,
bool  ort,
VERSION  version = Math::DefaultMathVersion() 
)

Constructor.

Constructor by a curve and offset vector in start point.

Parameters
[in]baseCurve- The base curve.
[in]offsetVector- Offset in start point.
[in]sameCurve- Use same curve (true) or copy (false).
[in]ort- Ortogonalize offset vector (true) or same vector (false).
[in]version- The version.

◆ MbOffsetCurve3D() [2/2]

MbOffsetCurve3D::MbOffsetCurve3D ( const MbCurve3D baseCurve,
bool  sameCurve,
c3d::ConstSurfaceSPtr surface,
const MbVector3D offsetVector,
bool  ort,
VERSION  version = Math::DefaultMathVersion() 
)

Constructor.

Constructor by a surface curve and offset vector in start point.
If the curve is not a curve on surface, it will be initialized without using the surface.
A surface in arguments is needed to select the desired surface if the curve is a curve of intersection of two different surfaces.

Parameters
[in]baseCurve- The base curve.
[in]sameCurve- Use same curve (true) or copy (false).
[in]surface- Curve surface or surface similar to curve surface.
[in]offsetVector- Offset in start point.
[in]ort- Ortogonalize offset vector (true) or same vector (false).
[in]version- The version.

Member Function Documentation

◆ Init()

void MbOffsetCurve3D::Init ( double  d1,
double  d2,
MbeOffsetType  t,
double  dt1,
double  dt2 
)

Initialization by offset and increments of parameters.

The offset displacement is defined in the begin and the end of the parametric region of the base curve and can be changed by constant, linear and cubic laws.

Increment of parameters needs to be used for change of curve domain relative to base curve.

Parameters
[in]d1- Offset distance on point Tmin of base curve.
[in]d2- Offset distance on point Tmax of base curve.
[in]t- The offset type: constant, or linear, or cubic.
[in]dt1- The change of tmin parameter
[in]dt2- The change of tmax parameter

◆ Duplicate()

MbSpaceItem& MbOffsetCurve3D::Duplicate ( MbRegDuplicate iReg = nullptr) const
overridevirtual

Create a copy of the object.

Create a copy of an object using the registrator. Registrator is used to prevent multiple copy of the object. If the object contains references to the other objects, then nested objects are copied as well. It is allowed not to pass registrator into the function. Then new copy of object will be created. While copying of single object or set of not connected objects, it is allowed not to use registrator. Registrator should be used if it is required to copy several connected objects. It is possible, that objects connection is based on the references to common objects. Then, while copying without using of registrator, it is possible to obtain set of copies, that contain references to the different copies of the same nested object, that leads to loss of connection between copies.

Parameters
[in]iReg- Registrator.
Returns
A copy of the object.

Implements MbSpaceItem.

◆ IsSame()

bool MbOffsetCurve3D::IsSame ( const MbSpaceItem other,
double  accuracy = LENGTH_EPSILON 
) const
overridevirtual

Determine whether an object is equal.

Still considered objects of the same type, all data is the same (equal).

Parameters
[in]item- The object to compare.
[in]accuracy- The accuracy to compare.
Returns
Whether the objects are equal.

Implements MbSpaceItem.

◆ SetEqual()

bool MbOffsetCurve3D::SetEqual ( const MbSpaceItem item)
overridevirtual

Make objects equal if they are similar.

You can still make only a similar objects.

Parameters
[in]item- The object to initialize.
Returns
Object is changed.

Implements MbSpaceItem.

◆ IsSimilar()

bool MbOffsetCurve3D::IsSimilar ( const MbSpaceItem item) const
overridevirtual

Determine whether an object is similar.

Such are considered the same objects whose data are similar.

Parameters
[in]item- The object to compare.
Returns
Whether the objects are similar.

Reimplemented from MbSpaceItem.

◆ Transform()

void MbOffsetCurve3D::Transform ( const MbMatrix3D matr,
MbRegTransform iReg 
)
overridevirtual

Convert the object according to the matrix.

Convert the original object according to the matrix using the registrator. If object contains references to the other geometric objects, then nested objects are transformed according to the matrix. Registrator is needed to prevent multiple object copying. It is allowed to use function without registrator, if it is needed to transform single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be transformed.

Parameters
[in]matr- Transformation matrix.
[in]iReg- Registrator.

Implements MbSpaceItem.

◆ Move()

void MbOffsetCurve3D::Move ( const MbVector3D to,
MbRegTransform iReg 
)
overridevirtual

Move an object along a vector.

Move an object along a geometric vector using the registrator. If object contains references to the other geometric objects then the move operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be moved.

Parameters
[in]to- Shift vector.
[in]iReg- Registrator.

Implements MbSpaceItem.

◆ Rotate()

void MbOffsetCurve3D::Rotate ( const MbAxis3D axis,
double  angle,
MbRegTransform iReg 
)
overridevirtual

Rotate an object around an axis at a given angle.

Rotate an object around an axis at a given angle with the registrator. If object contains references to the other geometric objects then the rotation operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be rotated.

Parameters
[in]axis- The axis of rotation.
[in]angle- Rotation.
[in]iReg- Registrator.

Implements MbSpaceItem.

◆ PrepareIntegralData()

void MbOffsetCurve3D::PrepareIntegralData ( const bool  forced) const
overridevirtual

Calculate temporary (mutable) data of an object.

Calculate the temporary data of an object depending of the "forced" parameter. Calculate only data that was not calculated earlier if parameter "forced" is equal false. Recalculate all temporary data of an object if parameter "forced" is equal true.

Parameters
[in]forced- Forced recalculation.

Reimplemented from MbCurve3D.

◆ AddYourGabaritTo()

void MbOffsetCurve3D::AddYourGabaritTo ( MbCube cube) const
overridevirtual

Expand sent bounding box (a.k.a. gabarit), so that it included the object.

Expand sent bounding box, so that it included the object.

Parameters
[in,out]cube- The bounding box to expand.

Implements MbSpaceItem.

◆ GetProperties()

void MbOffsetCurve3D::GetProperties ( MbProperties properties)
overridevirtual

Outstanding properties of the object.

Issue internal data (properties) of the object for viewing and modification.

Parameters
[in]properties- Container for the internal data of the object.

Implements MbSpaceItem.

◆ SetProperties()

void MbOffsetCurve3D::SetProperties ( const MbProperties properties)
overridevirtual

Change the properties of an object.

Changing the internal data (properties) of the object you are copying the corresponding values from the sent object.

Parameters
[in]properties- Container for the internal data of the object.

Implements MbSpaceItem.

◆ IsClosed()

bool MbOffsetCurve3D::IsClosed ( ) const
overridevirtual

Define whether the curve is periodic.

Define whether the curve is periodic.
A periodic curve is closed. A curve is considered as periodic if:

  • start point is coincident with end point;
  • derivatives in start point and end point coincide;
    if there are breaks at curve (in cases when a curve is contour or polyline), then derivatives may not coincide; in Bezier curve derivatives should coincide by direction, but they may differ by absolute value.
    Curves:
  • MbLine3D,
  • MbLineSegment3D,
  • MbSpiral and inherited classes,
  • MbBridgeCurve3D,
  • MbContour3D (if it contains only a single segment of one of the listed types)
    are not considered periodic when the start and end points coincide. The IsClosed() method always returns false for them.
    Returns
    True if a curve is closed.

Implements MbCurve3D.

◆ PointOn()

void MbOffsetCurve3D::PointOn ( double &  t,
MbCartPoint3D p 
) const
overridevirtual

Calculate a point on the curve.

Correct parameter when getting out of domain bounds and calculate a point on the curve.

Parameters
[in]t- Curve parameter.
[out]p- A point on the curve.

Implements MbCurve3D.

◆ Explore()

void MbOffsetCurve3D::Explore ( double &  t,
bool  ext,
MbCartPoint3D pnt,
MbVector3D fir,
MbVector3D sec,
MbVector3D thir 
) const
overridevirtual

Calculate point and derivatives of object for given parameter.

Values of point and derivatives are calculated on parameter area and on extended curve.

Parameters
[in]t- Parameter.
[in]ext- On parameters area (false), on extended curve (true).
[out]pnt- Point.
[out]fir- Derivative with respect to t.
[out]sec- Second derivative with respect to t, if not nullptr.
[out]thir- Third derivative with respect to t, if not nullptr.

Reimplemented from MbCurve3D.

◆ Step()

double MbOffsetCurve3D::Step ( double  t,
double  sag 
) const
overridevirtual

Calculate parameter step.

Calculate parameter step for the curve's approximation by its sag value. Calculation of the step is performed with consideration of curvature radius. A step of curve's approximation is chosen in such way, that the deviation from its polygon does not exceed the given value of sag.

Parameters
[in]t- A parameter defining the point on a curve, at which a step should be calculated.
[in]sag- Maximum feasible sag value.
Returns
A sag value by parameter at given point.

Reimplemented from MbCurve3D.

◆ DeviationStep()

double MbOffsetCurve3D::DeviationStep ( double  t,
double  ang 
) const
overridevirtual

Calculate parameter step.

Calculate parameter step for the curve's approximation by the deviation angle of the tangent vector. A step of curve's approximation is chosen in such way, that angular deviation of the tangent curve at the next point does not exceed the given value ang.

Parameters
[in]t- A parameter defining the point on a curve, at which a step should be calculated.
[in]ang- The maximum feasible deviation angle of tangent.
Returns
A sag value by parameter at given point.

Reimplemented from MbCurve3D.

◆ IsContinuousDerivative()

bool MbOffsetCurve3D::IsContinuousDerivative ( bool &  contLength,
bool &  contDirect,
c3d::DoubleVector params = nullptr,
double  epsilon = EPSILON 
) const
overridevirtual

Have the first derivative of the curve the continuous length and direction?

Are absent any discontinuities at length or at direction of first derivative of the curve?

Parameters
[out]contLength- The length is continuous (true/false).
[out]contDirect- The direction of the first derivative is continuous (true/false).
[in]epsilon- The accuracy of the calculation.

Reimplemented from MbCurve3D.

◆ SetContinuousDerivativeLength()

bool MbOffsetCurve3D::SetContinuousDerivativeLength ( VERSION  version,
double  epsilon = EPSILON 
)
overridevirtual

Eliminate the discontinuities of the first derivative at length.

Eliminate the discontinuities of the first derivatives of the length.

Parameters
[in]epsilon- The accuracy of the calculation.
[in]version- Math version.

Reimplemented from MbCurve3D.

◆ SetFactor()

void MbOffsetCurve3D::SetFactor ( double  d,
size_t  i 
)

Set offset multiplier.

Parameters
[in]d- New offset multiplier.

◆ FindBreakParams()

void MbOffsetCurve3D::FindBreakParams ( SArray< double > &  breakParams) const

Search of break points of the offset curve.

To find the break points using the characteristic function Ratio(), which represents a difference between the analytical and numerical calculated derivative divided by module of analytical derivative and step used for numerical calculation of the derivative. Increase of this function on the order in comparison with its value in smooth region is a break point.

Parameters
[out]breakParams- Parameter array of break points

The documentation for this class was generated from the following file: