C3D Toolkit  Kernel - 105435, Vision - 121811.105435
+ Collaboration diagram for Curves:

Classes

class  MbArc3D
 Elliptical arc in three-dimensional space. More...
 
class  MbBSpline
 B-spline set of NURBS-curve. More...
 
class  MbBezier3D
 Bezier spline in three-dimensional space. More...
 
class  MbBridgeCurve3D
 Bridge curve connecting ends of two curves. More...
 
class  MbCharacterCurve3D
 Functionally defined curve. More...
 
class  MbConeSpiral
 Conical spiral. More...
 
class  MbContour3D
 Contour in three-dimensional space. More...
 
class  MbContourOnPlane
 Contour on plane. More...
 
class  MbContourOnSurface
 Contour on surface. More...
 
class  MbCrookedSpiral
 Spiral with a curvilinear axis. More...
 
class  MbCubicSpline3D
 Cubic spline. More...
 
class  MbCurveSpiral
 Spiral with a variable radius. More...
 
class  MbHermit3D
 Composite Hermite cubic spline in three-dimensional space. More...
 
class  MbLine3D
 Line in three-dimensional space. More...
 
class  MbLineSegment3D
 Line segment in three-dimensional space. More...
 
class  MbNurbs3D
 NURBS curve in three-dimensional space. More...
 
class  MbOffsetCurve3D
 Offset curve in three-dimensional space. More...
 
class  MbPlaneCurve
 Plane curve in three-dimensional space. More...
 
class  MbPolyCurve3D
 Curve in three-dimensional space, defined by points. More...
 
class  MbPolyline3D
 Polyline in three-dimensional space. More...
 
class  MbReparamCurve3D
 Reparametrized curve in three-dimensional space. More...
 
class  MbSilhouetteCurve
 Isocline curve or silhouette curve of surface. More...
 
class  MbSpiral
 Spiral. More...
 
class  MbSurfaceCurve
 Curve on surface. More...
 
class  MbSurfaceIntersectionCurve
 Intersection curve of two surfaces. More...
 
class  MbTrimmedCurve3D
 Trimmed curve in three-dimensional space. More...
 
class  MbCurve3D
 Curve in three-dimensional space. More...
 

Functions

MbCurve3DTrimContour (const MbContour3D &cntr, double t1, double t2, int sense, bool useTrimmedOnly)
 Trim a contour. More...
 
void MakeSpaceWireFrame (const MbItem &item, RPArray< MbCurve3D > &wire)
 Create a spatial wireframe by a mesh. More...
 
void MakePlaneWireFrame (const MbItem &item, const MbPlacement3D &place, RPArray< MbCurve3D > &wire)
 Create a planar wireframe by a mesh. More...
 
void MakePlaneVistaWireFrame (const MbItem &item, const MbPlacement3D &place, const MbCartPoint3D &vista, RPArray< MbCurve3D > &wire)
 Create a planar wireframe by a mesh in perspective. More...
 
void MakePlaneWireFrame (const MbItem &item, const MbPlacement3D &place, RPArray< MbCurve > &wire)
 Create a planar wireframe by a mesh. More...
 
void MakePlaneVistaWireFrame (const MbItem &item, const MbPlacement3D &place, const MbCartPoint3D &vista, RPArray< MbCurve > &wire)
 Create a planar wireframe by a mesh in perspective. More...
 
MbeNewtonResult NearestPoints (const MbCurve3D &curve1, bool ext1, const MbCurve3D &curve2, bool ext2, double &t1, double &t2, double &dmin)
 Calculate parameters of the nearest points of two curves. More...
 
MbeNewtonResult CurveCrossNewton (const MbCurve3D &curve1, bool ext1, const MbCurve3D &curve2, bool ext2, double funcEpsilon, size_t iterLimit, double &t1, double &t2)
 Definition of parameters of the nearest points of curves. More...
 
void CalculatePolygon (const MbCurve3D &curve, const MbStepData &stepData, std::vector< std::pair< double, MbCartPoint3D > > &paramPoints)
 Calculate polygon points of curve. More...
 

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

