C3D Toolkit  Kernel - 110464, Vision - 2.5.0.35

Curve in three-dimensional space. More...

#include <curve3d.h>

+ Inheritance diagram for MbCurve3D:
+ Collaboration diagram for MbCurve3D:

Public Member Functions

virtual ~MbCurve3D ()
 Destructor.
 
 VISITING_CLASS (MbCurve3D)
 Implementation of a function initializing a visit of an object.
 
size_t size () const
 Size of curve interpreted as vector of curves.
 
const MbCurve3Doperator[] (size_t) const
 An access operator.
 
Common functions of a geometric object.
virtual MbeSpaceType IsA () const =0
 Get the type of the object.
 
virtual MbeSpaceType Type () const
 Get the group object type.
 
virtual MbeSpaceType Family () const
 Get family of objects.
 
virtual MbSpaceItemDuplicate (MbRegDuplicate *=NULL) const =0
 Create a copy of the object. More...
 
virtual MbCurve3DInverseDuplicate () const
 Create a copy with changed direction.
 
virtual bool IsSame (const MbSpaceItem &other, double accuracy=LENGTH_EPSILON) const =0
 Determine whether an object is equal. More...
 
virtual bool SetEqual (const MbSpaceItem &)=0
 Make objects equal if they are similar. More...
 
virtual void Transform (const MbMatrix3D &, MbRegTransform *=NULL)=0
 Convert the object according to the matrix. More...
 
virtual void Move (const MbVector3D &, MbRegTransform *=NULL)=0
 Move an object along a vector. More...
 
virtual void Rotate (const MbAxis3D &, double angle, MbRegTransform *=NULL)=0
 Rotate an object around an axis at a given angle. More...
 
virtual double DistanceToPoint (const MbCartPoint3D &) const
 Determine the distance to the point. More...
 
virtual void AddYourGabaritTo (MbCube &) const
 Expand sent bounding box (a.k.a. gabarit), so that it included the object. More...
 
virtual void Refresh ()
 Translate all the time (mutable) data objects in an inconsistent (initial) state.
 
virtual void PrepareIntegralData (const bool forced) const
 Calculate temporary (mutable) data of an object. More...
 
virtual bool IsSpaceSame (const MbSpaceItem &item, double eps=METRIC_REGION) const
 Are the objects identical in space?
 
Functions for curve domain description
virtual double GetTMax () const =0
 Get the maximum value of parameter.
 
virtual double GetTMin () const =0
 Get the minimum value of parameter.
 
virtual bool IsClosed () const =0
 Define whether the curve is closed. More...
 
virtual double GetPeriod () const
 Return period. If a curve is not periodic then 0.
 
virtual bool IsPeriodic () const
 Define whether the curve is periodic.
 
bool IsTouch (double eps=Math::metricPrecision) const
 Determine whether a curve is closed regardless of the smoothness of the closure. More...
 
Functions for working in the curve's domain.\n

functions PointOn, FirstDer, SecondDer, ThirdDer,... correct parameter when it is out of domain bounds. The exception is MbLine3D (line).

virtual void PointOn (double &t, MbCartPoint3D &p) const =0
 Calculate a point on the curve. More...
 
virtual void FirstDer (double &t, MbVector3D &) const =0
 Calculate first derivative.
 
virtual void SecondDer (double &t, MbVector3D &) const =0
 Calculate second derivative.
 
virtual void ThirdDer (double &t, MbVector3D &) const =0
 Calculate third derivative.
 
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.
 
Functions for working inside and outside the curve's domain\n

functions _PointOn, _FirstDer, _SecondDer, _ThirdDer,... do not correct parameter when it is out of domain bounds.

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 Explore (double &t, bool ext, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec, MbVector3D *thir) const
 Calculate point and derivatives of object for given parameter. More...
 
virtual void FastApproxExplore (double &t, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec) const
 Calculate point and derivatives on the curve. More...
 
Function of moving by curve
virtual double Step (double t, double sag) const
 Calculate parameter step. More...
 
virtual double DeviationStep (double t, double ang) const
 Calculate parameter step. 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...
 
Common function of curve.
virtual void ResetTCalc () const
 Reset the current value of parameter.
 
virtual void Inverse (MbRegTransform *iReg=NULL)=0
 Change direction of a curve.
 
virtual const MbCurve3DGetBasisCurve () const
 Returns the base curve if exists or itself.
 
virtual MbCurve3DSetBasisCurve ()
 Returns the base curve if exists or itself.
 
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=NULL) 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) const
 Construct a trimmed curve. 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.
 
