C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
MbReparamCurve Class Reference

Reparametrized curve in two-dimensional space. More...

`#include <cur_reparam_curve.h>`

Inheritance diagram for MbReparamCurve:
Collaboration diagram for MbReparamCurve:

## Public Types

enum  MbeReparamType {
rt_Linear , rt_Quadratic , rt_ScaledEndDers , rt_Proportional ,
rt_User
}

## Public Member Functions

MbReparamCurve (const MbCurve &, double t1, double t2)
Constructor by curve and by new parametric limits.

MbReparamCurve (const MbCurve &, const double t1, const double t2, const double begFirstDerValue)
Constructor by curve and by new parametric limits.

MbReparamCurve (double dt1, double dt2, const MbCurve &curve)
Constructor for the curve and derivatives of the parameter at its ends.

void Init (double t1, double t2)
Set curve parametric range.

void Init (double t1, double t2, double begFirstDerValue)
Set curve parametric range and first derive length.

void InitScaledEnds (double scaleDer1, double scaleDer2)
Set curve parametric range.

bool InitProportional (double t1, double t2)
Set the parametric area of the curve proportional to the metric length of the curve.

bool InitByUsersFunction (MbFunction &repFunc)
Set users reparameterization function.

Common functions of a geometric object.
MbePlaneType IsA () const override
Get the object type.

bool IsSimilar (const MbPlaneItem &) const override
Determine whether the objects are similar. More...

bool SetEqual (const MbPlaneItem &) override
Make the objects equal. More...

void Transform (const MbMatrix &, MbRegTransform *=nullptr, const MbSurface *newSurface=nullptr) override
Transform according to the matrix. More...

void Move (const MbVector &, MbRegTransform *=nullptr, const MbSurface *newSurface=nullptr) override
Translate along a vector. More...

void Rotate (const MbCartPoint &, const MbDirection &angle, MbRegTransform *=nullptr, const MbSurface *newSurface=nullptr) override

bool IsSame (const MbPlaneItem &, double accuracy=LENGTH_EPSILON) const override
Determine whether objects are equal. More...

Construct the equidistant curve which is shifted by the given value.

MbPlaneItemDuplicate (MbRegDuplicate *=nullptr) const override
Create a copy. More...

MbCurveTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyEps, bool saveParamLenAndLaw) const override
Construct a trimmed curve with the given two-dimensional accuracy. More...

MbContourNurbsContour () const override
Approximate of a curve by the contour from NURBS curves.

void AddYourGabaritTo (MbRect &) const override
Extend the given bounding rectangle so that it encloses this object.

void CalculateGabarit (MbRect &) const override
Detect the bounding box of a curve. More...

bool IsVisibleInRect (const MbRect &, bool exact=false) const override
Determine visibility of an object in rectangle. More...

const MbFunctionGetFunction () const

virtual MbCurveTrimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const
Construct a trimmed curve. More...

virtual MbCurveTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyEps, bool saveParamLenAndLaw) const=0
Construct a trimmed curve with the given two-dimensional accuracy. More...

bool IsVisibleInRect (const MbRect &rect, bool exact=false) const override
Determine visibility of an object in rectangle. More...

Functions for description of a curve domain.
double GetTMax () const override
Get the maximum value of parameter.

double GetTMin () const override
Get the minimum value of parameter.

bool IsClosed () const override
Define whether the curve is periodic. More...

double GetPeriod () const override
Return period. More...

Functions for working in the curve's domain.

Functions PointOn, FirstDer, SecondDer, ThirdDer,... correct parameter if it is out of domain bounds. Except MbLine (line).

void PointOn (double &t, MbCartPoint &p) const override
Calculate a point on the curve. More...

void FirstDer (double &t, MbVector &fd) const override
Calculate first derivative.

void SecondDer (double &t, MbVector &sd) const override
Calculate second derivative.

void ThirdDer (double &t, MbVector &td) const override
Calculate third derivative.

Functions for working inside and outside the curve's domain.

Functions _PointOn, _FirstDer, _SecondDer, _ThirdDer,... don't correct parameter if it is out of domain bounds. If the parameter is out of domain bounds, an unclosed curve is extended by tangent vector at corresponding end point in general case. Except arcs of an ellipse or a circle - they are extended according to their equations.

void _PointOn (double t, MbCartPoint &p) const override
Calculate point at curve and its extension. More...

void _FirstDer (double t, MbVector &v) const override
Calculate first derivative at curve and its extension.

void _SecondDer (double t, MbVector &v) const override
Calculate second derivative at curve and its extension.

void _ThirdDer (double t, MbVector &v) const override
Calculate third derivative at curve and its extension.

Functions for get of the group of data inside and outside the curve's domain of parameter.
void Explore (double &t, bool ext, MbCartPoint &pnt, MbVector &fir, MbVector *sec, MbVector *thir) const override
Calculate point and derivatives of object for given parameter. More...

Functions of moving along the curve
double Step (double t, double sag) const override
Calculate parameter step. More...

double DeviationStep (double t, double _atol) const override
Calculate parameter step. More...

Common functions of curve
void Inverse (MbRegTransform *iReg=nullptr) override
Set the opposite direction of curve.

double DistanceToPoint (const MbCartPoint &toP) const override
Calculate the distance to a point.

bool DistanceToPointIfLess (const MbCartPoint &toP, double &d) const override
Calculate the distance to a point. More...

MbeState Deformation (const MbRect &, const MbMatrix &) override
Deform the curve. More...

MbeState DeletePart (double t1, double t2, MbCurve *&part2) override
Delete the piece of a curve. More...

MbeState TrimmPart (double t1, double t2, MbCurve *&part2) override
Keep the piece of a curve. More...

MbNurbsNurbsCurve (const MbCurveIntoNurbsInfo &) const override
Construct a NURBS copy of a curve. More...