Functions _PointOn, _FirstDer, _SecondDer, _ThirdDer,... do not correct parameter when it is out of domain bounds. When parameter is out of domain bounds, an unclosed curve is extended by tangent vector at corresponding end point in general case. The exceptions are arcs of ellipse and arcs of circle - they are extended according to their equations.

virtual void MbCurve::Explore (double &t, bool ext, MbCartPoint &pnt, MbVector &fir, MbVector *sec, MbVector *thir) const
 Calculate point and derivatives of object for given parameter. More...
 

Functions for curve domain description

virtual bool MbCurve3D::IsClosed () const =0
 Define whether the curve is closed. 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 MbCurve3D::PointOn (double &t, MbCartPoint3D &p) const =0
 Calculate a point on the curve. More...
 
virtual void MbCurve3D::FirstDer (double &t, MbVector3D &) const =0
 Calculate first derivative.
 
virtual void MbCurve3D::SecondDer (double &t, MbVector3D &) const =0
 Calculate second derivative.
 
virtual void MbCurve3D::ThirdDer (double &t, MbVector3D &) const =0
 Calculate third derivative.
 
virtual void MbCurve3D::Tangent (double &t, MbVector3D &) const
 Calculate tangent vector (normalized).
 
virtual void MbCurve3D::Normal (double &t, MbVector3D &) const
 Calculate main normal vector.
 
virtual void MbCurve3D::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 MbCurve3D::_PointOn (double t, MbCartPoint3D &p) const
 Calculate point at curve and its extension. More...
 
virtual void MbCurve3D::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 MbCurve3D::FastApproxExplore (double &t, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec) const
 Calculate point and derivatives on the curve. More...
 
virtual void MbCurve3D::_FirstDer (double t, MbVector3D &) const
 Calculate first derivative at curve and its extension.
 
virtual void MbCurve3D::_SecondDer (double t, MbVector3D &) const
 Calculate second derivative at curve and its extension.
 
virtual void MbCurve3D::_ThirdDer (double t, MbVector3D &) const
 Calculate third derivative at curve and its extension.
 
virtual void MbCurve3D::_Tangent (double t, MbVector3D &) const
 Calculate tangent vector (normalized) at curve and its extension.
 
virtual void MbCurve3D::_Normal (double t, MbVector3D &) const
 Calculate main normal vector (normalized) at curve and its extension.
 
virtual void MbCurve3D::_BNormal (double t, MbVector3D &) const
 Calculate binormal vector (normalized) at curve and its extension.
 

Function of moving by curve

virtual double MbCurve3D::Step (double t, double sag) const
 Calculate parameter step. More...
 
virtual double MbCurve3D::DeviationStep (double t, double ang) const
 Calculate parameter step. More...
 
virtual double MbCurve3D::MetricStep (double t, double length) const
 Calculate parameter step. More...
 
double MbCurve3D::CurveStep (const double &t, const MbStepData &stepData) const
 Calculate parameter step. More...
 

Common function of curve.

virtual MbCurve3DMbCurve3D::NurbsCurve (const MbNurbsParameters &tParameters) const
 Construct a NURBS copy of a curve. More...
 
virtual MbCurve3DMbCurve3D::Trimmed (double t1, double t2, int sense) const
 Construct a trimmed curve. More...
 
virtual double MbCurve3D::CalculateLength (double t1, double t2) const
 Calculate the metric length of a curve. More...
 
virtual bool MbCurve3D::DistanceAlong (double &t, double len, int curveDir, double eps=Math::metricPrecision, VERSION version=Math::DefaultMathVersion()) const
 Translate parameter along the curve. More...
 
virtual bool MbCurve3D::ChangeCarrierBorne (const MbSpaceItem &item, MbSpaceItem &init, const MbMatrix &matr)
 Change the carrier. More...
 
virtual void MbCurve3D::CalculatePolygon (const MbStepData &stepData, MbPolygon3D &poligon) const
 Calculate an array of points for drawing. More...
 