virtual void CalculateLocalGabarit (const MbMatrix3D &into, MbCube &cube) const
 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 IsStraight () const
 Whether the line is straight?
 
virtual bool IsPlanar () const
 Is a curve planar?
 
virtual bool IsSmoothConnected (double angleEps) const
 Are joints of contour/curve smooth?
 
virtual void ChangeCarrier (const MbSpaceItem &item, MbSpaceItem &init)
 Change the carrier. For surface curves.
 
virtual bool ChangeCarrierBorne (const MbSpaceItem &item, MbSpaceItem &init, const MbMatrix &matr)
 Change the carrier. More...
 
virtual MbPropertyCreateProperty (MbePrompt name) const
 Create your own property with the name.
 
virtual void GetProperties (MbProperties &properties)=0
 Outstanding properties of the object. More...
 
virtual void SetProperties (const MbProperties &properties)=0
 Change the properties of an object. More...
 
virtual void CalculateMesh (const MbStepData &stepData, const MbFormNote &note, MbMesh &mesh) const
 Build polygonal copy mesh. More...
 
virtual void CalculatePolygon (const MbStepData &stepData, MbPolygon3D &poligon) const
 Calculate an array of points for drawing. More...
 
void CalculatePolygon (double sag, MbPolygon3D &poligon) const
 
virtual void GetCentre (MbCartPoint3D &c) const
 Give the curve center.
 
virtual void GetWeightCentre (MbCartPoint3D &wc) 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=NULL) 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 () const
 Get the physical radius of the curve or null 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=NULL, VERSION version=Math::DefaultMathVersion(), bool *coincParams=NULL) const
 Construct a planar projection of a piece of a space curve. More...
 
virtual MbCurveGetMapPsp (const MbMatrix3D &into, double zNear, MbRect1D *pRegion=NULL) 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...
 
virtual size_t GetCount () const
 Define the number of splittings for one passage in operations.
 
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
 
virtual void GetBasisPoints (MbControlData3D &) const
 Get control points of object.
 
virtual void SetBasisPoints (const MbControlData3D &)
 Change the object by control points.
 
virtual bool IsContinuousDerivative (bool &contLength, bool &contDirect, c3d::DoubleVector *params=NULL, double epsilon=EPSILON) const
 Have the first derivative of the curve the continuous length and direction? More...
 
virtual bool SetContinuousDerivativeLength (VERSION version, double epsilon=EPSILON)
 Eliminate the discontinuities of the first derivative at length. More...
 
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 GetCurvatureContinuityBounds (std::vector< double > &params) const
 Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. More...
 
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.
 
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, VERSION version=Math::DefaultMathVersion()) const
 Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves)
 
bool GetPlaneCurve (SPtr< MbCurve > &curve2d, MbPlacement3D &place, bool saveParams, VERSION version=Math::DefaultMathVersion()) const
 Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves)
 
bool GetPlaneCurve (SPtr< const MbCurve > &curve2d, MbPlacement3D &place, bool saveParams, VERSION version=Math::DefaultMathVersion()) const
 Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves)
 
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 GetPlacement (MbPlacement3D &place, VERSION version=Math::DefaultMathVersion()) const
 Fill the placement if a curve is planar.
 
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...
 
virtual MbeRefType RefType () const
 Get a registration type (for copying, duplication).
 
virtual bool IsFamilyRegistrable () const
 Whether the object belongs to a registrable family.
 
virtual bool IsSimilar (const MbSpaceItem &item) const
 Determine whether an object is similar. More...
 
void CalculateWire (const MbStepData &stepData, MbMesh &mesh) const
 
void CalculateWire (double sag, MbMesh &mesh) const
 
virtual void GetBasisItems (RPArray< MbSpaceItem > &)
 Outstanding reference objects in a container sent.
 
- 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
 MbRefItem ()
 Constructor without parameters.
 
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 NULL if no parallelism. For use in ScopedLock.
 

Protected Member Functions

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

Protected Attributes

SimpleName name
 A curve name.
 

Detailed Description

Curve in three-dimensional space.

A curve in space is a vector function of a scalar parameter, which is set on a finite one-dimensional space. Coordinates of the point are single-valued continuous functions of curve parameter. A curve is continuous mapping from a piece of numeric axis to the three-dimensional space.
Curves are used to construct surfaces.

Member Function Documentation

◆ Duplicate()

virtual MbSpaceItem& MbCurve3D::Duplicate ( MbRegDuplicate iReg = NULL) const
pure virtual

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.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbConeSpiral, MbSurfaceCurve, MbBezier3D, MbOffsetCurve3D, MbContourOnSurface, MbPolyline3D, MbSpiral, MbContour3D, MbSilhouetteCurve, MbCurveSpiral, MbCrookedSpiral, MbCharacterCurve3D, MbReparamCurve3D, MbBridgeCurve3D, MbLineSegment3D, MbContourOnPlane, MbTrimmedCurve3D, MbBSpline, MbLine3D, MbPlaneCurve, and MbPolyCurve3D.