MbCurveNurbsCurve (const MbNurbsParameters &) const override
Construct a NURBS copy of a curve. More...

bool IsBounded () const override
Define whether the curve is bounded.

bool IsDegenerate (double eps=Math::LengthEps) const override
Define whether the curve is degenerate..

bool IsStraight (bool ignoreParams=false) const override
Define whether the curve is rectilinear..

bool IsSmoothConnected (double angleEps) const override
Define whether joints of contour/curve are smooth.

bool IsCompleteInRect (const MbRect &r) const override
Determine whether an object is fully visible in rectangle. More...

double CalculateMetricLength () const override
Calculate the metric length of a curve.

bool HasLength (double &length) const override
Calculate the metric length of a curve. More...

double GetMetricLength () const override
Calculate the metric length of a curve. More...

double GetLengthEvaluation () const override
Calculate the metric length of a curve. More...

double Curvature (double t) const override
Calculate curvature of curve.

double CalculateLength (double t1, double t2) const override
Calculate the metric length of a curve. More...

MbeItemLocation PointRelative (const MbCartPoint &pnt, double eps=Math::LengthEps) const override
Define the point position relative to the curve. More...

void Refresh () override
Set all temporary (mutable) data of object to undefined (initial) state.

void PrepareIntegralData (const bool forced) const override
Calculate temporary (mutable) data of an object. More...

double PointProjection (const MbCartPoint &) const override
Calculate the point projection to the curve. More...

bool NearPointProjection (const MbCartPoint &pnt, double xEpsilon, double yEpsilon, double &t, bool ext, MbRect1D *tRange=nullptr) const override
Find the point projection to the curve. More...

void PerpendicularPoint (const MbCartPoint &pnt, SArray< double > &tFind) const override
Find perpendiculars to a curve. More...

bool SmallestPerpendicular (const MbCartPoint &pnt, double &tProj) const override
Find the nearest perpendicular to the curve. More...

void TangentPoint (const MbCartPoint &pnt, SArray< double > &tFind) const override
Find tangents to a curve. More...

void IntersectHorizontal (double y, SArray< double > &) const override
Find intersections of a curve with horizontal line. More...

void IntersectVertical (double x, SArray< double > &) const override
Find intersections of a curve with vertical line. More...

void SelfIntersect (SArray< MbCrossPoint > &, double metricEps=Math::LengthEps) const override
Find self-intersections of curve. More...

void OffsetCuspPoint (SArray< double > &tCusps, double dist) const override
Find the special points of an offset curve. More...

bool GetMiddlePoint (MbCartPoint &) const override
Calculate a middle point of a curve.

bool GoThroughPoint (MbCartPoint &p0) override
Create a curve through a point. More...

double LengthBetween2Points (MbCartPoint &p1, MbCartPoint &p2, MbCartPoint *pc=nullptr) const override
Calculate minimal length of a curve between two points on it. More...

bool GetSpecificPoint (const MbCartPoint &from, double &dmax, MbCartPoint &pnt) const override
Return a specific point of a curve. More...

bool GetWeightCentre (MbCartPoint &c) const override
Calculate the center of gravity of a curve.

bool GetCentre (MbCartPoint &c) const override
Calculate a center of curve.

double GetRadius (double accuracy=PARAM_REGION) const override
Get the physical radius of the curve or zero if it impossible. More...

bool DistanceAlong (double &t, double len, int curveDir, double eps=Math::LengthEps, VERSION version=Math::DefaultMathVersion()) const override
Translate parameter along the curve. More...

bool GetAxisPoint (MbCartPoint &) const override
Calculate a point to construct an axis. More...

bool IsSimilarToCurve (const MbCurve &curve, double precision=PARAM_PRECISION) const override
Define whether the curves are similar for the merge.

size_t GetCount () const override
Define the number of splittings for one passage in operations.

void GetAnalyticalFunctionsBounds (std::vector< double > &params) const override
Get the boundaries of the curve sections that are described by one analytical function.

void GetPointsByEvenLengthDelta (size_t n, std::vector< MbCartPoint > &pnts) const override
Get n points of a curve with equal intervals by arc length.

void ParameterInto (double &) const

void ParameterFrom (double &) const

double EpsilonInto (double eps) const

double EpsilonFrom (double eps) const

const MbCurveGetBasisCurve () const override
Returns the base curve if exists or itself.

MbCurveSetBasisCurve () override
Returns the base curve if exists or itself.

bool SetBasisCurve (const MbCurve &, const MbRect1D *tRange=nullptr)
Replace the planar curve.

double Tmin () const
Start parameter.

double Tmax () const
End parameter.

double Dt () const
Derivative of parameter of 'basisCurve' curve by parameter.

bool SetTmin (double t)

bool SetTmax (double t)

bool SetDt (double d)

MbeReparamType GetReparamType () const

const MbCurveGetSubstrate () const override
Get a substrate or itself.

MbCurveSetSubstrate () override
Get a substrate or itself.

int SubstrateCurveDirection () const override
Return direction of a substrate relative to a curve or vice versa.

void SubstrateToCurve (double &) const override
Transform a substrate parameter to the curve parameter.

void CurveToSubstrate (double &) const override
Transform a curve parameter to the substrate parameter.

void GetProperties (MbProperties &) override
Get properties of the object. More...

void SetProperties (const MbProperties &) override
Change properties of the object. More...

void GetBasisPoints (MbControlData &) const override
Get control points of object.

void SetBasisPoints (const MbControlData &) override
Change the object by control points.

bool IsContinuousDerivative (bool &contLength, bool &contDirect, c3d::DoubleVector *params=nullptr, double epsilon=EPSILON) const override
Get properties of the object. More...

bool SetContinuousDerivativeLength (VERSION version, double epsilon=EPSILON) override
Eliminate the discontinuities of the first derivative at length. More...