virtual MbeNewtonResult MbCurve3D::PointProjectionNewton (const MbCartPoint3D &p, size_t iterLimit, double &t, bool ext) const
 Find the point projection to the curve. More...
 
virtual bool MbCurve3D::NearPointProjection (const MbCartPoint3D &pnt, double &t, bool ext, MbRect1D *tRange=NULL) const
 Find the point projection to the curve. More...
 
virtual MbeNewtonResult MbCurve3D::IsoclinalNewton (const MbVector3D &dir, size_t iterLimit, double &t) const
 Find isoclines of a curve. More...
 
virtual void MbCurve3D::GetIsoclinal (const MbVector3D &nor, SArray< double > &tIso) const
 Find all isoclines of a curve. More...
 
virtual MbCurveMbCurve3D::GetMap (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 MbCurveMbCurve3D::GetMapPsp (const MbMatrix3D &into, double zNear, MbRect1D *pRegion=NULL) const
 Construct a planar projection of a piece of a space curve. More...
 
virtual MbCurveMbCurve3D::GetProjection (const MbPlacement3D &place, VERSION version) const
 Construct a planar projection of a space curve to a plane. More...
 
bool MbCurve3D::IsSpaceNear (const MbCurve3D &curve, double eps, bool ext, double devSag=5.0 *Math::deviateSag) const
 Check whether the two curves are metrically close. More...
 
MbCartPoint3D MbCurve3D::GetLimitPoint (ptrdiff_t number) const
 Calculate the boundary point. More...
 
void MbCurve3D::GetLimitPoint (ptrdiff_t number, MbCartPoint3D &pnt) const
 Calculate the boundary point. More...
 

Common functions

virtual void MbFunction::Explore (double &t, bool ext, double &val, double &fir, double *sec, double *thr) const
 Calculate value and derivatives of object for given parameter. More...
 

Detailed Description

Function Documentation

◆ TrimContour()

MbCurve3D* TrimContour ( const MbContour3D cntr,
double  t1,
double  t2,
int  sense,
bool  useTrimmedOnly 
)

Trim a contour.

Trim a contour. This function is extended version of contour's function Trimmed.

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]useTrimmedOnly- A truncated segment is always curve MbTrimmedCurve3D.
Returns
A constructed trimmed curve.

◆ MakeSpaceWireFrame()

void MakeSpaceWireFrame ( const MbItem item,
RPArray< MbCurve3D > &  wire 
)

Create a spatial wireframe by a mesh.

Create a spatial wireframe by a mesh.

◆ MakePlaneWireFrame() [1/2]

void MakePlaneWireFrame ( const MbItem item,
const MbPlacement3D place,
RPArray< MbCurve3D > &  wire 
)

Create a planar wireframe by a mesh.

Create a planar wireframe by a mesh.

◆ MakePlaneVistaWireFrame() [1/2]

void MakePlaneVistaWireFrame ( const MbItem item,
const MbPlacement3D place,
const MbCartPoint3D vista,
RPArray< MbCurve3D > &  wire 
)

Create a planar wireframe by a mesh in perspective.

Create a planar wireframe by a mesh in perspective.

◆ MakePlaneWireFrame() [2/2]

void MakePlaneWireFrame ( const MbItem item,
const MbPlacement3D place,
RPArray< MbCurve > &  wire 
)

Create a planar wireframe by a mesh.

Create a planar wireframe by a mesh.

◆ MakePlaneVistaWireFrame() [2/2]

void MakePlaneVistaWireFrame ( const MbItem item,
const MbPlacement3D place,
const MbCartPoint3D vista,
RPArray< MbCurve > &  wire 
)

Create a planar wireframe by a mesh in perspective.

Create a planar wireframe by a mesh in perspective.

◆ Explore() [1/3]

virtual void MbCurve::Explore ( double &  t,
bool  ext,
MbCartPoint pnt,
MbVector fir,
MbVector sec,
MbVector thir 
) const
virtual

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 NULL.
[out]thir- Third derivative with respect to t, if not NULL.