◆ IsSame()

virtual bool MbCurve3D::IsSame ( const MbSpaceItem other,
double  accuracy = LENGTH_EPSILON 
) const
pure virtual

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.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbConeSpiral, MbSurfaceCurve, MbBezier3D, MbOffsetCurve3D, MbContourOnSurface, MbPolyline3D, MbSpiral, MbContour3D, MbSilhouetteCurve, MbCurveSpiral, MbCrookedSpiral, MbCharacterCurve3D, MbReparamCurve3D, MbBridgeCurve3D, MbContourOnPlane, MbLineSegment3D, MbTrimmedCurve3D, MbBSpline, MbLine3D, MbPlaneCurve, and MbPolyCurve3D.

◆ SetEqual()

virtual bool MbCurve3D::SetEqual ( const MbSpaceItem item)
pure virtual

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.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbSurfaceCurve, MbBezier3D, MbOffsetCurve3D, MbContourOnSurface, MbPolyline3D, MbSpiral, MbContour3D, MbSilhouetteCurve, MbCurveSpiral, MbCrookedSpiral, MbCharacterCurve3D, MbReparamCurve3D, MbBridgeCurve3D, MbLineSegment3D, MbTrimmedCurve3D, MbBSpline, MbLine3D, MbPlaneCurve, and MbPolyCurve3D.

◆ Transform()

virtual void MbCurve3D::Transform ( const MbMatrix3D matr,
MbRegTransform iReg = NULL 
)
pure virtual

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.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbSurfaceCurve, MbBezier3D, MbOffsetCurve3D, MbContourOnSurface, MbPolyline3D, MbSpiral, MbContour3D, MbSilhouetteCurve, MbCharacterCurve3D, MbReparamCurve3D, MbBridgeCurve3D, MbLineSegment3D, MbTrimmedCurve3D, MbBSpline, MbLine3D, MbPlaneCurve, and MbPolyCurve3D.

◆ Move()

virtual void MbCurve3D::Move ( const MbVector3D to,
MbRegTransform iReg = NULL 
)
pure virtual

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.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbSurfaceCurve, MbBezier3D, MbOffsetCurve3D, MbContourOnSurface, MbPolyline3D, MbSpiral, MbContour3D, MbSilhouetteCurve, MbCharacterCurve3D, MbReparamCurve3D, MbBridgeCurve3D, MbLineSegment3D, MbTrimmedCurve3D, MbBSpline, MbLine3D, MbPlaneCurve, and MbPolyCurve3D.

◆ Rotate()

virtual void MbCurve3D::Rotate ( const MbAxis3D axis,
double  angle,
MbRegTransform iReg = NULL 
)
pure virtual

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.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbSurfaceCurve, MbBezier3D, MbOffsetCurve3D, MbContourOnSurface, MbPolyline3D, MbSpiral, MbContour3D, MbSilhouetteCurve, MbCharacterCurve3D, MbReparamCurve3D, MbBridgeCurve3D, MbLineSegment3D, MbTrimmedCurve3D, MbBSpline, MbLine3D, MbPlaneCurve, and MbPolyCurve3D.

◆ DistanceToPoint()

virtual double MbCurve3D::DistanceToPoint ( const MbCartPoint3D point) const
virtual

Determine the distance to the point.

Determine the distance to the point.

Parameters
[in]point- Point.
Returns
Distance to point

Implements MbSpaceItem.

Reimplemented in MbArc3D, MbContourOnSurface, MbPolyline3D, MbContour3D, MbReparamCurve3D, MbLine3D, and MbPlaneCurve.

◆ AddYourGabaritTo()

virtual void MbCurve3D::AddYourGabaritTo ( MbCube cube) const
virtual

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.

Reimplemented in MbSurfaceIntersectionCurve, MbSurfaceCurve, MbOffsetCurve3D, MbContourOnSurface, MbSpiral, MbCharacterCurve3D, MbBridgeCurve3D, MbLine3D, and MbPolyCurve3D.

◆ PrepareIntegralData()

virtual void MbCurve3D::PrepareIntegralData ( const bool  forced) const
virtual

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 in MbSurfaceIntersectionCurve, MbSurfaceCurve, MbContourOnSurface, MbOffsetCurve3D, MbSpiral, MbContour3D, MbCharacterCurve3D, MbReparamCurve3D, MbBridgeCurve3D, MbTrimmedCurve3D, MbPlaneCurve, and MbPolyCurve3D.