bool IsProportional () const
Is the re-parametrization proportional?

bool IsLinear () const

bool SetLimitParam (double newTMin, double newTMax)

Public Member Functions inherited from MbCurve
virtual ~MbCurve ()
Destructor.

MbePlaneType Type () const override
Get the group type of the object.

MbePlaneType Family () const override
Get family of object.

void Refresh () override
Set all temporary (mutable) data of object to undefined (initial) state.

size_t size () const
Number of objects if object is interpreted as vector of objects.

const MbCurveoperator[] (size_t) const
An access operator.

virtual MbResultType Extend (const MbCurveExtensionParameters &parameters, c3d::PlaneCurveSPtr &resCurve) const
Extend the curve. More...

virtual void AddYourGabaritMtr (MbRect &rect, const MbMatrix &matr) const
Add a bounding box to rectangle. More...

virtual void CalculateLocalGabarit (const MbMatrix &into, MbRect &local) const
Calculate bounding box in the local coordinate system. More...

bool IsVisibleInRect (const MbRect &rect, bool exact=false) const override
Determine visibility of an object in rectangle. More...

double DistanceToPoint (const MbCartPoint &toP) const override
Calculate the distance to a point.

bool DistanceToPointIfLess (const MbCartPoint &toP, double &d) const override
Calculate the distance to a point. More...

virtual bool IsPeriodic () const
Define whether the curve is periodic. More...

bool IsTouch (double eps=Math::LengthEps) const
Determine whether a curve is closed regardless of the smoothness of the closure. More...

void Tangent (double &t, MbVector &v) const
Calculate tangent vector (normalized).

void Tangent (double &t, MbDirection &d) const
Calculate tangent vector (normalized).

void Normal (double &t, MbVector &v) const
Calculate main normal vector (normalized).

void Normal (double &t, MbDirection &d) const
Calculate main normal vector (normalized).

void _Tangent (double t, MbVector &v) const
Calculate tangent vector (normalized).

void _Tangent (double t, MbDirection &d) const
Calculate tangent vector (normalized).

void _Normal (double t, MbVector &v) const
Calculate main normal vector (normalized) at curve and its extension.

void _Normal (double t, MbDirection &d) const
Calculate main normal vector (normalized) at curve and its extension.

double CurvatureDerive (double t) const
Calculate derivative of curvature by parameter.

Calculate radius of curve with a sign.

double GetParamLength () const
Calculate the parametric length of a curve.

virtual void ResetTCalc () const
Reset the current value of parameter.

virtual bool BeginApprox (double sag, double &tbeg, double &tend, MbCartPoint &pnt, bool &existNextPoint) const
Start approximation for the drawing. More...

virtual bool GetNextPoint (double sag, double tend, double &tcur, MbCartPoint &pnt) const
Calculate the next point. More...

virtual void CalculatePolygon (double sag, MbPolygon &poligon) const
Calculate an array of points for drawing. More...

MbNurbsNurbsCurve (const MbCurveIntoNurbsInfo *nInfo=nullptr) const
Construct a NURBS copy of a curve. More...

virtual MbCurveTrimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const
Construct a trimmed curve. More...

virtual bool IsInRectForDeform (const MbRect &) const
Determine visibility of a curve in rectangle.

virtual MbeLocation PointLocation (const MbCartPoint &pnt, double eps=Math::LengthEps) const
The point position relative to the curve.

MbeNewtonResult PointProjectionNewton (const MbCartPoint &p, double xEpsilon, double yEpsilon, size_t iterLimit, double &t, bool ext) const
Find the point projection to the curve. More...

void PointProjection (const MbCartPoint &pnt, MbCartPoint &on) const
Calculate the point projection to the curve. More...

void BasePointProjection (const MbCartPoint &pnt, MbCartPoint &on) const
Calculate the point projection to the curve. More...

void PointProjectionAndAngle (MbCartPoint &on, double &angle) const
Calculate the point projection to the curve. More...

bool DirectPointProjection (const MbCartPoint &pnt, const MbDirection &dir, MbCartPoint &pp) const
Calculate the point projection to the curve. More...

virtual void Isoclinal (const MbVector &angle, SArray< double > &tFind) const
Construct isoclines. More...

void HorzIsoclinal (SArray< double > &tFind) const
Construct horizontal isoclines. More...

void VertIsoclinal (SArray< double > &tFind) const
Construct vertical isoclines. More...

void LowestPoint (MbCartPoint &lowestPoint, double &tLowest) const
Find the lowest point of a curve and the corresponding parameter.

virtual void GetStartPoint (MbCartPoint &) const
Calculate a start point of a curve.

virtual void GetEndPoint (MbCartPoint &) const
Calculate an end point of a curve.

void GetPointsByEvenParamDelta (size_t n, std::vector< MbCartPoint > &pnts) const
Get n points of a curve with equal intervals by parameter.

void GetPointsByEvenParamDelta (size_t n, SArray< MbCartPoint > &pnts) const

void GetPointsByEvenLengthDelta (size_t n, SArray< MbCartPoint > &pnts) const

bool IsPointOn (const MbCartPoint &, double eps=Math::LengthEps) const
Check whether the point is on a curve with the tolerance eps.

bool IsParamOn (double t, double eps=Math::paramEpsilon) const
Check whether the parameter is inside a range with the tolerance eps.

void CorrectCyclicParameter (double &t, double eps=Math::paramRegion) const
Correct parameter for closed curves. More...

void CorrectParameter (double &t) const
Correct parameter. More...

MbCurveInverseDuplicate () const
Create a copy with changed direction.

bool IsInverseSame (const MbCurve &curve, double accuracy=LENGTH_EPSILON) const
Define whether an inversed curve is the same.

