C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
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 | |
MbCurve3D * | TrimContour (const MbContour3D &cntr, double t1, double t2, int sense, bool useTrimmedOnly, bool saveParamLenAndLaw=false) |
Trim a contour. 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, bool correctNewtonParam=true) |
Definition of parameters of the nearest points of curves. More... | |
void | CalculatePolygon (const MbCurve3D &curve, const MbStepData &stepData, std::vector< std::pair< double, MbCartPoint3D > > ¶mPoints) |
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 periodic. More... | |
virtual bool | MbCurve3D::IsPeriodic () const |
Define whether the curve is periodic. 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 MbCurve3D * | MbCurve3D::NurbsCurve (const MbNurbsParameters &tParameters) const |
Construct a NURBS copy of a curve. More... | |
virtual MbCurve3D * | MbCurve3D::Trimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const |
Construct a trimmed curve. More... | |
virtual MbCurve3D * | MbCurve3D::Trimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const |
Construct a trimmed curve with the given two-dimensional accuracy. 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 &polygon) 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=nullptr) 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 MbCurve * | MbCurve3D::GetMap (const MbMatrix3D &into, MbRect1D *pRegion=nullptr, VERSION version=Math::DefaultMathVersion(), bool *coincParams=nullptr) const |
Construct a planar projection of a piece of a space curve. More... | |
virtual MbCurve * | MbCurve3D::GetMapPsp (const MbMatrix3D &into, double zNear, MbRect1D *pRegion=nullptr) const |
Construct a planar projection of a piece of a space curve. More... | |
virtual MbCurve * | MbCurve3D::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... | |
virtual void | MbCurve3D::GetCurvatureSpecialPoints (std::vector< c3d::DoublePair > &points) const |
Find all the special points of the curvature function of the curve. More... | |
virtual void | MbCurve3D::GetAnalyticalFunctionsBounds (std::vector< double > ¶ms) const |
Get the boundaries of the curve sections that are described by one analytical function. 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... | |
MbCurve3D* TrimContour | ( | const MbContour3D & | cntr, |
double | t1, | ||
double | t2, | ||
int | sense, | ||
bool | useTrimmedOnly, | ||
bool | saveParamLenAndLaw = false |
||
) |
Trim a contour.
Trim a contour. This function is extended version of contour's function Trimmed.
[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. |
|
virtual |
Calculate point and derivatives of object for given parameter.
Values of point and derivatives are calculated on parameter area and on extended curve.
[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 in MbTrimmedCurve, MbReparamCurve, MbProjCurve, MbPolyline, MbPointCurve, MbOffsetCurve, MbNurbs, MbLineSegment, MbLine, MbHermit, MbCubicSpline, MbCosinusoid, MbContour, MbCharacterCurve, MbBezier, and MbArc.
|
pure virtual |
Define whether the curve is periodic.
Define whether the curve is periodic.
A periodic curve is closed. A curve is considered as periodic if:
Implemented in MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbSpiral, MbReparamCurve3D, MbPolyCurve3D, MbPlaneCurve, MbOffsetCurve3D, MbNurbs3D, MbLineSegment3D, MbLine3D, MbCrookedSpiral, MbContourOnSurface, MbContour3D, MbCharacterCurve3D, MbBridgeCurve3D, MbBSpline, and MbArc3D.
|
virtual |
Define whether the curve is periodic.
Define whether the curve is periodic.
A curve is considered as periodic if:
Reimplemented in MbSurfaceIntersectionCurve, and MbNurbs3D.
|
pure virtual |
Calculate a point on the curve.
Correct parameter when getting out of domain bounds and calculate a point on the curve.
[in] | t | - Curve parameter. |
[out] | p | - A point on the curve. |
Implemented in MbCurveSpiral, MbCrookedSpiral, MbConeSpiral, MbBSpline, MbOffsetCurve3D, MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbSilhouetteCurve, MbReparamCurve3D, MbPolyline3D, MbPlaneCurve, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbContourOnSurface, MbContourOnPlane, MbContour3D, MbCharacterCurve3D, MbBridgeCurve3D, MbBezier3D, MbArc3D, and MbCubicSpline3D.
|
virtual |
Calculate point at curve and its extension.
Calculate a point on the curve including the outside area determination parameter.
[in] | t | - Curve parameter. |
[out] | p | - A point on the curve. |
Reimplemented in MbCurveSpiral, MbCrookedSpiral, MbConeSpiral, MbHermit3D, MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbSilhouetteCurve, MbReparamCurve3D, MbPlaneCurve, MbLineSegment3D, MbLine3D, MbContourOnSurface, MbContourOnPlane, MbContour3D, and MbArc3D.
|
virtual |
Calculate point and derivatives of object for given parameter.
Values of point and derivatives are calculated on parameter area and on extended curve.
[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 in MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbSilhouetteCurve, MbReparamCurve3D, MbPolyline3D, MbPlaneCurve, MbOffsetCurve3D, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbCurveSpiral, MbCubicSpline3D, MbCrookedSpiral, MbContourOnSurface, MbContourOnPlane, MbContour3D, MbConeSpiral, MbCharacterCurve3D, MbBridgeCurve3D, MbBezier3D, MbBSpline, and MbArc3D.
|
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,nullptr).
[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 nullptr. |
Reimplemented in MbSurfaceIntersectionCurve, and MbSilhouetteCurve.
|
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.
[in] | t | - A parameter defining the point on a curve, at which a step should be calculated. |
[in] | sag | - Maximum feasible sag value. |
Reimplemented in MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbSpiral, MbReparamCurve3D, MbPolyline3D, MbPlaneCurve, MbOffsetCurve3D, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbCubicSpline3D, MbContourOnSurface, MbContourOnPlane, MbContour3D, MbConeSpiral, MbCharacterCurve3D, MbBridgeCurve3D, MbBezier3D, MbBSpline, and MbArc3D.
|
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.
[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. |
Reimplemented in MbContourOnPlane, MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbSpiral, MbSilhouetteCurve, MbReparamCurve3D, MbPolyline3D, MbPlaneCurve, MbOffsetCurve3D, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbCubicSpline3D, MbContourOnSurface, MbContour3D, MbConeSpiral, MbBridgeCurve3D, MbBezier3D, MbArc3D, and MbCharacterCurve3D.
|
virtual |
Calculate parameter step.
Calculate the parameter step for approximation of a curve by the given metric length of a step along a curve.
[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. |
Reimplemented in MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbReparamCurve3D, MbPlaneCurve, MbLineSegment3D, MbLine3D, MbContour3D, MbConeSpiral, and MbArc3D.
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.
[in] | t | - A parameter defining the point on a curve, at which a step should be calculated. |
[in] | stepData | - Data for step calculation. |
|
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.
[in] | tParameters | - Parameters for the construction of a NURBS copy of the curve. |
Reimplemented in MbTrimmedCurve3D, MbReparamCurve3D, MbPolyline3D, MbPlaneCurve, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbCubicSpline3D, MbBridgeCurve3D, MbBezier3D, and MbArc3D.
|
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.
[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. |
|
virtual |
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 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.
[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] | xyzEps | - Three-dimensional accuracy. |
[in] | saveParLenAndLaw | - Save parametric length and law. |
Reimplemented in MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbSurfaceCurve, MbSilhouetteCurve, MbReparamCurve3D, MbPolyline3D, MbPlaneCurve, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbCurveSpiral, MbCubicSpline3D, MbCrookedSpiral, MbContourOnSurface, MbContourOnPlane, MbContour3D, MbConeSpiral, MbBezier3D, and MbArc3D.
|
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.
[in] | t1 | - Start parameter of a curve section. |
[in] | t2 | - End parameter of a curve section. |
Reimplemented in MbSurfaceIntersectionCurve, MbReparamCurve3D, MbPlaneCurve, MbNurbs3D, MbLineSegment3D, MbCrookedSpiral, MbContour3D, and MbConeSpiral.
|
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.
[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. |
Reimplemented in MbSurfaceIntersectionCurve, MbReparamCurve3D, MbPlaneCurve, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbCubicSpline3D, MbContour3D, MbBezier3D, and MbArc3D.
|
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.
[in] | item | - An initial carrier. |
[in] | init | - A new carrier. |
[in] | matr | - A matrix for transformation of a carried element. |
Reimplemented in MbSurfaceIntersectionCurve, MbContourOnSurface, and MbSurfaceCurve.
|
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.
[in] | stepData | - Data for step calculation. |
[in,out] | polygon | - A polygon of calculated points on a curve. |
Reimplemented in MbSurfaceIntersectionCurve, MbReparamCurve3D, MbLineSegment3D, and MbLine3D.
|
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.
[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. |
|
virtual |
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.
[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. |
Reimplemented in MbConeSpiral, MbTrimmedCurve3D, MbSurfaceCurve, MbReparamCurve3D, MbPolyline3D, MbPlaneCurve, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbContourOnSurface, MbContour3D, and MbArc3D.
|
virtual |
Find isoclines of a curve.
Find the point on a curve where the tangent is parallel to a plane having a normal dir.
[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. |
|
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.
[in] | nor | - A vector which defines a plane. |
[out] | tIso | - An array of parameters of points for the required tangent. |
Reimplemented in MbReparamCurve3D.
|
virtual |
Construct a planar projection of a piece of a space curve.
Construct a planar projection of a piece of a space curve.
[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 != nullptr then the function tries to create a projection with coincident parameterization if *coincParams = true then parameterization of projection coincides with parameterization of initial curve. |
Reimplemented in MbSurfaceIntersectionCurve, MbCharacterCurve3D, MbTrimmedCurve3D, MbSurfaceCurve, MbSilhouetteCurve, MbReparamCurve3D, MbPolyline3D, MbPlaneCurve, MbNurbs3D, MbLineSegment3D, MbLine3D, MbHermit3D, MbCubicSpline3D, MbContourOnSurface, MbContourOnPlane, MbContour3D, MbConeSpiral, MbBezier3D, and MbArc3D.
|
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.
[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.. |
Reimplemented in MbPolyline3D, MbPlaneCurve, MbLineSegment3D, MbLine3D, and MbArc3D.
|
virtual |
Construct a planar projection of a space curve to a plane.
Construct a planar projection of a space curve to a plane.
[in] | place | - A plane. |
[in] | version | - The version of mathematics. |
Reimplemented in MbSurfaceIntersectionCurve, and MbContour3D.
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.
[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. |
|
virtual |
Find all the special points of the curvature function of the curve.
Find all extrema, discontinuity points and inflection points of the curvature function of the curve.
[out] | points | - The array of the found special points of the curvature function. The first field of each element contains the parameter of the found point. The second field of each element contains the curvature values at the found points. These values can be of the following types: 1) = 0.0 - inflection point; \ n 2) < 0.0 - curvature value at the minimum point; \ n 3) > 0.0 - the curvature value at the maximum point; \ n Two points are inserted at the curvature discontinuity, to the left and to the right of the discontinuity. Point with greater curvature is inserted with a plus sign, a point with a lower curvature is inserted with a minus sign. |
Reimplemented in MbTrimmedCurve3D, MbSurfaceIntersectionCurve, MbReparamCurve3D, MbContourOnSurface, and MbContour3D.
|
virtual |
Get the boundaries of the curve sections that are described by one analytical function.
Get the boundaries of the curve sections that are described by one analytical function.
The function was introduced to optimize the implementation of the function MbCurve3D::GetCurvatureSpecialPoints, so as not to calculate the break points.
[out] | params | - Curve parameters in which the analytical function changes. |
Reimplemented in MbTrimmedCurve3D, MbSurfaceCurve, MbReparamCurve3D, MbPlaneCurve, MbNurbs3D, MbHermit3D, MbCubicSpline3D, MbContourOnSurface, MbContour3D, and MbBezier3D.
MbCartPoint3D MbCurve3D::GetLimitPoint | ( | ptrdiff_t | number | ) | const |
Calculate the boundary point.
Calculate the boundary point.
[in] | number | - A number of a boundary point. The value 1 corresponds to the start point of a curve, 2 - to the end point. |
void MbCurve3D::GetLimitPoint | ( | ptrdiff_t | number, |
MbCartPoint3D & | pnt | ||
) | const |
Calculate the boundary point.
Calculate the boundary point.
[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. |
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.
[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. |
MbeNewtonResult CurveCrossNewton | ( | const MbCurve3D & | curve1, |
bool | ext1, | ||
const MbCurve3D & | curve2, | ||
bool | ext2, | ||
double | funcEpsilon, | ||
size_t | iterLimit, | ||
double & | t1, | ||
double & | t2, | ||
bool | correctNewtonParam = true |
||
) |
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.
[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). |
[in] | correctNewtonParam | - Modify current parameter changes by previous parameter changes. |
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.
[in] | curve | - Curve. |
[in] | stepData | - Data for step calculation. |
[out] | paramPoints | - Array of parameters and points. |
|
virtual |
Calculate value and derivatives of object for given parameter.
Values of point and derivatives are calculated on parameter area and on extended axis.
[in] | t | - Parameter. |
[in] | ext | - On parameters area (false), on extended axis (true). |
[out] | val | - Value. |
[out] | fir | - Derivative with respect to t. |
[out] | sec | - Second derivative with respect to t, if not nullptr. |
[out] | thr | - Third derivative with respect to t, if not nullptr. |
Reimplemented in MbSinusFunction, MbServeFunction, MbPowerFunction, MbNurbsFunction, MbMonoSmoothFunction, MbLineFunction, MbCurveCoordinate, MbCubicSplineFunction, MbCubicFunction, MbConstFunction, MbCompositeFunction, MdAnalyticalFunction, and MdCharacterFunction.