◆ IsTouch()

bool MbCurve3D::IsTouch ( double  eps = Math::metricPrecision) const
inline

Determine whether a curve is closed regardless of the smoothness of the closure.

Determine whether a curve is actually closed regardless of the smoothness of the closure.

◆ NurbsCurve() [1/2]

MbNurbs3D* MbCurve3D::NurbsCurve ( const MbCurveIntoNurbsInfo nInfo = NULL) const

Construct a NURBS copy of a curve.

Constructs a NURBS copy which approximates a given curve. If it is possible, constructs the accurate curve, perhaps with multiple knots. The number of knots for NURBS is defined depending on the curve.

Parameters
[in]nInfo- Parameters of conversion of a curve to NURBS.
Returns
The constructed NURBS curve or NULL in a case of failure.

◆ NurbsCurve() [2/2]

virtual MbNurbs3D* MbCurve3D::NurbsCurve ( const MbCurveIntoNurbsInfo nInfo) const
virtual

Construct a NURBS copy of a curve.

Constructs a NURBS curve which approximates a given curve inside the range [t1, t2]. with a given direction. If it is possible, constructs the accurate curve, perhaps with multiple knots. The number of knots for NURBS is defined depending on the curve.

Parameters
[in]t1- Parameter corresponding to start of approximated part of a curve.
[in]t2- Parameter corresponding to end of approximated part of a curve.
[in]sense- Does the direction of parameter increasing along the NURBS curve coincide with direction of the initial curve. 'sense' > 0 - direction coincide.
[in]nInfo- Parameters of conversion of a curve to NURBS.
Returns
The constructed NURBS curve or NULL in a case of failure.

Reimplemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbConeSpiral, MbSurfaceCurve, MbContour3D, MbContourOnSurface, MbBezier3D, MbSpiral, MbCharacterCurve3D, MbPolyline3D, MbReparamCurve3D, MbBridgeCurve3D, MbTrimmedCurve3D, MbLineSegment3D, MbPlaneCurve, MbLine3D, MbBSpline, and MbPolyCurve3D.

◆ NurbsCurveMinPoints()

virtual size_t MbCurve3D::NurbsCurveMinPoints ( const MbNurbsParameters tParameters,
double  epsilon = c3d::METRIC_DELTA 
) const
virtual

Define the number of knots of a NURBS curve which is required to approximate the curve with the given tolerance.

Define the number of knots of a NURBS curve which is required to approximate the curve with the given tolerance.

Parameters
[in]tParameters- Parameters for the construction of a NURBS copy of the curve.
[in]epsilon- The tolerance of approximation.
Returns
The constructed NURBS curve or NULL in a case of failure.

◆ GetLengthEvaluation()

virtual double MbCurve3D::GetLengthEvaluation ( ) const
virtual

Calculate the metric length of a curve.

The length of a curve is inaccurately calculated, by approximation of polyline. If the more accurate curve's length is required, then use the function CalculateMetricLength().

Reimplemented in MbArc3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbContourOnSurface, MbSilhouetteCurve, MbReparamCurve3D, MbSpiral, MbTrimmedCurve3D, MbCharacterCurve3D, MbPlaneCurve, MbLineSegment3D, MbContourOnPlane, and MbPolyCurve3D.

◆ CalculateLocalGabarit()

virtual void MbCurve3D::CalculateLocalGabarit ( const MbMatrix3D into,
MbCube cube 
) const
virtual

To compute bounding box in a local coordinate system.

To obtain bounding box of object with regar to a local coordinate system, sent box is made to be empty. Then it is computed bounding box of object in a local coordinate system \ and it is stored in box 'cube'

Parameters
[in]into- Transformation matrix from object's current coordinate system to a local coordinate system
[in,out]cube- Information on bounding box

Implements MbSpaceItem.

Reimplemented in MbArc3D, MbContour3D, MbPlaneCurve, MbPolyline3D, MbReparamCurve3D, MbLine3D, and MbLineSegment3D.

◆ GetProperties()

virtual void MbCurve3D::GetProperties ( MbProperties properties)
pure virtual

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.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbContour3D, MbConeSpiral, MbSurfaceCurve, MbBezier3D, MbContourOnSurface, MbOffsetCurve3D, MbPolyline3D, MbSpiral, MbSilhouetteCurve, MbCurveSpiral, MbCharacterCurve3D, MbCrookedSpiral, MbReparamCurve3D, MbBridgeCurve3D, MbLineSegment3D, MbTrimmedCurve3D, MbContourOnPlane, MbPlaneCurve, MbLine3D, MbBSpline, and MbPolyCurve3D.