Reimplemented in MbNurbs, MbArc, MbBezier, MbHermit, MbCubicSpline, MbContour, MbProjCurve, MbLineSegment, MbPolyline, MbReparamCurve, MbOffsetCurve, MbLine, MbTrimmedCurve, MbCosinusoid, MbPointCurve, MbCharacterCurve, and MbPolyCurve.

◆ IsClosed()

virtual bool MbCurve3D::IsClosed ( ) const
pure virtual

Define whether the curve is closed.

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

  • 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.
    Returns
    True if a curve is closed.

Implemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbContour3D, MbContourOnSurface, MbOffsetCurve3D, MbReparamCurve3D, MbCrookedSpiral, MbCharacterCurve3D, MbBridgeCurve3D, MbSpiral, MbLineSegment3D, MbPolyCurve3D, MbTrimmedCurve3D, MbPlaneCurve, MbLine3D, and MbBSpline.

◆ PointOn()

virtual void MbCurve3D::PointOn ( double &  t,
MbCartPoint3D p 
) const
pure virtual

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.

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

◆ _PointOn()

virtual void MbCurve3D::_PointOn ( double  t,
MbCartPoint3D p 
) const
virtual

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 in MbArc3D, MbSurfaceIntersectionCurve, MbHermit3D, MbSurfaceCurve, MbContour3D, MbSilhouetteCurve, MbConeSpiral, MbContourOnSurface, MbReparamCurve3D, MbCrookedSpiral, MbLineSegment3D, MbTrimmedCurve3D, MbPlaneCurve, MbLine3D, MbContourOnPlane, and MbCurveSpiral.

◆ Explore() [2/3]

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

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 NULL.
[out]thir- Third derivative with respect to t, if not NULL.

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

◆ FastApproxExplore()

virtual void MbCurve3D::FastApproxExplore ( double &  t,
MbCartPoint3D pnt,
MbVector3D fir,
MbVector3D sec 
) const
virtual

Calculate point and derivatives on the curve.

The function is overloaded in MbSurfaceIntersectionCurve and MbSilhouetteCurve for the fast approximated calculation of a point and derivatives. In other surfaces it is equivalent to the function Explore(t,false,pnt,fir,sec,NULL).

Parameters
[in]t- Parameter.
[out]pnt- A calculated point.
[out]fir- Derivative with respect to t.
[out]sec- Second derivative with respect to t, if not NULL.

Reimplemented in MbSurfaceIntersectionCurve, and MbSilhouetteCurve.

◆ Step()

virtual double MbCurve3D::Step ( double  t,
double  sag 
) const
virtual

Calculate parameter step.

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

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

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

◆ DeviationStep()

virtual double MbCurve3D::DeviationStep ( double  t,
double  ang 
) const
virtual

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 in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbCubicSpline3D, MbHermit3D, MbSurfaceCurve, MbContour3D, MbPolyline3D, MbReparamCurve3D, MbBezier3D, MbSilhouetteCurve, MbContourOnSurface, MbConeSpiral, MbOffsetCurve3D, MbLineSegment3D, MbTrimmedCurve3D, MbPlaneCurve, MbSpiral, MbLine3D, MbCharacterCurve3D, MbBridgeCurve3D, and MbContourOnPlane.

◆ MetricStep()

virtual double MbCurve3D::MetricStep ( double  t,
double  length 
) const
virtual

Calculate parameter step.

Calculate the parameter step for approximation of a curve by the given metric length of a step along a curve.

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

Reimplemented in MbArc3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbContour3D, MbReparamCurve3D, MbConeSpiral, MbLineSegment3D, MbTrimmedCurve3D, MbPlaneCurve, and MbLine3D.

◆ CurveStep()

double MbCurve3D::CurveStep ( const double &  t,
const MbStepData stepData 
) const

Calculate parameter step.

Calculate parameter step for the curve approximation: by diviation sngle; or by its sag value; or by the metric length.

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

◆ NurbsCurve()

virtual MbCurve3D* MbCurve3D::NurbsCurve ( const MbNurbsParameters tParameters) const
virtual

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 NULL in a case of failure.

