C3D Toolkit
Kernel - 117950, Vision - 2.7.5.29
|
Enumerations | |
enum | MbeArcCreateWay { acw_CircleByCenterAndRadius , acw_ArcByCenterAnd2Points , acw_ArcByCenterAnd2Angles , acw_ArcBy3Points , acw_EllipseByCenterAndSemiaxis , acw_EllipseByCenterAnd3Points , acw_EArcByCenterAnd2Points } |
Enumeration of ways to create an ellipse (circle) or their arcs in two-dimensional space. More... | |
enum class | MbeCurveExtensionWays : unsigned int { cew_Linear = 0 , cew_Circular = 1 , cew_CommonNatural = 2 , cew_BaseNatural = 3 , cew_Undefined } |
Enumeration of ways to extend the curve. More... | |
Functions | |
MbResultType | Line (const MbCartPoint &point1, const MbCartPoint &point2, MbCurve *&result) |
Create a line. More... | |
MbResultType | Segment (const MbCartPoint &point1, const MbCartPoint &point2, MbCurve *&result) |
Create a line segment. More... | |
MbResultType | Arc (MbeArcCreateWay createWay, const MbCartPoint ¢er, const c3d::ParamPointsVector &points, double &a, double &b, double &c, bool option, MbCurve *&result) |
Create an ellipse (circle) or an elliptical (circular) arc in the specified way. More... | |
DEPRECATE_DECLARE MbResultType | Arc (const MbCartPoint ¢re, const SArray< MbCartPoint > &points, bool curveClosed, double angle, double &a, double &b, MbCurve *&result) |
MbResultType | SplineCurve (const SArray< MbCartPoint > &pointList, bool curveClosed, MbePlaneType curveType, MbCurve *&result) |
Create a curve passing through a set of points. More... | |
MbResultType | NurbsCurve (const SArray< MbCartPoint > &pointList, const SArray< double > &weightList, size_t degree, const SArray< double > &knotList, bool curveClosed, MbCurve *&result) |
Create a NURBS-curve. More... | |
double | FittingCurve (const std::vector< MbCartPoint > &pointList, bool curveClosed, size_t degree, size_t mode, double &accuracy, MbCurve *&result) |
Create a Nurbs curve with sorting points by distance passing through a set of points. More... | |
MbResultType | NurbsCopy (const MbCurve &curve, MbCurve *&result) |
Create a copy of a curve as a NURBS-curve. More... | |
MbResultType | RegularPolygon (const MbCartPoint ¢re, const MbCartPoint &point, size_t vertexCount, bool describe, MbCurve *&result) |
Create a regular polygon inscribed in a circle or circumscribed around a circle. More... | |
MbResultType | Cosinusoid (const MbCartPoint &point0, const MbCartPoint &point1, const MbCartPoint &point2, double phase, double waveLength, MbCurve *&result) |
Create a cosine curve. More... | |
MbResultType | Cosinusoid (const MbCartPoint &origin, double amplitude, double waveLength, double wavesCount, double phase, MbCurve *&result) |
Create a cosine curve. More... | |
MbResultType | CreateContour (MbCurve &curve, MbContour *&result) |
Create a composite curve (contour). More... | |
MbCurve * | DuplicateCurve (const MbCurve &curve, VERSION version=Math::DefaultMathVersion()) |
Create a copy of a curve. More... | |
MbContour * | DuplicateContour (const MbContour &cntr, bool modifySegments, VERSION version, MbSNameMaker *names=nullptr) |
Create a copy of a contour. More... | |
MbCurve * | OffsetCurve (const MbCurve &curve, double offset1, double offset2, MbeOffsetType type) |
Create an offset curve. More... | |
MbContour * | OffsetContour (const MbContour &cntr, double rad, double xEpsilon, double yEpsilon, bool modifySegments, VERSION version=Math::DefaultMathVersion()) |
Create an offset contour. More... | |
MbContour * | AxisOffsetOpenContour (const MbContour &cntr, const MbCartPoint &q1, const MbCartPoint &q2, double rad, double xEpsilon, double yEpsilon, VERSION version) |
Create an offset contour with start and end points on the rotation axis. More... | |
bool | CurveTrim (MbCurve &curve, double t1, double t2, double eps=METRIC_PRECISION) |
Initialize a curve with new parameters. More... | |
MbResultType | AddCurveToContour (MbCurve &curve, MbContour &contour, bool toEnd, double epsilon=METRIC_REGION) |
Add a curve to a composite curve (a contour). More... | |
MbContour * | MakeContour (std::vector< MbCurve * > &curves, double accuracy, VERSION version=Math::DefaultMathVersion()) |
Create a contour by curves. More... | |
void | CurveSection (const MbCurve3D &curve, const MbPlacement3D &place, SArray< MbCartPoint > &result, RPArray< MbCurve > &resultCurve, VERSION version=Math::DefaultMathVersion()) |
Calculate the intersections of a curve and a surface. More... | |
void | SurfaceSection (const MbSurface &surface, const MbPlacement3D &place, RPArray< MbCurve > &result, VERSION version=Math::DefaultMathVersion()) |
Calculate the intersections of a surface and a plane. More... | |
MbResultType | FaceBoundSegment (const MbFace &face, size_t loopInd, size_t edgeInd, const MbSurface &surface, VERSION version, MbCurve *&result) |
Create a two-dimensional segment on a surface by projection of an oriented edge. More... | |
MbResultType | SurfaceBoundContour (const MbSurface &surface, const MbCurve3D &spaceCurve, VERSION version, MbContour *&result) |
Create a two-dimension boundary of a surface by projection of a space curve. More... | |
bool | IsLikeStraightLine (const MbCurve &curve, double eps) |
Whether the curve is like straight-line regardless of its parameterization. More... | |
MbContour * | DeleteDegenerateSegments (const MbContour &cntr, bool modifySegments, VERSION verison, MbSNameMaker *names=nullptr) |
Delete degenerate segments from contour. More... | |
bool | CreateCenterLineCurves (const MbFace &face, std::vector< MbCurve3D * > &clCurves) |
Create center lines of shell face. More... | |
ptrdiff_t | CircleTanLineLineRad (const MbLine &pl1, const MbLine &pl2, double rad, MbTempCircle *pc) |
Calculate centers of circles. More... | |
ptrdiff_t | CircleTanLineCircleRadius (const MbLine &pl1, const MbArc &pc1, double rad, MbTempCircle *pc) |
Calculate centers of circles. More... | |
ptrdiff_t | CircleTanCircleCircleRad (const MbArc &pc1, const MbArc &pc2, double rad, MbTempCircle *pc) |
Calculate centers of circles. More... | |
void | CircleTanCurveCentre (const MbCurve &pCurve, const MbCartPoint &pnt, PArray< MbTempCircle > &pCircle) |
Create circles. More... | |
void | CircleTangentCurveTwoPoints (const MbCurve &pCurve, const MbCartPoint &on1, const MbCartPoint &on2, PArray< MbTempCircle > &pCircle) |
Create circles. More... | |
void | CircleTangentCurveRPointOn (const MbCurve &pCurve, double radius, const MbCartPoint &on, PArray< MbTempCircle > &pCircle) |
Create circles. More... | |
void | CircleTanTwoCurvesRadius (const MbCurve &pCurve1, const MbCurve &pCurve2, double rad, PArray< MbTempCircle > &pCircle) |
Create circles. More... | |
void | CircleTanTwoCurvesPointOn (const MbCurve &pCurve1, const MbCurve &pCurve2, const MbCartPoint &pOn, PArray< MbTempCircle > &pCircle) |
Create circles. More... | |
void | CircleOriginOneTangentTwo (const MbCurve &pCurve1, const MbCurve &pCurve2, const MbCartPoint &pp, RPArray< MbTempCircle > &pCircle) |
Create circles. More... | |
void | CircleTanCurvePointOnAngle (const MbCurve &curve, const MbCartPoint &p1, double angle, PArray< MbTempCircle > &circles) |
Create circles. More... | |
void | ArcTangentCurveTwoPoints (const MbCurve &pCurve, const MbCartPoint &on1, const MbCartPoint &on2, PArray< MbArc > &arc) |
Create arcs of circles. More... | |
void | ArcTangentCurveRPointOn (const MbCurve &pCurve, double radius, const MbCartPoint &on, PArray< MbArc > &arc) |
Create arcs of circles. More... | |
void | ArcTangentCurveContinue (const MbLine &line, const MbCartPoint &p2, PArray< MbArc > &arc) |
Create a circle arc. More... | |
void | ArcTangentCurveRadContinue (const MbLine &line, double rad, const MbCartPoint &p2, PArray< MbArc > &arc) |
Create a circle arc. More... | |
void | CircleTanThreeCurves (const MbCurve *curve1, const MbCurve *curve2, const MbCurve *curve3, const MbCartPoint &pnt, PArray< MbTempCircle > &circle) |
Create circles. More... | |
void | CreateNewCircles (PArray< MbTempCircle > &cTmp, PArray< MbArc > &pCircle) |
Copy temporary circles. More... | |
void | LineParallelPoint (const MbCartPoint &p, const MbLine &pl, MbLine &pl_par) |
Construct a line parallel to a given line. More... | |
void | LineParallelDistance (double delta, const MbLine &pl, MbLine &pl_par) |
Construct a line parallel to a given line. More... | |
int | LineBisector (const MbCartPoint &p, const MbLine &pl1, const MbLine &pl2, MbLine &pl3) |
Construct a line passing through a given point. More... | |
void | LinePointAngle (double angle, const MbCartPoint &p, const MbLine &pl, MbLine &pl_new) |
Construct a line passing at angle. More... | |
bool | EllipsePntPntDist (const MbCartPoint &p1, const double &l1, const MbCartPoint &p2, double &l2, MbCartPoint &pc, double &angle) |
Construct an ellipse. More... | |
void | LinePointPerpCurve (const MbCartPoint &pnt, const MbCurve &pCurve, PArray< MbLine > &pLine) |
Construct a line passing through a given point. More... | |
int | LinePointTangentCircle (const MbCartPoint &p, const MbCartPoint ¢re, double radius, MbLine *pl) |
Construct a line passing through a given point. More... | |
void | CircleCentreOnCurveRadPointOn (const MbCurve &pCurve, double radius, const MbCartPoint &on, PArray< MbTempCircle > &pCircle) |
Construct a circle. More... | |
void | CircleCentreOnCurveTwoPoints (const MbCurve &pCurve, const MbCartPoint &on1, const MbCartPoint &on2, PArray< MbTempCircle > &pCircle) |
Construct a circle. More... | |
int | Arc2PointsRadius (const MbCartPoint &p1, const MbCartPoint &p2, double rad, bool clockwise, MbArc *arc) |
Construct a circle arc. More... | |
MbCurve * | CanonicToParametricConic (double A, double B, double C, double D, double E, double F, double X1, double Y1, double X2, double Y2) |
Construct curves. More... | |
void | LinePointTangentCurve (const MbCartPoint &pnt, const MbCurve &pCurve, PArray< MbLine > &pLine, bool lineAsCurve=false) |
Construct a line. More... | |
void | LineAngleTangentCurve (double angle, const MbCurve &pCurve, PArray< MbLine > &pLine) |
Construct lines passing at angle. More... | |
ptrdiff_t | LineTan2Circles (const MbCartPoint ¢re1, double radius1, const MbCartPoint ¢re2, double radius2, MbLine *pl, MbCartPoint *sp) |
Construct lines tangent to circles. More... | |
void | LineTangentTwoCurves (const MbCurve *pCurve1, const MbCurve *pCurve2, PArray< MbLine > *pLine, SArray< MbCartPoint > *secodnPnt) |
Construct a tangent line. More... | |
ptrdiff_t | LineAngleTanCircle (double angle, const MbCartPoint ¢re, double radius, MbLine *pLine) |
Construct lines passing at angle. More... | |
void | SwapLines (MbLine &l1, MbLine &l2) |
Swap lines. More... | |
MbCurve * | NurbsConic_1 (const MbCartPoint &mbPoint0, const MbCartPoint &mbPoint1, const MbCartPoint &mbPoint2, double fDiscr) |
Construct a conic section by two points, an angle vertex and a discriminant. More... | |
MbCurve * | NurbsConic_2 (std::vector< MbCartPoint > &vmbConicPoints, const MbCartPoint &mbVertex) |
Construct a conic section by three points, and an angle vertex. More... | |
MbCurve * | NurbsConic_3 (const std::vector< MbCartPoint > &vmbConicPoints, MbVector &mbTangent1, MbVector &mbTangent2) |
Construct a conic section by three points and two inclinations. More... | |
MbCurve * | NurbsConic_4 (const MbCartPoint &mbPoint1, const MbCartPoint &mbPoint2, const MbVector &mbTangent1, const MbVector &mbTangent2, double fDiscr) |
Construct a conic section by two points, two inclinations and a discriminant. More... | |
MbCurve * | NurbsConic_5 (const std::vector< MbCartPoint > &vmbConicPoints, MbVector &mbTangent1, size_t tanPntNb=1) |
Construct a conic section by four points, and an inclination. More... | |
MbCurve * | NurbsConic_6 (const std::vector< MbCartPoint > &vmbConicPoints) |
Construct a conic section by five points. More... | |
void | CreateSmoothFromBezier (const MbBezier &bez, RPArray< MbCurve > &arCurve, bool bline) |
Create a smooth curve from a Bezier curve. More... | |
MbCurve * | ConvertNurbsToCurveOfType (const MbNurbs &nurbs, MbePlaneType type, double eps) |
Create a curve of a given type as NURBS-curve. More... | |
void | CreateSurfaceHide (const MbSurface &surf, const MbPlacement3D &eyePlace, double sag, RPArray< MbCurve > &hideCurves, VERSION version=Math::DefaultMathVersion()) |
Get the array of surface silhouette curves of planar projection. More... | |
template<class Nurbs , class PointsVector , class DoubleVector > | |
bool | CreateNurbsLSMClosed (SPtr< Nurbs > &nurbs, const ptrdiff_t degree, const ptrdiff_t pCount, const PointsVector &aPoints, const DoubleVector &aKnots, const DoubleVector *aParams=nullptr) |
Construction of closed spline. More... | |
template<class Nurbs , class PointsVector , class DoubleVector > | |
bool | CreateNurbsLSM (SPtr< Nurbs > &nurbs, const ptrdiff_t degree, const ptrdiff_t pCount, const PointsVector &aPoints, const DoubleVector &aKnots, const DoubleVector *aParams=nullptr) |
Construction of non-closed spline. More... | |
MbResultType | ApproximatePolylineByNurbs (const MbApproxNurbsParameters< MbCartPoint, MbVector, MbNurbs > ¶m, MbApproxNurbsCurveResult< MbNurbs > &result) |
Approximate 2D points by NURBS curve. More... | |
enum MbeArcCreateWay |
Enumeration of ways to create an ellipse (circle) or their arcs in two-dimensional space.
|
strong |
Enumeration of ways to extend the curve.
MbResultType Line | ( | const MbCartPoint & | point1, |
const MbCartPoint & | point2, | ||
MbCurve *& | result | ||
) |
Create a line.
Create a line given two points.
[in] | point1 | - The first point. |
[in] | point2 | - The second point. |
[out] | result | - The line. |
MbResultType Segment | ( | const MbCartPoint & | point1, |
const MbCartPoint & | point2, | ||
MbCurve *& | result | ||
) |
Create a line segment.
Create a line segment given two points.
[in] | point1 | - The first point. |
[in] | point2 | - The second point. |
[out] | result | - The segment. |
MbResultType Arc | ( | MbeArcCreateWay | createWay, |
const MbCartPoint & | center, | ||
const c3d::ParamPointsVector & | points, | ||
double & | a, | ||
double & | b, | ||
double & | c, | ||
bool | option, | ||
MbCurve *& | result | ||
) |
Create an ellipse (circle) or an elliptical (circular) arc in the specified way.
Create an ellipse (circle) or an elliptical (circular) arc in the specified way.
The input parameters are interpreted according to the selected create way.
[in] | createWay | - Create way. Defines how to interpret the input parameters. |
[in] | center | - Сenter. |
[in] | points | - Endpoints or points through which the curve passes. |
[in,out] | a | - Interpretation of parameter depends on a way of creation of an arc, see enum #ArcCreateWay. |
[in,out] | b | - Interpretation of parameter depends on a way of creation of an arc, see enum #ArcCreateWay. |
[in,out] | с | - Interpretation of parameter depends on a way of creation of an arc, see enum #ArcCreateWay. |
[in] | option | - Interpretation of parameter depends on a way of creation of an arc, see enum #ArcCreateWay. |
[out] | result | - The ellipse (circle) or the elliptical (circular) arc. |
DEPRECATE_DECLARE MbResultType Arc | ( | const MbCartPoint & | centre, |
const SArray< MbCartPoint > & | points, | ||
bool | curveClosed, | ||
double | angle, | ||
double & | a, | ||
double & | b, | ||
MbCurve *& | result | ||
) |
MbResultType SplineCurve | ( | const SArray< MbCartPoint > & | pointList, |
bool | curveClosed, | ||
MbePlaneType | curveType, | ||
MbCurve *& | result | ||
) |
Create a curve passing through a set of points.
Create a curve passing through a set of points that has the following type:
[in] | pointList | - A point set. |
[in] | curveClosed | - A curve closedness. |
[in] | curveType | - A curve type. |
[out] | result | - The curve. |
MbResultType NurbsCurve | ( | const SArray< MbCartPoint > & | pointList, |
const SArray< double > & | weightList, | ||
size_t | degree, | ||
const SArray< double > & | knotList, | ||
bool | curveClosed, | ||
MbCurve *& | result | ||
) |
Create a NURBS-curve.
Create a NURBS-curve given a sequence of control points.
Container 'weightList' can be empty.
Container 'knotList' can be empty.
[in] | pointList | - An array of points. |
[in] | weightList | - An array of weights. |
[in] | degree | - A spline degree. |
[in] | knotList | - An array of parametric knots (A knot vector). |
[in] | curveClosed | - A curve closedness. |
[out] | result | - The spline curve. |
double FittingCurve | ( | const std::vector< MbCartPoint > & | pointList, |
bool | curveClosed, | ||
size_t | degree, | ||
size_t | mode, | ||
double & | accuracy, | ||
MbCurve *& | result | ||
) |
Create a Nurbs curve with sorting points by distance passing through a set of points.
Create a Nurbs curve with sorting points by distance passing through a set of points that has the following type:
[in] | pointList | - The initial curve. |
[in] | curveClosed | - Closure of the curve. |
[in] | degree | - A curve degree (for Nurbs). |
[in] | mode | - A Curve construction option. |
[in/out] | accuracy - Thye desired accuracy / max deviation of constructed curve. | |
[out] | result | - The constructed curve. |
MbResultType NurbsCopy | ( | const MbCurve & | curve, |
MbCurve *& | result | ||
) |
Create a copy of a curve as a NURBS-curve.
Create a copy of a curve as a NURBS-curve.
[in] | curve | - The initial curve. |
[out] | result | - The spline copy of the curve. |
MbResultType RegularPolygon | ( | const MbCartPoint & | centre, |
const MbCartPoint & | point, | ||
size_t | vertexCount, | ||
bool | describe, | ||
MbCurve *& | result | ||
) |
Create a regular polygon inscribed in a circle or circumscribed around a circle.
Create a regular polygon inscribed in a circle (describe == false) or circumscribed around a circle (describe == true) with the specified centre and passing through the given point:
[in] | centre | - A figure centre. |
[in] | point | - A point for the curve construction. |
[in] | vertexCount | - The number of vertices of a regular polygon. |
[in] | describe | - A polygon construction flag: circumscribe the polygon around the circle, inscribe the polygon in the circle (false). |
[out] | result | - The curve creation result. |
MbResultType Cosinusoid | ( | const MbCartPoint & | point0, |
const MbCartPoint & | point1, | ||
const MbCartPoint & | point2, | ||
double | phase, | ||
double | waveLength, | ||
MbCurve *& | result | ||
) |
Create a cosine curve.
Create a cosine curve given the points, phase and wave length.
[in] | point0 | - The origin of local coordinate system (LCS). |
[in] | point1 | - A point on the X-axis of LCS. |
[in] | point2 | - A point on the Y-axis of LCS. |
[in] | phase | - The phase. |
[in] | waveLength | - The wave length. |
[out] | result | - The cosine curve. |
MbResultType Cosinusoid | ( | const MbCartPoint & | origin, |
double | amplitude, | ||
double | waveLength, | ||
double | wavesCount, | ||
double | phase, | ||
MbCurve *& | result | ||
) |
Create a cosine curve.
Create a cosine curve given the points, phase and wave length.
[in] | origin | - The origin of local coordinate system (LCS). |
[in] | amplitude | - The amplitude of the wave. |
[in] | waveLength | - The wave length. |
[in] | wavesCount | - The number of waves. |
[in] | phase | - The phase. |
[out] | result | - The cosine curve. |
MbResultType CreateContour | ( | MbCurve & | curve, |
MbContour *& | result | ||
) |
Create a composite curve (contour).
Create a composite curve (contour) on the basis of the given curve.
[in] | curve | - The initial curve. |
[out] | result | - The contour created on the basis of the curve. |
MbCurve* DuplicateCurve | ( | const MbCurve & | curve, |
VERSION | version = Math::DefaultMathVersion() |
||
) |
Create a copy of a curve.
Create a copy of a curve with substitution of some curves.
[in] | curve | - The initial curve. |
[in] | version | - The version. |
MbContour* DuplicateContour | ( | const MbContour & | cntr, |
bool | modifySegments, | ||
VERSION | version, | ||
MbSNameMaker * | names = nullptr |
||
) |
Create a copy of a contour.
Create a copy of a contour with substitution of some curves and its modification according to the flag. Modification is a merging of similar curves and deleting of degenerate ones.
[in] | cntr | - The initial contour. |
[in] | modifySegments | - The flag determines whether segments can be replaced or merged. |
[in] | version | - The version. |
[in] | names | - An object defining the names synchronized with contour. |
MbCurve* OffsetCurve | ( | const MbCurve & | curve, |
double | offset1, | ||
double | offset2, | ||
MbeOffsetType | type | ||
) |
Create an offset curve.
Create the offset curve for a given curve with offset in the begin and the end points.
[in] | curve | - Base curve. |
[in] | offset1 | - Offset distance on point Tmin of base curve. |
[in] | offset2 | - Offset distance on point Tmax of base curve. |
[in] | type | - The offset type: constant, or linear, or cubic. |
MbContour* OffsetContour | ( | const MbContour & | cntr, |
double | rad, | ||
double | xEpsilon, | ||
double | yEpsilon, | ||
bool | modifySegments, | ||
VERSION | version = Math::DefaultMathVersion() |
||
) |
Create an offset contour.
Create the offset contour for a given contour.
[in] | cntr | - The initial contour. |
[in] | rad | - The offset value. |
[in] | xEpsilon | - Tolerance in x direction. |
[in] | yEpsilon | - Tolerance in y direction. |
[in] | modifySegments | - The flag determines whether segments can be replaced or merged. |
[in] | version | - The version. |
MbContour* AxisOffsetOpenContour | ( | const MbContour & | cntr, |
const MbCartPoint & | q1, | ||
const MbCartPoint & | q2, | ||
double | rad, | ||
double | xEpsilon, | ||
double | yEpsilon, | ||
VERSION | version | ||
) |
Create an offset contour with start and end points on the rotation axis.
Create an open offset contour with start and end points on the rotation axis.
It is considered that if one closes the contour, it will be oriented counterclockwise.
[in] | cntr | - The initial contour. |
[in] | q1 | - The start point of the rotation axis. |
[in] | q2 | - The end point of the rotation axis. |
[in] | rad | - The offset value. |
[in] | xEpsilon | - Tolerance in x direction. |
[in] | yEpsilon | - Tolerance in y direction. |
[in] | version | - The version. |
bool CurveTrim | ( | MbCurve & | curve, |
double | t1, | ||
double | t2, | ||
double | eps = METRIC_PRECISION |
||
) |
Initialize a curve with new parameters.
Initialize a curve with new parameters.
[in,out] | curve | - The curve to be modified. |
[in] | t1 | - A new start parameter. |
[in] | t2 | - A new end parameter. |
[in] | eps | - Tolerance. |
MbResultType AddCurveToContour | ( | MbCurve & | curve, |
MbContour & | contour, | ||
bool | toEnd, | ||
double | epsilon = METRIC_REGION |
||
) |
Add a curve to a composite curve (a contour).
Add a curve to a composite curve (a contour) 'contour'.
If toEnd == true, the curve is to be added to the end.
If toEnd == false, the curve is to be added to the beginning.
[in] | curve | - A curve to be added. |
[in,out] | contour | - A contour to be modified. |
[in] | toEnd | - The flag determines the place of the curve in the contour. |
[in] | epsilon | - The Proximity of the junction points. |
MbContour* MakeContour | ( | std::vector< MbCurve * > & | curves, |
double | accuracy, | ||
VERSION | version = Math::DefaultMathVersion() |
||
) |
Create a contour by curves.
Curves will be added to the contour, it is possible to invert the direction of some curves. Unused curves will be deleted.
[in] | curve | - Curves of the contour. |
[in] | accuracy | - The maximum distance of segment points at the junction. |
void CurveSection | ( | const MbCurve3D & | curve, |
const MbPlacement3D & | place, | ||
SArray< MbCartPoint > & | result, | ||
RPArray< MbCurve > & | resultCurve, | ||
VERSION | version = Math::DefaultMathVersion() |
||
) |
Calculate the intersections of a curve and a surface.
Calculate the intersections of a curve and a surface.
The result is an array of points or an array of two-dimensional curves on the plane.
[in] | curve | - The curve. |
[in] | place | - The plane coordinate system. |
[out] | result | - The array of points on the plane. |
[out] | resultCurve | - The array of curves on the plane. |
[in] | version | - The version. |
void SurfaceSection | ( | const MbSurface & | surface, |
const MbPlacement3D & | place, | ||
RPArray< MbCurve > & | result, | ||
VERSION | version = Math::DefaultMathVersion() |
||
) |
Calculate the intersections of a surface and a plane.
Calculate the intersections of a surface and a plane.
The result is an array of curves on the surface and two-dimensional curves on the plane.
[in] | surface | - A surface. |
[in] | place | - The plane coordinate system. |
[out] | result | - The array of curves on the plane. |
[in] | version | - The version. |
MbResultType FaceBoundSegment | ( | const MbFace & | face, |
size_t | loopInd, | ||
size_t | edgeInd, | ||
const MbSurface & | surface, | ||
VERSION | version, | ||
MbCurve *& | result | ||
) |
Create a two-dimensional segment on a surface by projection of an oriented edge.
Create a two-dimensional segment on a surface by projection of an oriented edge.
The result is a two-dimensional curve in the parametric domain of the given surface.
[in] | face | - A face defined on the surface. |
[in] | loopInd | - The number of a loop in the face. |
[in] | edgeInd | - Index of the edge in the loop to be projected. |
[in] | surface | - A surface to project on. |
[in] | version | - Version. |
[out] | result | - A two-dimensional curve. |
MbResultType SurfaceBoundContour | ( | const MbSurface & | surface, |
const MbCurve3D & | spaceCurve, | ||
VERSION | version, | ||
MbContour *& | result | ||
) |
Create a two-dimension boundary of a surface by projection of a space curve.
Create a two-dimension boundary of a surface by projection of a space curve
(the boundary space curves are considered to belong to the surface)
[in] | surface | - A surface. |
[in] | spaceCurve | - A space curve. |
[in] | version | - Version. |
[out] | result | - The two-dimensional contour on the surface. |
bool IsLikeStraightLine | ( | const MbCurve & | curve, |
double | eps | ||
) |
Whether the curve is like straight-line regardless of its parameterization.
Whether the curve is like straight-line regardless of its parameterization.
[in] | curve | - Curve. |
[in] | eps | - Accuracy. |
MbContour* DeleteDegenerateSegments | ( | const MbContour & | cntr, |
bool | modifySegments, | ||
VERSION | verison, | ||
MbSNameMaker * | names = nullptr |
||
) |
Delete degenerate segments from contour.
Delete degenerate segments from contour with substitution of some curves and its modification according to the flag.
[in] | cntr | - The initial contour. |
[in] | modifySegments | - The flag determines whether segments can be replaced. |
[in] | version | - The version. |
[in] | names | - An object defining the names synchronized with contour. |
Create center lines of shell face.
Create center lines of shell face.
[in] | face | - The initial face. |
[out] | clCurves | - The set of created center lines. |
ptrdiff_t CircleTanLineLineRad | ( | const MbLine & | pl1, |
const MbLine & | pl2, | ||
double | rad, | ||
MbTempCircle * | pc | ||
) |
Calculate centers of circles.
Calculate centers of circles with fixed radius rad, that touches two given lines pl1 and pl2.
[in] | pl1 | - First line. |
[in] | pl2 | - Second line |
[in] | rad | - Radius of circle. |
[out] | pc | - Result - set of circles with required center. |
ptrdiff_t CircleTanLineCircleRadius | ( | const MbLine & | pl1, |
const MbArc & | pc1, | ||
double | rad, | ||
MbTempCircle * | pc | ||
) |
Calculate centers of circles.
Calculate centers of circles with fixed radius rad, that touches given line pl1 and circle pc1.
[in] | pl1 | - Line. |
[in] | pc1 | - Circle. |
[in] | rad | - Result - set of circles with the required center. |
[out] | pc | - Result - set of circles with the required center. |
ptrdiff_t CircleTanCircleCircleRad | ( | const MbArc & | pc1, |
const MbArc & | pc2, | ||
double | rad, | ||
MbTempCircle * | pc | ||
) |
Calculate centers of circles.
Calculate centers of circles with fixed radius rad, that touches given circles pc1 and pc2.
[in] | pc1 | - First circle. |
[in] | pc2 | - Second circle. |
[in] | rad | - Radius of circles with the required center. |
[out] | pc | - Result - set of circles with the required center. |
void CircleTanCurveCentre | ( | const MbCurve & | pCurve, |
const MbCartPoint & | pnt, | ||
PArray< MbTempCircle > & | pCircle | ||
) |
Create circles.
Create circles with given center, that touches given curve.
[in] | pCurve | - Curve, that touches circle. |
[in] | pnt | - Center of circle. |
[out] | pCircle | - Set of circles. |
void CircleTangentCurveTwoPoints | ( | const MbCurve & | pCurve, |
const MbCartPoint & | on1, | ||
const MbCartPoint & | on2, | ||
PArray< MbTempCircle > & | pCircle | ||
) |
Create circles.
Create circles that touch given curve and pass through given two points.
[in] | pCurve | - Curve, that touches circle. |
[in] | on1 | - Point on circle. |
[in] | on2 | - Point on circle. |
[out] | pCircle | - Set of circles. |
void CircleTangentCurveRPointOn | ( | const MbCurve & | pCurve, |
double | radius, | ||
const MbCartPoint & | on, | ||
PArray< MbTempCircle > & | pCircle | ||
) |
Create circles.
Create circles that touch given curve and with a given radius, passing through a given point.
[in] | pCurve | - Curve that touches circle. |
[in] | radius | - Radius. |
[in] | on | - Point on circle. |
[out] | pCircle | - A set of circles. |
void CircleTanTwoCurvesRadius | ( | const MbCurve & | pCurve1, |
const MbCurve & | pCurve2, | ||
double | rad, | ||
PArray< MbTempCircle > & | pCircle | ||
) |
Create circles.
Create circles with a given radius that touch two curves.
[in] | pCurve1 | - The first curve that touches circle. |
[in] | pCurve2 | - The second curve, that touches circle. |
[in] | rad | - Radius. |
[out] | pCircle | - A set of circles. |
void CircleTanTwoCurvesPointOn | ( | const MbCurve & | pCurve1, |
const MbCurve & | pCurve2, | ||
const MbCartPoint & | pOn, | ||
PArray< MbTempCircle > & | pCircle | ||
) |
Create circles.
Create circles that pass through given point and touch two curves.
[in] | pCurve1 | - The first curve, that touches circle. |
[in] | pCurve2 | - The second curve that touches circle. |
[in] | pOn | - Point on circle. |
[out] | pCircle | - A set of circles. |
void CircleOriginOneTangentTwo | ( | const MbCurve & | pCurve1, |
const MbCurve & | pCurve2, | ||
const MbCartPoint & | pp, | ||
RPArray< MbTempCircle > & | pCircle | ||
) |
Create circles.
Create circles with center on the first curve that touches second curve and passes through the given point.
[in] | pCurve1 | - The first curve which contains center of circle. |
[in] | pCurve2 | - The second curve that touches circle. |
[in] | pp | - Point on circle. |
[out] | pCircle | - A set of circles. |
void CircleTanCurvePointOnAngle | ( | const MbCurve & | curve, |
const MbCartPoint & | p1, | ||
double | angle, | ||
PArray< MbTempCircle > & | circles | ||
) |
Create circles.
Create circles that touch given curve and pass through given point, with angle(p1, centre, ptan) at tangent point that equal to the given one.
[in] | curve | - Curve that touches the circle. |
[in] | p1 | - Point on circle. |
[in] | angle | - Angle formed by three points: given point on circle p1, center of circle, tangent point. |
[out] | circles | - A set of circles. |
void ArcTangentCurveTwoPoints | ( | const MbCurve & | pCurve, |
const MbCartPoint & | on1, | ||
const MbCartPoint & | on2, | ||
PArray< MbArc > & | arc | ||
) |
Create arcs of circles.
Create arcs of circles by two points that touches given curve.
[in] | pCurve | - Curve that touches arcs. |
[in] | on1 | - First point on arc. |
[in] | on2 | - Second point on arc. |
[out] | arc | - Set of arcs. |
void ArcTangentCurveRPointOn | ( | const MbCurve & | pCurve, |
double | radius, | ||
const MbCartPoint & | on, | ||
PArray< MbArc > & | arc | ||
) |
Create arcs of circles.
Create arcs of circles by radius and point that touch given curve.
[in] | pCurve | - Curve that touches arcs. |
[in] | radius | - Radius. |
[in] | on | - Point on arc. |
[out] | arc | - Set of arcs. |
void ArcTangentCurveContinue | ( | const MbLine & | line, |
const MbCartPoint & | p2, | ||
PArray< MbArc > & | arc | ||
) |
Create a circle arc.
Create arc of circle conjugated with the given bounded curve at the start point or at the end point. An arc always starts at curve.
[in] | line | - Curve to conjugate with. |
[in] | p2 | - Point on arc. |
[out] | arc | - A set that contains the arc of circle. |
void ArcTangentCurveRadContinue | ( | const MbLine & | line, |
double | rad, | ||
const MbCartPoint & | p2, | ||
PArray< MbArc > & | arc | ||
) |
Create a circle arc.
Create an arc of circle with the given radius conjugated with the given bounded curve at the start point or at the end point. An arc always starts at curve.
[in] | line | - Curve to conjugate with. |
[in] | rad | - Radius. |
[in] | p2 | - Point on arc. |
[out] | arc | - A set that contains the arc of circle. |
void CircleTanThreeCurves | ( | const MbCurve * | curve1, |
const MbCurve * | curve2, | ||
const MbCurve * | curve3, | ||
const MbCartPoint & | pnt, | ||
PArray< MbTempCircle > & | circle | ||
) |
Create circles.
Create circles that touch three curves.
[in] | curve1 | - The first curve. |
[in] | curve2 | - The second curve. |
[in] | curve3 | - The third curve. |
[in] | pnt | - A point on perpendicular to curve at the tangent point. Used for those of the given three curves which are not segment, line or polyline. |
[out] | circle | - A set of circles. |
void CreateNewCircles | ( | PArray< MbTempCircle > & | cTmp, |
PArray< MbArc > & | pCircle | ||
) |
Copy temporary circles.
Copy temporary circles.
Clear temporary array cTmp.
[in,out] | cTmp | - Set of temporary circles. Array will be cleared. |
[out] | pCircle | - Set of arcs of circles, created by temporary circles. |
void LineParallelPoint | ( | const MbCartPoint & | p, |
const MbLine & | pl, | ||
MbLine & | pl_par | ||
) |
Construct a line parallel to a given line.
Construct a line parallel to a given line and passing through a given point.
[in] | p | - The point on the line. |
[in] | pl | - The parallel line. |
[out] | pl_par | - The result - the line parallel to the line pl and passing through the point p. |
Construct a line parallel to a given line.
Construct a line parallel to a given line at a given distance from it.
[in] | delta | - The distance to the parallel line. |
[in] | pl | - The parallel line. |
[out] | pl_par | - The result - the line parallel to the line pl at a given distance delta. |
int LineBisector | ( | const MbCartPoint & | p, |
const MbLine & | pl1, | ||
const MbLine & | pl2, | ||
MbLine & | pl3 | ||
) |
Construct a line passing through a given point.
Construct a line passing through a given point and being a bisector of angle between two given lines.
[in] | p | - The point on the line. |
[in] | pl1 | - The line defining the angle side. |
[in] | pl2 | - The line defining the angle side. |
[out] | pl3 | - The result. |
void LinePointAngle | ( | double | angle, |
const MbCartPoint & | p, | ||
const MbLine & | pl, | ||
MbLine & | pl_new | ||
) |
Construct a line passing at angle.
Construct a line at an angle to a given line and passing through a given point.
[in] | angle | - The angle. |
[in] | p | - The point on the line. |
[in] | pl | - The line at the given angle to the created line. |
[out] | pl_new | - The result - the created line. |
bool EllipsePntPntDist | ( | const MbCartPoint & | p1, |
const double & | l1, | ||
const MbCartPoint & | p2, | ||
double & | l2, | ||
MbCartPoint & | pc, | ||
double & | angle | ||
) |
Construct an ellipse.
Construct an ellipse.
The finite point and the length of the first semi-axis are fixed. The end point of the second semi-axis is put in. Calculate the length of the second semi-axis, ellipse center and inclination angle of the first semi-axis.
[in] | p1 | - The end point of the first semi-axis. |
[in] | l1 | - The length of the first semi-axis. |
[in] | p2 | - The end point of the second semi-axis. |
[out] | l2 | - The length of the second semi-axis. |
[out] | pc | - The ellipse center. |
[out] | angle | - The inclination angle of the first semi-axis. |
void LinePointPerpCurve | ( | const MbCartPoint & | pnt, |
const MbCurve & | pCurve, | ||
PArray< MbLine > & | pLine | ||
) |
Construct a line passing through a given point.
Construct a line passing through a point and perpendicular to a given curve.
A line origin is coincident with intersection point.
[in] | pnt | - The point on the line. |
[in] | pCurve | - The perpendicular line. |
[out] | pLine | - The result - the array of lines. |
int LinePointTangentCircle | ( | const MbCartPoint & | p, |
const MbCartPoint & | centre, | ||
double | radius, | ||
MbLine * | pl | ||
) |
Construct a line passing through a given point.
Construct a line passing through a point and tangent to a given circle with given center and radius.
[in] | p | - The point on the line. |
[in] | centre | - The circle center. |
[in] | radius | - The circle radius. |
[out] | pl | - The result - the array of lines. |
void CircleCentreOnCurveRadPointOn | ( | const MbCurve & | pCurve, |
double | radius, | ||
const MbCartPoint & | on, | ||
PArray< MbTempCircle > & | pCircle | ||
) |
Construct a circle.
Construct a circle by radius and coincident point, a circle center lies on a given curve.
[in] | pCurve | - The curve containing the circle center. |
[in] | radius | - The circle radius. |
[in] | on | - The point on the circle. |
[out] | pCircle | - The result - the set of circles. |
void CircleCentreOnCurveTwoPoints | ( | const MbCurve & | pCurve, |
const MbCartPoint & | on1, | ||
const MbCartPoint & | on2, | ||
PArray< MbTempCircle > & | pCircle | ||
) |
Construct a circle.
Construct a circle by two points, with a center lying on a given curve.
[in] | pCurve | - The curve containing the circle center. |
[in] | on1 | - The point on the circle. |
[in] | on2 | - The point on the circle. |
[out] | pCircle | - The result - the set of circles. |
int Arc2PointsRadius | ( | const MbCartPoint & | p1, |
const MbCartPoint & | p2, | ||
double | rad, | ||
bool | clockwise, | ||
MbArc * | arc | ||
) |
Construct a circle arc.
Construct a circle arc by two points, radius and direction.
[in] | p1 | - The point on the circle. |
[in] | p2 | - The point on the circle. |
[in] | rad | - The circle radius. |
[in] | clockwise | - The attribute of counterclockwise direction. |
[out] | arc | - The result - the array of circles. |
MbCurve* CanonicToParametricConic | ( | double | A, |
double | B, | ||
double | C, | ||
double | D, | ||
double | E, | ||
double | F, | ||
double | X1, | ||
double | Y1, | ||
double | X2, | ||
double | Y2 | ||
) |
Construct curves.
Construct curves by conic section coefficients.
[in] | A,B,C,D,E,F | - The coefficients of the conic section equation A*x^2 + B*x*y + C*y^2 + D*x + E*y + F = 0. |
[in] | X1,Y1 | - The first boundary point coordinates. |
[in] | X2,Y2 | - The second boundary point coordinates. |
void LinePointTangentCurve | ( | const MbCartPoint & | pnt, |
const MbCurve & | pCurve, | ||
PArray< MbLine > & | pLine, | ||
bool | lineAsCurve = false |
||
) |
Construct a line.
Construct a line passing through a point and tangent to a given curve.
A line origin is coincident with a tangency point.
[in] | pnt | - The point which the line passing through. |
[in] | pCurve | - The curve which the constructed line should be tangent to. |
[out] | pLine | - The set of lines. |
[in] | lineAsCurve | - Work with MbLline, MbPolyline, MbLineSegment as with MbCurve. |
Construct lines passing at angle.
Construct lines at angle "angle" to the axis OX and tangent to the curve.
A line origin is coincident with a tangency point.
[in] | angle | - The angle to the abscissa axis. |
[in] | pCurve | - The curve which the constructed line should be tangent to. |
[out] | pLine | - The set of lines. |
ptrdiff_t LineTan2Circles | ( | const MbCartPoint & | centre1, |
double | radius1, | ||
const MbCartPoint & | centre2, | ||
double | radius2, | ||
MbLine * | pl, | ||
MbCartPoint * | sp | ||
) |
Construct lines tangent to circles.
Construct lines tangent to two circles. with given centers and radii.
A line origin is coincident with a point of tangency with the first circle. Function constructs from 0 to 4 variables.
[in] | centre1 | - The center of the first circle. |
[in] | radius1 | - The radius of the first circle. |
[in] | centre2 | - The center of the second circle. |
[in] | radius2 | - The radius of the second circle. |
[out] | pl | - The result - the array of lines. |
[out] | sp | - The array of tangency points on the second curve. |
void LineTangentTwoCurves | ( | const MbCurve * | pCurve1, |
const MbCurve * | pCurve2, | ||
PArray< MbLine > * | pLine, | ||
SArray< MbCartPoint > * | secodnPnt | ||
) |
Construct a tangent line.
Construct a line tangent to two curves.
A line origin is coincident with a point of tangency on the first curve.
[in] | pCurve1 | - The first curve which the constructed line should be tangent to. |
[in] | pCurve2 | - The second curve the constructed line should be tangent to. |
[out] | pLine | - The result - the array of lines. |
[out] | secodnPnt | - The array of tangency points on the second curve. |
ptrdiff_t LineAngleTanCircle | ( | double | angle, |
const MbCartPoint & | centre, | ||
double | radius, | ||
MbLine * | pLine | ||
) |
Construct lines passing at angle.
Construct lines at angle "angle" to the axis OX, tangent to a circle with the given center and radius.
[in] | angle | - The angle. |
[in] | centre | - The circle center. |
[in] | radius | - The circle radius. |
[out] | pLine | - The result - the array of lines. |
Swap lines.
Swap lines.
[in] | l1 | - The first line. |
[in] | l2 | - The second line. |
MbCurve* NurbsConic_1 | ( | const MbCartPoint & | mbPoint0, |
const MbCartPoint & | mbPoint1, | ||
const MbCartPoint & | mbPoint2, | ||
double | fDiscr | ||
) |
Construct a conic section by two points, an angle vertex and a discriminant.
Construction of a conic section as a NURBS curve of the third degree by two points setting ends of a curve, a vertex of enginer triangle and a discriminant which is used for the definition of the third point.
[in] | mbPoint0 | - Coordinates of the conic start point. |
[in] | mbPoint1 | - Coordinates of the vertex of angle which should be inscribed into the conic. |
[in] | mbPoint2 | - Coordinates of the conic end point. |
[in] | fDiscr | - The discriminant is less than 1. Otherwise it will be set to 0.99999999 automatically. |
MbCurve* NurbsConic_2 | ( | std::vector< MbCartPoint > & | vmbConicPoints, |
const MbCartPoint & | mbVertex | ||
) |
Construct a conic section by three points, and an angle vertex.
Construction of a conic section as a NURBS curve of the third degree by three points: ends of a curve, its average point and by a vertex of an angle, a conic should be inscribed in.
[in] | vmbConicPoints | - The container for points of a conic: start point, average point and end point; there should be exactly 3 points. |
[in] | mbVertex | - Coordinates of the vertex of angle which should be inscribed into the conic. |
MbCurve* NurbsConic_3 | ( | const std::vector< MbCartPoint > & | vmbConicPoints, |
MbVector & | mbTangent1, | ||
MbVector & | mbTangent2 | ||
) |
Construct a conic section by three points and two inclinations.
Construction of a conic section as a NURBS curve of the third degree by 3 points setting begin, end and an average point of a curve and two inclinations outgoing from the start point and from the end point
[in] | vmbConicPoints | - The container for points of a conic: start point, average point and end point; there should be exactly 3 points. |
[in] | mbTangent1 | - Inclination at start of a curve. |
[in] | mbTangent2 | - Inclination at end of a curve. |
MbCurve* NurbsConic_4 | ( | const MbCartPoint & | mbPoint1, |
const MbCartPoint & | mbPoint2, | ||
const MbVector & | mbTangent1, | ||
const MbVector & | mbTangent2, | ||
double | fDiscr | ||
) |
Construct a conic section by two points, two inclinations and a discriminant.
Construction of a conic section as a NURBS curve of the third degree by 2 points setting start and end of a curve, two incllinations outgoing from these points and a discriminant.
[in] | mbPoint1 | - Coordinates of the conic start point. |
[in] | mbPoint2 | - Coordinates of the conic end point. |
[in] | mbTangent1 | - Inclination at start of conic. |
[in] | mbTangent2 | - Inclination at end of conic. |
[in] | fDiscr | - The discriminant is less than 1. Otherwise it will be set to 0.99999999 automatically. |
MbCurve* NurbsConic_5 | ( | const std::vector< MbCartPoint > & | vmbConicPoints, |
MbVector & | mbTangent1, | ||
size_t | tanPntNb = 1 |
||
) |
Construct a conic section by four points, and an inclination.
Construction of a conic section as a NURBS curve of the third degree by 4 points and inclination in the first of them.
By substituting of start points in the common equation of the conic Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 and its tangent at the start point (x1, y1): (2Ax1 + By1 + D)(x - x1) + (2Cy1 + Bx1 + E)(y - y1) = 0 we get the SLAE. Having SLAE solved relative to parameters A,B,C,D,E we find the required conic.
[in] | vmbConicPoints | - The container for points of a conic: the first point is start point, the last point is end point. there should be exactly 4 points. |
[in] | mbTangent1 | - Inclination at point of conic. |
[in] | tanPntNb | - Point number at which the inclination is specified. |
MbCurve* NurbsConic_6 | ( | const std::vector< MbCartPoint > & | vmbConicPoints | ) |
Construct a conic section by five points.
Construction of a conic section as a NURBS curve of the third degree by 5 points.
By substituting of start points in the common equation of the conic Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 we get the SLAE. Having SLAE solved relative to parameters A,B,C,D,E we find the required conic.
[in] | vmbConicPoints | - The container for points of a conic: the first point is start point, the last point is end point. there should be exactly 5 points. |
Create a smooth curve from a Bezier curve.
A NURBS of the fourth degree is created by an initial Bezier curve . Thereafter the NURBS is splitted in internal knots of triple multiplicity if they exist
If 'bline' is true then the degeneration into a line is checked. If the considered segment or the entire curve is a line then it is trandformed into a line.
[in] | bez | - Bezier curve |
[out] | arCurve | - The array of created curves. |
[in] | bline | - The flag for the check of degeneration into a line. |
MbCurve* ConvertNurbsToCurveOfType | ( | const MbNurbs & | nurbs, |
MbePlaneType | type, | ||
double | eps | ||
) |
Create a curve of a given type as NURBS-curve.
It works for the two types: 'pt_LineSegment' and 'pt_Arc'. If approximation with the given tolerance has failed then the function returns nullptr.
[in] | nurbs | - The initial NURBS-curve. |
[in] | type | - The type of a curve which is required to create. |
[in] | eps | - The tolerance of approximation. |
void CreateSurfaceHide | ( | const MbSurface & | surf, |
const MbPlacement3D & | eyePlace, | ||
double | sag, | ||
RPArray< MbCurve > & | hideCurves, | ||
VERSION | version = Math::DefaultMathVersion() |
||
) |
Get the array of surface silhouette curves of planar projection.
Get the array of surface silhouette curves of planar projection.
bool CreateNurbsLSMClosed | ( | SPtr< Nurbs > & | nurbs, |
const ptrdiff_t | degree, | ||
const ptrdiff_t | pCount, | ||
const PointsVector & | aPoints, | ||
const DoubleVector & | aKnots, | ||
const DoubleVector * | aParams = nullptr |
||
) |
Construction of closed spline.
Construction of closed spline which approximates a set of points by the method of least squares.
[in,out] | nurbs | - Modifiable spline. |
[in] | aDegree | - The spline order. |
[in] | pCount | - Count of points. |
[in] | aPoints | - Point set for approximation. |
[in] | aKnots | - The predefined knots vector. |
[in] | aParams | - The parameters for point set. |
bool CreateNurbsLSM | ( | SPtr< Nurbs > & | nurbs, |
const ptrdiff_t | degree, | ||
const ptrdiff_t | pCount, | ||
const PointsVector & | aPoints, | ||
const DoubleVector & | aKnots, | ||
const DoubleVector * | aParams = nullptr |
||
) |
Construction of non-closed spline.
Construction of non-closed spline which approximates a set of points by the method of least squares.
[in,out] | nurbs | - Modifiable spline. |
[in] | aDegree | - The spline order. |
[in] | pCount | - Count of points. |
[in] | aPoints | - Point set for approximation. |
[in] | aKnots | - The predefined knots vector. |
[in] | aParams | - The parameters for point set. |
MbResultType ApproximatePolylineByNurbs | ( | const MbApproxNurbsParameters< MbCartPoint, MbVector, MbNurbs > & | param, |
MbApproxNurbsCurveResult< MbNurbs > & | result | ||
) |
Approximate 2D points by NURBS curve.
Approximate points by NURBS curve.
[in] | param | - Parameters for approximation. |
[out] | result | - Operation result. |