◆ SetProperties()

virtual void MbCurve3D::SetProperties ( const MbProperties properties)
pure virtual

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.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbContour3D, MbConeSpiral, MbSurfaceCurve, MbBezier3D, MbContourOnSurface, MbOffsetCurve3D, MbPolyline3D, MbSpiral, MbSilhouetteCurve, MbCurveSpiral, MbCharacterCurve3D, MbCrookedSpiral, MbReparamCurve3D, MbBridgeCurve3D, MbLineSegment3D, MbTrimmedCurve3D, MbContourOnPlane, MbPlaneCurve, MbLine3D, MbBSpline, and MbPolyCurve3D.

◆ CalculateMesh()

virtual void MbCurve3D::CalculateMesh ( const MbStepData stepData,
const MbFormNote note,
MbMesh mesh 
) const
virtual

Build polygonal copy mesh.

Build a polygonal copy of the object that is represented by polygons or/and fasets.

Parameters
[in]stepData- Data for еру step calculation for polygonal object.
[in]note- Way for polygonal object constructing.
[in,out]mesh- The builded polygonal object.

Implements MbSpaceItem.

Reimplemented in MbSurfaceIntersectionCurve, MbContour3D, MbContourOnSurface, and MbBSpline.

◆ GetRadius()

virtual double MbCurve3D::GetRadius ( ) const
virtual

Get the physical radius of the curve or null if it impossible.

In general case 0 is returned. A value different from 0 may be obtained only in a case, when the curve is an arc of a circle or it is equivalent to an arc of a circle.

Returns
A value of radius, if it is existed, or 0.0.

Reimplemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbContour3D, MbReparamCurve3D, MbPlaneCurve, MbTrimmedCurve3D, and MbContourOnPlane.

◆ GetCircleAxis()

virtual bool MbCurve3D::GetCircleAxis ( MbAxis3D axis) const
virtual

Get an axis of a circle which is geometrically coincident to the given curve.

Get an axis of a circle which is geometrically coincident to the given curve.

Parameters
[out]axis- An axis with the origin at circle's center and direction along the normal of circle's plane.

Reimplemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbReparamCurve3D, MbPlaneCurve, MbTrimmedCurve3D, and MbContourOnPlane.

◆ IsContinuousDerivative()

virtual bool MbCurve3D::IsContinuousDerivative ( bool &  contLength,
bool &  contDirect,
c3d::DoubleVector params = NULL,
double  epsilon = EPSILON 
) const
virtual

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 in MbNurbs3D, MbSurfaceCurve, MbContour3D, MbReparamCurve3D, MbBezier3D, MbContourOnSurface, MbPolyline3D, MbPlaneCurve, and MbOffsetCurve3D.

◆ SetContinuousDerivativeLength()

virtual bool MbCurve3D::SetContinuousDerivativeLength ( VERSION  version,
double  epsilon = EPSILON 
)
virtual

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 in MbNurbs3D, MbSurfaceCurve, MbContour3D, MbReparamCurve3D, MbBezier3D, MbContourOnSurface, MbPolyline3D, MbPlaneCurve, and MbOffsetCurve3D.

◆ GetLimitTangent() [1/2]

MbVector3D MbCurve3D::GetLimitTangent ( ptrdiff_t  number) const

Calculate a tangent vector to the boundary point.

Calculate a normalized tangent vector to the boundary point.

Parameters
[in]number- A number of a boundary point. The value 1 corresponds to the start point of a curve, 2 - to the end point.
Returns
Tangent vector.

◆ GetLimitTangent() [2/2]

void MbCurve3D::GetLimitTangent ( ptrdiff_t  number,
MbVector3D v 
) const

Calculate a tangent vector to the boundary point.

Calculate a normalized tangent vector to the boundary point.

Parameters
[in]number- A number of a boundary point. The value 1 corresponds to the start point of a curve, 2 - to the end point.
[in,out]v- Tangent vector.

◆ AreLimitPointsEqual()

bool MbCurve3D::AreLimitPointsEqual ( ) const
inline

Are boundary points equal?

Are curve boundary points equal?

Returns
Returns true if points are equal.

◆ IsReparamSame()

virtual bool MbCurve3D::IsReparamSame ( const MbCurve3D curve,
double &  factor 
) const
virtual

Define whether a reparameterized curve is the same.

Define whether a reparameterized curve is the same.

Parameters
[in]curve- A curve for comparison.
[out]factor- Coefficient of compression of parametric region at the time of transition to the pointed curve.

Reimplemented in MbNurbs3D.


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