Reimplemented in MbNurbs3D, MbArc3D, MbCubicSpline3D, MbHermit3D, MbBezier3D, MbPolyline3D, MbReparamCurve3D, MbBridgeCurve3D, MbTrimmedCurve3D, MbLineSegment3D, MbPlaneCurve, and MbLine3D.

◆ Trimmed()

virtual MbCurve3D* MbCurve3D::Trimmed ( double  t1,
double  t2,
int  sense 
) const
virtual

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 or periodic curve 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.
Returns
A constructed trimmed curve.

Reimplemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbHermit3D, MbSurfaceCurve, MbContour3D, MbSilhouetteCurve, MbConeSpiral, MbContourOnSurface, MbReparamCurve3D, MbCrookedSpiral, MbTrimmedCurve3D, MbPlaneCurve, MbLineSegment3D, MbLine3D, MbContourOnPlane, and MbCurveSpiral.

◆ CalculateLength()

virtual double MbCurve3D::CalculateLength ( double  t1,
double  t2 
) const
virtual

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 in MbNurbs3D, MbSurfaceIntersectionCurve, MbContour3D, MbConeSpiral, MbReparamCurve3D, MbPlaneCurve, MbCrookedSpiral, and MbLineSegment3D.

◆ DistanceAlong()

virtual bool MbCurve3D::DistanceAlong ( double &  t,
double  len,
int  curveDir,
double  eps = Math::metricPrecision,
VERSION  version = Math::DefaultMathVersion() 
) const
virtual

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.
Returns
True - if the operation is performed successfully, otherwise false.

Reimplemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbHermit3D, MbCubicSpline3D, MbContour3D, MbBezier3D, MbLineSegment3D, MbReparamCurve3D, MbPlaneCurve, and MbLine3D.

◆ ChangeCarrierBorne()

virtual bool MbCurve3D::ChangeCarrierBorne ( const MbSpaceItem item,
MbSpaceItem init,
const MbMatrix matr 
)
virtual

Change the carrier.

For surface curves. Replaces the current carrier 'item' by a new one, if this is possible. Transforms a carried element by the given matrix.

Parameters
[in]item- An initial carrier.
[in]init- A new carrier.
[in]matr- A matrix for transformation of a carried element.
Returns
True - if the operation is performed successfully, otherwise false.

Reimplemented in MbSurfaceIntersectionCurve, MbSurfaceCurve, and MbContourOnSurface.

◆ CalculatePolygon() [1/2]

virtual void MbCurve3D::CalculatePolygon ( const MbStepData stepData,
MbPolygon3D poligon 
) const
virtual

Calculate an array of points for drawing.

Get an array of drawn points with a given sag. If the cure is a contour then knots of a contour are duplicated.

Parameters
[in]sag- Maximal value of sag.
[in,out]poligon- A polygon of calculated points on a curve.

Reimplemented in MbSurfaceIntersectionCurve, MbReparamCurve3D, MbLine3D, and MbLineSegment3D.

◆ PointProjectionNewton()

virtual MbeNewtonResult MbCurve3D::PointProjectionNewton ( const MbCartPoint3D p,
size_t  iterLimit,
double &  t,
bool  ext 
) const
virtual

Find the point projection to the curve.

Find the point projection to the curve or its extension by the Newton method with the given initial approximation.