virtual bool IsReparamSame (const MbCurve &curve, double &factor) const
Define whether a reparameterized curve is the same. More...

MbCartPoint GetLimitPoint (ptrdiff_t number) const
Calculate the boundary point. More...

void GetLimitPoint (ptrdiff_t number, MbCartPoint &pnt) const
Calculate the boundary point. More...

void GetLimitTangent (ptrdiff_t number, MbVector &v) const
Calculate a tangent vector to the boundary point. More...

void GetLimitPointAndTangent (ptrdiff_t number, MbCartPoint &pnt, MbVector &v) const
Calculate a tangent vector and point at the end of a curve. More...

bool AreLimitPointsEqual () const
Are boundary points equal? More...

virtual double GetParamDelta () const
Return an indent by parameter of a curve.

virtual double GetParamToUnit () const
Return increment of parameter, corresponding to the unit length in space.

virtual double GetParamToUnit (double t) const
Return increment of parameter, corresponding to the unit length in space according to parameter.

virtual double GetTEpsilon (double epsilon) const
Return the minimal discernible value of parameter with the given tolerance.

virtual double GetTEpsilon (double t, double epsilon) const
Return the minimal discernible value of parameter with the given tolerance according to parameter.

virtual double GetTRegion (double epsilon) const
Return the minimal discernible value of parameter with the given tolerance.

virtual double GetTRegion (double t, double epsilon) const
Return the minimal discernible value of parameter with the given tolerance according to parameter.

virtual double GetTRegion (double t, const MbDimAccuracy &xyEps) const
Return the minimal discernible value of parameter with the given two-dimensinal accuracy according to parameter. The method takes into account the direction of the curve at a point.

double GetTMid () const
Return the middle of parametric range of a curve.

double GetTRange () const
Return the parametric length of a curve.

MbCartPoint PointOn (double &t) const
Calculate point on the curve.

MbVector FirstDer (double &t) const
Calculate first derivative.

MbDirection Tangent (double &t) const
Calculate tangent vector (normalized).

MbDirection Normal (double &t) const
Calculate the normal vector.

double DerLength (double &t) const
Calculate the length of derivative vector.

virtual void BreakPoints (std::vector< double > &vBreaks, double precision=ANGLE_REGION) const
\ ru ÐžÐ¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ðµ Ñ‚Ð¾Ñ‡ÐµÐº Ð¸Ð·Ð»Ð¾Ð¼Ð° ÐºÑ€Ð¸Ð²Ð¾Ð¹. The determination of curve smoothness break points.

MbPropertyCreateProperty (MbePrompt name) const override
Create a custom property.

bool IsSpaceNear (const MbCurve &curve, double eps, bool ext, double devSag=5.0 *Math::deviateSag) const
Check whether the two curves are metrically close. More...

bool IsSpaceNear (const MbCurve &curve, double xEps, double yEps, bool ext, double xNear, double yNear, double devSag=5.0 *Math::deviateSag) const
Check whether the two curves are metrically close. More...

SimpleName GetCurveName () const
A curve name.

void SetCurveName (SimpleName newName)
Set a curve name.

Public Member Functions inherited from MbPlaneItem
virtual ~MbPlaneItem ()
Destructor.

void PrepareWrite () const
Object registration. More...

MbeRefType RefType () const override
Get the registration type (for copying, duplication).

virtual void Rotate (const MbCartPoint &pnt, double angle, MbRegTransform *iReg=nullptr, const MbSurface *newSurface=nullptr)

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.

virtual bool IsFamilyRegistrable () const
Whether the object belongs to a registrable family.

Public Member Functions inherited from MbRefItem
refcount_t GetUseCount () const
Get count of references (get count of owners of an object).

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.

## Static Public Member Functions

static MbReparamCurveCreateProportional (const MbCurve &curve, double t1, double t2)
Set the parametric area of the curve proportional to the metric length of the curve.

static MbReparamCurveCreateByFunction (const MbCurve &curve, MbFunction &repFunc)
Set users reparameterization function.

## Protected Attributes

MbCurvebasisCurve
The base curve.

MbeReparamType reparamType
Way of repatametrization.

SPtr< MbFunctionrepFunction
Reparametric function for calculation the base curve parameter.

Protected Attributes inherited from MbCurve
SimpleName name
A curve name. The object data is temporary and used internally.

Protected Member Functions inherited from MbCurve
MbCurve ()
Default constructor.

MbCurve (const MbCurve &other)
Copy-constructor.

Protected Member Functions inherited from MbPlaneItem
MbPlaneItem ()
Constructor.

Protected Member Functions inherited from MbRefItem
MbRefItem ()
Constructor without parameters.

## Detailed Description

Reparametrized curve in two-dimensional space.

Reparametrized curve is used for matching domains of curves.
Geometrically reparametrized curve completely coincides with base curve 'basisCurve'. Reparametrized curve has another definition domain and as a result another length of its derivatives. Parameters of base curve and reparametrized curve are related by the equality:
dt (t - tmin) = t_basisCurve - tmin_basisCurve, where 't' - parameter of reparametrized curve. Another reparametrized curve can't be the base curve for a reparametrized curve. In this situation it changes to the initial base curve.

## ◆ MbeReparamType

Enumerator
rt_Linear

Linear reparametrization.

rt_ScaledEndDers

Reparametrization with a given scale of the derivative at the ends.

rt_Proportional

The poportional to the length of the curve parametrization.

rt_User

User defined function.

## ◆ IsSimilar()

 bool MbReparamCurve::IsSimilar ( const MbPlaneItem & item ) const
overridevirtual

Determine whether the objects are similar.

Objects of the same type are considered to be similar if data of the objects can be equated or the data are also similar (pointers). Similar object can be initialized by data of object similar to it (equate one to another without changing of addresses).

Parameters
 [in] item - Object for comparison.
Returns
Whether the objects are similar.

Reimplemented from MbPlaneItem.

## ◆ SetEqual()

 bool MbReparamCurve::SetEqual ( const MbPlaneItem & item )
overridevirtual

Make the objects equal.

It is possible to make equal only similar objects. Similar object is equated to a given one by changing of numerical data.

Parameters
 [in] item - Object for initialization.
Returns
Whether the object is made equal to the given one.

Implements MbPlaneItem.

## ◆ Transform()

 void MbReparamCurve::Transform ( const MbMatrix & matr, MbRegTransform * iReg = `nullptr`, const MbSurface * newSurface = `nullptr` )
overridevirtual

Transform according to the matrix.

Transform the initial object according to the matrix using the registrator. If the object contains references to the other geometric objects, then the nested objects are transformed according to the matrix. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to transformation.

Parameters
 [in] matr - A transformation matrix. [in] iReg - Registrator. [in] surface - New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar.

Implements MbPlaneItem.

## ◆ Move()

 void MbReparamCurve::Move ( const MbVector & to, MbRegTransform * iReg = `nullptr`, const MbSurface * newSurface = `nullptr` )
overridevirtual

Translate along a vector.

Translate a geometric object along the vector using the registrator. If the object contains references to the other objects, then the translation operation is applied to the nested objects. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to translation.

Parameters
 [in] to - Translation vector. [in] iReg - Registrator. [in] surface - New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar.

Implements MbPlaneItem.

## ◆ Rotate()

 void MbReparamCurve::Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * iReg = `nullptr`, const MbSurface * newSurface = `nullptr` )
overridevirtual

Rotate an object about a point by the given angle using the registrator. If the object contains references to the other geometric objects, then the rotation operation is applied to the nested objects too. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to rotation.

Parameters
 [in] pnt - Fixed point. [in] angle - The rotation angle. [in] iReg - Registrator. [in] surface - New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar.

Implements MbPlaneItem.

## ◆ IsSame()

 bool MbReparamCurve::IsSame ( const MbPlaneItem & item, double accuracy = `LENGTH_EPSILON` ) const
overridevirtual

Determine whether objects are equal.

Objects of the same types with similar (equal) data are considered to be equal.

Parameters
 [in] item - Object for comparison. [in] accuracy - The accuracy.
Returns
Whether the objects are equal.

Implements MbPlaneItem.

## ◆ Duplicate()

 MbPlaneItem& MbReparamCurve::Duplicate ( MbRegDuplicate * iReg = `nullptr` ) const
overridevirtual

Create a copy.

Create a copy of the object using the registrator. The registrator is used for preventing multiple copying of an object. If the object contains references to other objects, then the included objects are copied too. It is allowed not to pass the registrator to a function. Then the new copy of the object will be created. It is allowed not to use the registrator while copying a single object or a set of disconnected objects. The registrator must be used to copy several correlated objects successively. It is possible that the objects' connection means that the objects contain references to the common objects. Then, while copying without using the registrator, one can get a set of copies which contain references to the different copies of a single included object, what leads to loss of connection between the copies.

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

Implements MbPlaneItem.