Parameters
[in]p- A given point.
[in]iterLimit- The maximum number of iterations.
[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.
Returns
The result of the iterative method.

◆ NearPointProjection()

virtual bool MbCurve3D::NearPointProjection ( const MbCartPoint3D pnt,
double &  t,
bool  ext,
MbRect1D tRange = NULL 
) const
virtual

Find the point projection to the curve.

Find the nearest point projection to the curve or its by the given initial approximation. If the range of parameter changing 'tRange' is set, then find a projection in the given range. A range of parameter may not belong to the domain of a curve. The Newton method is used.

Parameters
[in]pnt- A given point.
[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
True - if there is found a projection which satisfies to all input conditions.

Reimplemented in MbNurbs3D, MbArc3D, MbHermit3D, MbSurfaceCurve, MbContour3D, MbContourOnSurface, MbPolyline3D, MbReparamCurve3D, MbTrimmedCurve3D, MbConeSpiral, MbLine3D, MbLineSegment3D, and MbPlaneCurve.

◆ IsoclinalNewton()

virtual MbeNewtonResult MbCurve3D::IsoclinalNewton ( const MbVector3D dir,
size_t  iterLimit,
double &  t 
) const
virtual

Find isoclines of a curve.

Find the point on a curve where the tangent is parallel to a plane having a normal dir.

Parameters
[in]dir- A vector which defines a plane.
[in]iterLimit- The maximum number of iterations.
[in,out]t- Input - initial approximation, output - parameter of a point of the required tangent.
Returns
The result of the iterative method.

◆ GetIsoclinal()

virtual void MbCurve3D::GetIsoclinal ( const MbVector3D nor,
SArray< double > &  tIso 
) const
virtual

Find all isoclines of a curve.

Find the points on a curve where the tangent is parallel to a plane having a normal nor.

Parameters
[in]nor- A vector which defines a plane.
[out]tIso- An array of parameters of points for the required tangent.

Reimplemented in MbReparamCurve3D.

◆ GetMap()

virtual MbCurve* MbCurve3D::GetMap ( const MbMatrix3D into,
MbRect1D pRegion = NULL,
VERSION  version = Math::DefaultMathVersion(),
bool *  coincParams = NULL 
) const
virtual

Construct a planar projection of a piece of a space curve.

Construct a planar projection of a piece of a space curve.

Parameters
[in]into- The transformation matrix from the global coordinate system into a plane of view.
[in]pRegion- A mapped piece of a curve (paramRegion.x = t1, paramRegion.y = t2), by default - the whole curve..
[in]version- Version, last by default.
[in,out]coincParams- A flag of coincidence between parameterization of initial curve and its projection

if coincParams != NULL then the function tries to create a projection with coincident parameterization
if *coincParams = true then parameterization of projection coincides with parameterization of initial curve.
Returns
Two-dimensional projection of a curve

Reimplemented in MbNurbs3D, MbArc3D, MbSurfaceIntersectionCurve, MbHermit3D, MbCubicSpline3D, MbSurfaceCurve, MbContour3D, MbBezier3D, MbPolyline3D, MbContourOnSurface, MbReparamCurve3D, MbSilhouetteCurve, MbLine3D, MbPlaneCurve, MbConeSpiral, MbLineSegment3D, MbContourOnPlane, MbTrimmedCurve3D, and MbCharacterCurve3D.

◆ GetMapPsp()

virtual MbCurve* MbCurve3D::GetMapPsp ( const MbMatrix3D into,
double  zNear,
MbRect1D pRegion = NULL 
) const
virtual

Construct a planar projection of a piece of a space curve.

Construct a planar projection of a piece of a space curve for the perspective visualization.

Parameters
[in]into- The transformation matrix from the global coordinate system into a plane of view.
[in]zNear- The parameter of the perspective visualization which is equal to the distance between the observation point and the plane of view (negative).
[in]pRegion- A mapped piece of a curve (paramRegion.x = t1, paramRegion.y = t2), by default - the whole curve..
Returns
Two-dimensional projection of a curve

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

◆ GetProjection()

virtual MbCurve* MbCurve3D::GetProjection ( const MbPlacement3D place,
VERSION  version 
) const
virtual

Construct a planar projection of a space curve to a plane.

Construct a planar projection of a space curve to a plane.

Parameters
[in]place- A plane.
[in]version- The version of mathematics.
Returns
Two-dimensional projection of a curve

Reimplemented in MbSurfaceIntersectionCurve.

◆ IsSpaceNear()

bool MbCurve3D::IsSpaceNear ( const MbCurve3D curve,
double  eps,
bool  ext,
double  devSag = 5.0 *Math::deviateSag 
) const

Check whether the two curves are metrically close.

The proximity of curves is defined by equality of their ends and the distance of an arbitrary point of one curve to another curve. Curves may differ parametrically.

Parameters
[in]curve- A curve to compare with.
[in]eps- The maximum allowed distance between the nearest points of two curves.
[in]ext- A flag defines whether the curve 'curve' may be extended when necessary. If ext = true then the curve may be extended.
[in]devSag- Maximal value of sag.
Returns
True - if curves are metrically close.

◆ GetLimitPoint() [1/2]

MbCartPoint3D MbCurve3D::GetLimitPoint ( ptrdiff_t  number) const

Calculate the boundary point.

Calculate 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
A calculated point.

◆ GetLimitPoint() [2/2]

void MbCurve3D::GetLimitPoint ( ptrdiff_t  number,
MbCartPoint3D pnt 
) const

Calculate the boundary point.

Calculate 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]pnt- A calculated point.

◆ NearestPoints()

MbeNewtonResult NearestPoints ( const MbCurve3D curve1,
bool  ext1,
const MbCurve3D curve2,
bool  ext2,
double &  t1,
double &  t2,
double &  dmin 
)

Calculate parameters of the nearest points of two curves.

Calculate parameters of the nearest points of two curves and the distance between these points.

Parameters
[in]curve1- Curve 1.
[in]ext1- An attribute of search on the extension of the curve 1.
[in]curve2- Curve 2.
[in]ext2- An attribute of search on the extension of the curve 2.
[in]t1- A point parameter of curve 1.
[in]t2- A point parameter of curve 2.
[in]dmin- The distance between points of curves.
Returns
Return nr_Success (+1) or nr_Special(0) in a case of successful defining, return nr_Failure(-1) in a case of failure.

◆ CurveCrossNewton()

MbeNewtonResult CurveCrossNewton ( const MbCurve3D curve1,
bool  ext1,
const MbCurve3D curve2,
bool  ext2,
double  funcEpsilon,
size_t  iterLimit,
double &  t1,
double &  t2 
)

Definition of parameters of the nearest points of curves.

Iterative definition of parameters of the nearest points of curves by solving an equation by the Newton method with given initial approximations. If curves intersect and initial approximations are close to the intersection point, then parameters of the intersection point will be found.
If curves do not intersect in the region of initial approximations, then there will be found parameters of curves points where tangents to the curves are orthogonal to the segment which connects the found points.

Parameters
[in]curve1- Curve 1.
[in]ext1- An attribute of search on the extension of the curve 1.
[in]curve2- Curve 2.
[in]ext2- An attribute of search on the extension of the curve 2.
[in]funcEpsilon- The minimal tolerance of the distance between curves intersection points.
[in]iterLimit- The maximum number of iterations.
[in,out]t1- Parameter of the curve 1 for the intersection point (the initial approximation at input).
[in,out]t2- Parameter of the curve 2 for the intersection point (the initial approximation at input).
Returns
Error code: in a case of successful defining nr_Success (+1), nr_Special(0) or nr_Failure(-1) - in a case of failure.

◆ CalculatePolygon() [2/2]

void CalculatePolygon ( const MbCurve3D curve,
const MbStepData stepData,
std::vector< std::pair< double, MbCartPoint3D > > &  paramPoints 
)

Calculate polygon points of curve.

Calculate polygon points of curve.

Parameters
[in]curve- Curve.
[in]sag- Maximal value of sag.
[out]paramPoints- Array of parameters and points.

◆ Explore() [3/3]

virtual void MbFunction::Explore ( double &  t,
bool  ext,
double &  val,
double &  fir,
double *  sec,
double *  thr 
) const
virtual

Calculate value and derivatives of object for given parameter.

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

Parameters
[in]t- Parameter.
[in]ext- On parameters area (false), on extended axis (true).
[out]val- Valuet.
[out]fir- Derivative with respect to t.
[out]sec- Second derivative with respect to t, if not NULL.
[out]thr- Tyhird derivative with respect to t, if not NULL.

Reimplemented in MbCubicFunction, MdCharacterFunction, MbCubicSplineFunction, MbPowerFunction, MbSinusFunction, MbLineFunction, and MbConstFunction.