## ◆ Trimmed() [1/3]

 MbCurve* MbReparamCurve::Trimmed ( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const
overridevirtual

Construct a trimmed curve with the given two-dimensional accuracy.

Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed curve (or for an arc - exception) three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.

Parameters
 [in] t1 - Parameter corresponding to start of a trimmed curve. [in] t2 - Parameter corresponding to end of a trimmed curve. [in] sense - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. [in] xyEps - Two-dimensional accuracy. It is used for estimations near the points corresponding to the parameters t1 and t2. [in] saveParLenAndLaw - Save parametric length and law.
Returns
A constructed trimmed curve.
Warning
Under development.

Implements MbCurve.

## ◆ CalculateGabarit()

 void MbReparamCurve::CalculateGabarit ( MbRect & ) const
overridevirtual

Detect the bounding box of a curve.

The sent rectangle becomes empty for getting a bounding box. Then bounding boxes of an object are calculated and saved into a rectangle 'rect'.

Reimplemented from MbCurve.

## ◆ IsVisibleInRect() [1/2]

 bool MbReparamCurve::IsVisibleInRect ( const MbRect & rect, bool exact = `false` ) const
overridevirtual

Determine visibility of an object in rectangle.

It is considered that the object is visible in rectangle if bounds of an object is crossed with the given rectangle or (high requirements to accuracy, exact = true) at least one point of object is in the rectangle.

Parameters
 [in] rect - Rectangle to check getting to. [in] exact - Check accuracy. If exact = true, then at least one point of object gets to the rectangle. if exact = false, it is sufficient to find intersection between rectangle and bounding box of an object.
Returns
true, if the object is visible in the rectangle, otherwise false.

Implements MbPlaneItem.

## ◆ IsClosed()

 bool MbReparamCurve::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:
• MbLine,
• MbLineSegment,
• MbCosinusoid,
• MbContour (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 MbCurve.

## ◆ GetPeriod()

 double MbReparamCurve::GetPeriod ( ) const
overridevirtual

Return period.

Return the period value if a curve can be closed. Let unclosed curve return null.

Returns
The value of period for a closed curve or null - for unclosed curve.

Reimplemented from MbCurve.

## ◆ PointOn()

 void MbReparamCurve::PointOn ( double & t, MbCartPoint & 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 MbCurve.

## ◆ _PointOn()

 void MbReparamCurve::_PointOn ( double t, MbCartPoint & p ) const
overridevirtual

Calculate point at curve and its extension.

Calculate a point on the curve including the outside area determination parameter.

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

Reimplemented from MbCurve.

## ◆ Explore()

 void MbReparamCurve::Explore ( double & t, bool ext, MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * 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 MbCurve.

## ◆ Step()

 double MbReparamCurve::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 of a curve from its polygon does not exceed the given sag value.

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 MbCurve.

## ◆ DeviationStep()

 double MbReparamCurve::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 MbCurve.

## ◆ DistanceToPointIfLess()

 bool MbReparamCurve::DistanceToPointIfLess ( const MbCartPoint & to, double & d ) const
overridevirtual

Calculate the distance to a point.

Calculate distance to object from a given point near the object. Distance is calculated and stored to 'd' variable if it is less then initial value of 'd'. There can be performance benefit in comparison with DistanceToPoint function due to primarily checking the distance from point to bounding box and performing the further calculations only if this distance is not greater than the given one.

Parameters
 [in] to - Point. [in,out] d - Specified distance from object on input. Distance from point to object on output if operation succeeded.
Returns
True if distance from point to the object is less than the given one, otherwise false. Calculate the distance from a point and change the given value of distance if the distance is less than the given one.

Implements MbPlaneItem.

## ◆ Deformation()

 MbeState MbReparamCurve::Deformation ( const MbRect & rect, const MbMatrix & matr )
overridevirtual

Deform the curve.

If the bounding rectangle of a curve intersects the given one, then the curve is transformed according to the matrix with a help of 'Transform' function.

Parameters
 [in] rect - A rectangle, in which the visibility of a curve is checked. [in] matr - A deformation matrix.
Returns
A state of a curve after deformation.

Reimplemented from MbCurve.

## ◆ DeletePart()

 MbeState MbReparamCurve::DeletePart ( double t1, double t2, MbCurve *& part2 )
overridevirtual

Delete the piece of a curve.

Delete a part of a curve between parameters t1 and t2. If the curve is split into two parts after deletion, then the initial object corresponds to the start part of a curve, and parameter 'part2' contains the end part of a curve. If the curve remained simply connected, then only the initial object changes.

Parameters
 [in] t1 - Start parameter of trimming. [in] t2 - End parameter of trimming. [in,out] part2 - The end part of a curve after deletion, if an initial curve is split into parts. It may be the only part after deletions, \ if the curve did not change (e. g. for a curve of MbLine type), in this case the returned value is dp_Degenerated.
Returns
A state of a curve after modification.

Implements MbCurve.

## ◆ TrimmPart()

 MbeState MbReparamCurve::TrimmPart ( double t1, double t2, MbCurve *& part2 )
overridevirtual

Keep the piece of a curve.

Leave a part of a curve between parameters t1 and t2.
In a case of success the returned value equals dp_Changed and a curve satisfies to the next conditions:

• if an initial curve is closed then the start point of a trimmed curve should correspond to the parameter t1, the end point - to the parameter t2,
• if an initial curve is not closed then the start point of a trimmed curve should correspond to the minimum parameter from t1 and t2, the end point - to the maximum one.
Parameters
 [in] t1 - Start parameter of trimming. [in] t2 - End parameter of trimming. [in,out] part2 - This may be filled by a result of trimming if the curve was not changed. In this case the returned value is dp_Degenerated. Otherwise nullptr is returned.
Returns
A state of a curve after modification:
dp_Degenerated - the curve is degenerated and there are possible three cases: the curve was not changed, because it would degenerate in a result of transformation, or it it was not changed and the result of trimming is 'part2',
dp_NoChanged - the curve was not changes,
dp_Changed - the curve is changed.
Warning
The function is designed for internal use only.

Implements MbCurve.

## ◆ NurbsCurve() [1/2]

 MbNurbs* MbReparamCurve::NurbsCurve ( const MbCurveIntoNurbsInfo & nInfo ) const
overridevirtual

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,out] nurbs - A constructed NURBS-curve. [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 nullptr in a case of failure.

Implements MbCurve.

## ◆ NurbsCurve() [2/2]

 MbCurve* MbReparamCurve::NurbsCurve ( const MbNurbsParameters & tParameters ) const
overridevirtual

Construct a NURBS copy of a curve.

Constructs a NURBS curve which approximates a given curve with the given parameters. In parameters the degree and the number of knots of a spline and the range of curve's parameters changing may be set. If the flag of accurate approximation is not set in parameters then NURBS without multiple knots is constructed.

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

Reimplemented from MbCurve.

## ◆ IsCompleteInRect()

 bool MbReparamCurve::IsCompleteInRect ( const MbRect & rect ) const
overridevirtual

Determine whether an object is fully visible in rectangle.

An object is fully contained in the given rectangle if its bounding rectangle is included in the given rectangle.

Parameters
 [in] rect - Rectangle to check inclusion to.
Returns
true, if the object is fully contained in the rectangle, otherwise false.

Reimplemented from MbCurve.

## ◆ HasLength()

 bool MbReparamCurve::HasLength ( double & length ) const
overridevirtual

Calculate the metric length of a curve.

Calculate the metric length of a curve and save the result in the variable 'length'.

Parameters
 [in,out] length - Calculated length of a curve.
Returns
True - if the length of a curve differs from null. Otherwise returns false.

Implements MbCurve.

## ◆ GetMetricLength()

 double MbReparamCurve::GetMetricLength ( ) const
overridevirtual

Calculate the metric length of a curve.

If a length of a curve is already calculated and saved in the object then this function returns the existing result, without repeating of calculations. Otherwise the length is calculated by the function CalculateMetricLength().

Returns
Length of a curve.

Implements MbCurve.

## ◆ GetLengthEvaluation()

 double MbReparamCurve::GetLengthEvaluation ( ) const
overridevirtual

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 from MbCurve.

## ◆ CalculateLength()

 double MbReparamCurve::CalculateLength ( double t1, double t2 ) const
overridevirtual

Calculate the metric length of a curve.

Calculate the metric length of unclosed curve from parameter t1 to parameter t2. The condition t1 < t2 should satisfied.

Parameters
 [in] t1 - Start parameter of a curve section. [in] t2 - End parameter of a curve section.
Returns
Length of a curve.

Reimplemented from MbCurve.

## ◆ PointRelative()

 MbeItemLocation MbReparamCurve::PointRelative ( const MbCartPoint & pnt, double eps = `Math::LengthEps` ) const
overridevirtual

Define the point position relative to the curve.

There is defined on which side from a curve the point is located, by the positive direction of a curve.

Parameters
 [in] pnt - A given point. [in] eps - A tolerance of detection.
Returns
Iloc_InItem = 1 - if the point is on the left from a curve,
iloc_OnItem = 0 - if the point is on a curve,
iloc_OutOfItem = 1 - if the point is on the right from a curve.

Reimplemented from MbCurve.

## ◆ PrepareIntegralData()

 void MbReparamCurve::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 MbCurve.

## ◆ PointProjection()

 double MbReparamCurve::PointProjection ( const MbCartPoint & pnt ) const
overridevirtual

Calculate the point projection to the curve.

Calculate the parameter of the curve corresponding to the projection of the given point on this curve.
This function does not allow the parameter to go beyond the parametric domain of the definition of an unclosed curve, unlike the NearPointProjection function.

Parameters
 [in] pnt - A given point.
Returns
The found parameter for the projection of a point onto the curve.

Reimplemented from MbCurve.

## ◆ NearPointProjection()

 bool MbReparamCurve::NearPointProjection ( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, double & t, bool ext, MbRect1D * tRange = `nullptr` ) const
overridevirtual

Find the point projection to the curve.

Find the nearest projection of a point on a curve (in the range of the curve) or on its continuation by the given initial approximation. If the parameter ext = true, then also search for a projection on the continuation of the curve. If the range of change of the 'tRange' parameter is specified, then find the projection in the specified range. A range of parameter may not belong to the domain of a curve. The Newton method is used.

Note
Mathematical kernel provides a thread-safe function implementation for its objects.
Parameters
 [in] pnt - A given point. [in] xEpsilon - A tolerance of detection of the projection by x axis. [in] yEpsilon - A tolerance of detection of the projection by y axis. [in,out] t - Input - initial approximation, output - parameter of a curve corresponding to the nearest projection. [in] ext - A flag defining whether to seek projection on the extension of the curve. [in] tRange - A range of parameter changing in which the solution should be found.
Returns
Returns true if the found parameter is in a valid range (according to the given ext, tRange parameters), or false - otherwise.

Reimplemented from MbCurve.

## ◆ PerpendicularPoint()

 void MbReparamCurve::PerpendicularPoint ( const MbCartPoint & pnt, SArray< double > & tFind ) const
overridevirtual

Find perpendiculars to a curve.

Find all perpendiculars to a curve from the given point. In this function a curve without extensions is considered.

Parameters
 [in] pnt - A given point. [in,out] tFind - An array of parameter on a curve, corresponding to the points on a curve, which the perpendiculars are passed through.

Reimplemented from MbCurve.

## ◆ SmallestPerpendicular()

 bool MbReparamCurve::SmallestPerpendicular ( const MbCartPoint & pnt, double & tProj ) const
overridevirtual

Find the nearest perpendicular to the curve.

Find the nearest perpendicular to the curve from the given point. In this function perpendiculars to an extension of a curve are not considered.

Parameters
 [in] pnt - A given point. [in,out] tProj - Parameter on a curve, corresponding to the point on a curve, which the perpendicular is passed through.
Returns
True if the required perpendicular is constructed.

Reimplemented from MbCurve.

## ◆ TangentPoint()

 void MbReparamCurve::TangentPoint ( const MbCartPoint & pnt, SArray< double > & tFind ) const
overridevirtual

Find tangents to a curve.

Find all tangents to a curve from the given point. A point may belong to a curve. In this function a curve without extensions is considered.

Parameters
 [in] pnt - A given point. [in,out] tFind - An array of parameters of a curve, corresponding to the tangent points.

Reimplemented from MbCurve.

## ◆ IntersectHorizontal()

 void MbReparamCurve::IntersectHorizontal ( double y, SArray< double > & cross ) const
overridevirtual

Find intersections of a curve with horizontal line.

Find intersections of a curve with horizontal line.

Parameters
 [in] y - An ordinate of points of a horizontal line. [in,out] cross - An array of parameters of a curve corresponding to the intersection points.

Reimplemented from MbCurve.

## ◆ IntersectVertical()

 void MbReparamCurve::IntersectVertical ( double x, SArray< double > & cross ) const
overridevirtual

Find intersections of a curve with vertical line.

Find intersections of a curve with vertical line.

Parameters
 [in] x - An abscissa of points of a vertical line. [in,out] cross - An array of parameters of a curve corresponding to the intersection points.

Reimplemented from MbCurve.

## ◆ SelfIntersect()

 void MbReparamCurve::SelfIntersect ( SArray< MbCrossPoint > & , double metricEps = `Math::LengthEps` ) const
overridevirtual

Find self-intersections of curve.

Find the points of self-intersection of a curve and the corresponding parameters.

Parameters
 [in,out] crossPnt - An array of points of self-intersection.

Reimplemented from MbCurve.

## ◆ OffsetCuspPoint()

 void MbReparamCurve::OffsetCuspPoint ( SArray< double > & tCusps, double dist ) const
overridevirtual

Find the special points of an offset curve.

Special points of an offset curve are the points where the curvature radius of the initial curve equals to the value of shift of an offset curve.

Parameters
 [in,out] tCusps - An array of parameters of special points. [in] dist - Shift of the offset curve.

Reimplemented from MbCurve.

## ◆ GoThroughPoint()

 bool MbReparamCurve::GoThroughPoint ( MbCartPoint & pnt )
overridevirtual

Create a curve through a point.

Change a curve such that it passes through the given point. Changes should not affect the whole curve. If the curve has any base objects, then the connection with them should not be modified. If the curve cannot be constructed, then the initial curve will not change, false is returned.

Parameters
 [in] pnt - A given point.
Returns
True - if the modification is performed, otherwise - false.

Reimplemented from MbCurve.

## ◆ LengthBetween2Points()

 double MbReparamCurve::LengthBetween2Points ( MbCartPoint & p1, MbCartPoint & p2, MbCartPoint * pc = `nullptr` ) const
overridevirtual

Calculate minimal length of a curve between two points on it.

If a curve is not closed, then the length between points is clearly defined. If a curve is closed, then there is chosen the shortest path from the two possible paths. For a closed curve the desired part may be defined by the control points pc. In this case the such part of a curve is chosen, which is closer to a control point.

Parameters
 [in] p1 - The first point. [in] p2 - The second point [in] pc - A control point
Returns
A length of a curve between points.

Reimplemented from MbCurve.

## ◆ GetSpecificPoint()

 bool MbReparamCurve::GetSpecificPoint ( const MbCartPoint & from, double & dmax, MbCartPoint & pnt ) const
overridevirtual

Return a specific point of a curve.

Return a specific point of a curve if the distance from it to the given point is less than dmax. Specific points of a bounded curve are its start and end points.

Parameters
 [in] from - A control point [in,out] dmax - Input - maximum distance for search of specific point. Output - a distance from the point 'from' to the found specific point. [in,out] pnt - Tangent vector.
Returns
True - if the specific point is found.

Reimplemented from MbCurve.

 double MbReparamCurve::GetRadius ( double accuracy = `PARAM_REGION` ) const
overridevirtual

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

Generally returns 0. A non-zero value may be obtained only when the curve is an arc or is equal to an arc with the set precision (PARAM_REGION by default). \params[in] accuracy - The maximum curve deviation from an arc (PARAM_REGION by default).

Returns
Radius value if it can be obtained or 0.0.

Reimplemented from MbCurve.

## ◆ DistanceAlong()

 bool MbReparamCurve::DistanceAlong ( double & t, double len, int curveDir, double eps = `Math::LengthEps`, VERSION version = `Math::DefaultMathVersion()` ) const
overridevirtual

Translate parameter along the curve.

Translate parameter along the curve by the given distance at the given direction. The new value of parameter is saved in the variable t. If the curve is not closed and the length of its part from the point with parameter t to the end at the given direction is less than the required shift, then calculations are performed on extension of the curve, if it possible to construct such extension.

Parameters
 [in,out] t - Input - the initial value of parameter. Output - the new value of parameter. [in] len - The value of shift along the curve. [in] curveDir - The offset direction. If curveDir is non-negative, then the shift is directed to the side of increasing of parameter. Otherwise - to the side of decreasing of parameter. [in] eps - Computational tolerance. [in] version - Version.
Returns
True - if the operation is performed successfully, otherwise false.

Reimplemented from MbCurve.

## ◆ GetAxisPoint()

 bool MbReparamCurve::GetAxisPoint ( MbCartPoint & p ) const
overridevirtual

Calculate a point to construct an axis.

Calculates a point to construct an axis, if a curve may be constructed by rotation of a point around an axis.

Returns
true, if such axis exists.

Reimplemented from MbCurve.

## ◆ GetProperties()

 void MbReparamCurve::GetProperties ( MbProperties & properties )
overridevirtual

Get properties of the object.

Get internal data (properties) of an object for viewing and modification.

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

Implements MbPlaneItem.

## ◆ SetProperties()

 void MbReparamCurve::SetProperties ( const MbProperties & properties )
overridevirtual

Change properties of the object.

Change internal data (properties) of object is performed by copying of corresponding values from the given object.

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

Implements MbPlaneItem.

## ◆ IsContinuousDerivative()

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

Get properties of the object.

Set properties of the object. Get the basis points of the curve.

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). [out] params - The parameters of the points at which the direction break occurs. [in] epsilon - The accuracy of the calculation.

Reimplemented from MbCurve.

## ◆ SetContinuousDerivativeLength()

 bool MbReparamCurve::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 MbCurve.

## ◆ Trimmed() [2/3]

 virtual MbCurve* MbCurve::Trimmed

Construct a trimmed curve.

Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed curve (or for an arc - exception) three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.

Parameters
 [in] t1 - Parameter corresponding to start of a trimmed curve. [in] t2 - Parameter corresponding to end of a trimmed curve. [in] sense - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. [in] saveParLenAndLaw - Save parametric length and law.
Returns
A constructed trimmed curve.

## ◆ Trimmed() [3/3]

 virtual MbCurve* MbCurve::Trimmed

Construct a trimmed curve with the given two-dimensional accuracy.

Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed curve (or for an arc - exception) three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.

Parameters
 [in] t1 - Parameter corresponding to start of a trimmed curve. [in] t2 - Parameter corresponding to end of a trimmed curve. [in] sense - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. [in] xyEps - Two-dimensional accuracy. It is used for estimations near the points corresponding to the parameters t1 and t2. [in] saveParLenAndLaw - Save parametric length and law.
Returns
A constructed trimmed curve.
Warning
Under development.

## ◆ IsVisibleInRect() [2/2]

 bool MbCurve::IsVisibleInRect
override

Determine visibility of an object in rectangle.

Determine whether an object is visible in the given rectangle. There is a possibility to perform a fast check or more thorough check when the second parameter has a corresponding value.

Parameters
 [in] rect - A given two-dimensional rectangle. [in] exact - Whether to perform a more thorough check.
Returns
true, if the object is fully or partially contained in the rectangle, otherwise false.

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