C3D Kernel  104598
Construction of uv-Curves in Two-Dimensional Space
Geometric Construction Methods
Collaboration diagram for Construction of uv-Curves in Two-Dimensional Space:

## Enumerations

enum  MbeArcCreateWay {
acw_EllipseByCenterAndSemiaxis, acw_EllipseByCenterAnd3Points, acw_EArcByCenterAnd2Points
}
Enumeration of ways to create an ellipse (circle) or their arcs in two-dimensional space. More...

## Functions

MbResultType Line (const MbCartPoint &point1, const MbCartPoint &point2, MbCurve *&result)
Create a line.
MbResultType Segment (const MbCartPoint &point1, const MbCartPoint &point2, MbCurve *&result)
Create a line segment.
MbResultType Arc (enum MbeArcCreateWay createWay, const MbCartPoint &center, const std::vector< MbCartPoint > &points, double &a, double &b, double &c, bool option, MbCurve *&result)
Create an ellipse (circle) or an elliptical (circular) arc in the specified way.
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.
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.
MbResultType NurbsCopy (const MbCurve &curve, MbCurve *&result)
Create a copy of a curve as a NURBS-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.
MbResultType Cosinusoid (const MbCartPoint &point0, const MbCartPoint &point1, const MbCartPoint &point2, double phase, double waveLength, MbCurve *&result)
Create a cosine curve.
MbResultType Cosinusoid (const MbCartPoint &origin, double amplitude, double waveLength, double wavesCount, double phase, MbCurve *&result)
Create a cosine curve.
MbResultType CreateContour (MbCurve &curve, MbContour *&result)
Create a composite curve (contour).
MbCurveDuplicateCurve (const MbCurve &curve)
Create a copy of a curve.
MbContourDuplicateContour (const MbContour &cntr, bool modifySegments, MbSNameMaker *names=NULL)
Create a copy of a contour.
MbContourOffsetContour (const MbContour &cntr, double rad, double xEpsilon, double yEpsilon, bool modifySegments, VERSION version=Math::DefaultMathVersion())
Create an offset contour.
MbContourAxisOffsetOpenContour (const MbContour &cntr, const MbCartPoint &q1, const MbCartPoint &q2, double rad, double xEpsilon, double yEpsilon)
Create an offset contour with start and end points on the rotation axis.
bool CurveTrim (MbCurve &curve, double t1, double t2, double eps=METRIC_PRECISION)
Initialize a curve with new parameters.
MbResultType AddCurveToContour (MbCurve &curve, MbContour &contour, bool toEnd)
Add a curve to a composite curve (a contour).
void CurveSection (const MbCurve3D &curve, const MbPlacement3D &place, SArray< MbCartPoint > &result, RPArray< MbCurve > &resultCurve)
Calculate the intersections of a curve and a surface.
void SurfaceSection (const MbSurface &surface, const MbPlacement3D &place, RPArray< MbCurve > &result, VERSION version=Math::DefaultMathVersion())
Calculate the intersections of a surface and a plane.
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.
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.
bool IsLikeStraightLine (const MbCurve &curve, double eps)
Whether the curve is like straight-line regardless of its parameterisation.
Calculate centers of circles.
ptrdiff_t CircleTanLineCircleRadius (const MbLine &pl1, const MbArc &pc1, double rad, MbTempCircle *pc)
Calculate centers of circles.
Calculate centers of circles.
void CircleTanCurveCentre (const MbCurve &pCurve, MbCartPoint &pnt, PArray< MbTempCircle > &pCircle)
Create circles.
void CircleTangentCurveTwoPoints (const MbCurve &pCurve, MbCartPoint &on1, MbCartPoint &on2, PArray< MbTempCircle > &pCircle)
Create circles.
void CircleTangentCurveRPointOn (const MbCurve &pCurve, double radius, MbCartPoint &on, PArray< MbTempCircle > &pCircle)
Create circles.
void CircleTanTwoCurvesRadius (const MbCurve &pCurve1, const MbCurve &pCurve2, double rad, PArray< MbTempCircle > &pCircle)
Create circles.
void CircleTanTwoCurvesPointOn (const MbCurve &pCurve1, const MbCurve &pCurve2, const MbCartPoint &pOn, PArray< MbTempCircle > &pCircle)
Create circles.
void CircleOriginOneTangentTwo (const MbCurve &pCurve1, const MbCurve &pCurve2, const MbCartPoint &pp, RPArray< MbTempCircle > &pCircle)
Create circles.
void CircleTanCurvePointOnAngle (MbCurve &curve, MbCartPoint &p1, double angle, PArray< MbTempCircle > &circles)
Create circles.
void ArcTangentCurveTwoPoints (const MbCurve &pCurve, MbCartPoint &on1, MbCartPoint &on2, PArray< MbArc > &arc)
Create arcs of circles.
void ArcTangentCurveRPointOn (const MbCurve &pCurve, double radius, MbCartPoint &on, PArray< MbArc > &arc)
Create arcs of circles.
void ArcTangentCurveContinue (MbLine &line, MbCartPoint &p2, PArray< MbArc > &arc)
Create a circle arc.
void ArcTangentCurveRadContinue (MbLine &line, double rad, MbCartPoint &p2, PArray< MbArc > &arc)
Create a circle arc.
void CircleTanThreeCurves (const MbCurve *curve1, const MbCurve *curve2, const MbCurve *curve3, MbCartPoint &pnt, PArray< MbTempCircle > &circle)
Create circles.
void CreateNewCircles (PArray< MbTempCircle > &cTmp, PArray< MbArc > &pCircle)
Copy temporary circles.
void LineParallelPoint (const MbCartPoint &p, const MbLine &pl, MbLine &pl_par)
Construct a line parallel to a given line.
void LineParallelDistance (double delta, const MbLine &pl, MbLine &pl_par)
Construct a line parallel to a given line.
int LineBisector (const MbCartPoint &p, const MbLine &pl1, const MbLine &pl2, MbLine &pl3)
Construct a line passing through a given point.
void LinePointAngle (double angle, const MbCartPoint &p, const MbLine &pl, MbLine &pl_new)
Construct a line passing at angle.
bool EllipsePntPntDist (const MbCartPoint &p1, const double &l1, const MbCartPoint &p2, double &l2, MbCartPoint &pc, double &angle)
Construct an ellipse.
void LinePointPerpCurve (const MbCartPoint &pnt, const MbCurve &pCurve, PArray< MbLine > &pLine)
Construct a line passing through a given point.
int LinePointTangentCircle (const MbCartPoint &p, const MbCartPoint &centre, double radius, MbLine *pl)
Construct a line passing through a given point.
void CircleCentreOnCurveRadPointOn (const MbCurve &pCurve, double radius, const MbCartPoint &on, PArray< MbTempCircle > &pCircle)
Construct a circle.
void CircleCentreOnCurveTwoPoints (const MbCurve &pCurve, const MbCartPoint &on1, const MbCartPoint &on2, PArray< MbTempCircle > &pCircle)
Construct a circle.
int Arc2PointsRadius (const MbCartPoint &p1, const MbCartPoint &p2, double rad, bool clockwise, MbArc *arc)
Construct a circle arc.
MbCurveCanonicToParametricConic (double A, double B, double C, double D, double E, double F, double X1, double Y1, double X2, double Y2)
Construct curves.
void LinePointTangentCurve (MbCartPoint &pnt, const MbCurve &pCurve, PArray< MbLine > &pLine, bool lineAsCurve=false)
Construct a line.
void LineAngleTangentCurve (double angle, const MbCurve &pCurve, PArray< MbLine > &pLine)
Construct lines passing at angle.
ptrdiff_t LineTan2Circles (const MbCartPoint &centre1, double radius1, const MbCartPoint &centre2, double radius2, MbLine *pl, MbCartPoint *sp)
Construct lines tangent to circles.
void LineTangentTwoCurves (const MbCurve *pCurve1, const MbCurve *pCurve2, PArray< MbLine > *pLine, SArray< MbCartPoint > *secodnPnt)
Construct a tangent line.
ptrdiff_t LineAngleTanCircle (double angle, const MbCartPoint &centre, double radius, MbLine *pLine)
Construct lines passing at angle.
void SwapLines (MbLine &l1, MbLine &l2)
Swap lines.
MbCurveNurbsConic_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.
MbCurveNurbsConic_2 (std::vector< MbCartPoint > &vmbConicPoints, const MbCartPoint &mbVertex)
Construct a conic section by three points, and an angle vertex.
MbCurveNurbsConic_3 (const std::vector< MbCartPoint > &vmbConicPoints, MbVector &mbTangent1, MbVector &mbTangent2)
Construct a conic section by three points and two inclinations.
MbCurveNurbsConic_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.
MbCurveNurbsConic_5 (const std::vector< MbCartPoint > &vmbConicPoints, MbVector &mbTangent1, size_t tanPntNb=1)
Construct a conic section by four points, and an inclination.
MbCurveNurbsConic_6 (const std::vector< MbCartPoint > &vmbConicPoints)
Construct a conic section by five points.
void CreateSmoothFromBezier (const MbBezier &bez, RPArray< MbCurve > &arCurve, bool bline)
Create a smooth curve from a Bezier curve.
MbCurveConvertNurbsToCurveOfType (const MbNurbs &nurbs, MbePlaneType type, double eps)
Create a curve of a given type as NURBS-curve.
void CreateSurfaceHide (const MbSurface &surf, const MbPlacement3D &eyePlace, double sag, RPArray< MbCurve > &hideCurves)
Get the array of surface silhouette curves of planar projection.

## Enumeration Type Documentation

 enum MbeArcCreateWay
Enumerator:
 acw_CircleByCenterAndRadius Circle by center and radius, set the 'center' and radius in 'c'. acw_ArcByCenterAnd2Points Circular arc by center and two points. Set: 'center', two points in 'points', direction in 'option' (true - clockwise direction). Return: start angle in 'a', end in 'b', radius in 'c'. acw_ArcByCenterAnd2Angles Circular arc by center and two angles, Set: 'center', start angle in 'a', end in 'b', radius in 'c', direction in 'option' (true - clockwise direction). The angles are given in radians. acw_ArcBy3Points Circular arc by three points specified in 'points', points[0] and points[2] are the end point. Return: start angle in 'a', end in 'b', radius in 'c'. acw_EllipseByCenterAndSemiaxis Ellipse by semiaxes and angle. Set : 'center', X semiaxis in 'a', Y semiaxis in 'b', angle in 'c'. The angle are given in radians. acw_EllipseByCenterAnd3Points Ellipse by centre and three points on ellipse. Set: 'center', 3 points in 'points'. Return: X semiaxis in 'a', Y semiaxis in 'b', angle in 'c'. The angle are given in radians. acw_EArcByCenterAnd2Points Elliptical arc is trimmed by two rays, starting from the center and passing through points. Set: 'center', 2 points in 'points', X semiaxis in 'a', Y semiaxis in 'b', angle in 'c', direction in 'option' (true - clockwise direction). The angle are given in radians.

## Function Documentation

 MbResultType Line ( const MbCartPoint & point1, const MbCartPoint & point2, MbCurve *& result )

Create a line given two points.

Parameters:
 [in] point1 - The first point. [in] point2 - The second point. [out] result - The line.
Returns:
Returns operation result code.
 MbResultType Segment ( const MbCartPoint & point1, const MbCartPoint & point2, MbCurve *& result )

Create a line segment given two points.

Parameters:
 [in] point1 - The first point. [in] point2 - The second point. [out] result - The segment.
Returns:
Returns operation result code.
 MbResultType Arc ( enum MbeArcCreateWay createWay, const MbCartPoint & center, const std::vector< MbCartPoint > & points, double & a, double & b, double & c, bool option, MbCurve *& result )

Create an ellipse (circle) or an elliptical (circular) arc in the specified way.
The input parameters are interpreted according to the selected create way.

Parameters:
 [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.
Returns:
Returns operation result code.
 MbResultType Arc ( const MbCartPoint & centre, const SArray< MbCartPoint > & points, bool curveClosed, double angle, double & a, double & b, MbCurve *& result )
Attention:
The function is deprecated. Use Arc instead.
 MbResultType SplineCurve ( const SArray< MbCartPoint > & pointList, bool curveClosed, MbePlaneType curveType, MbCurve *& result )

Create a curve passing through a set of points that has the following type:

• curveType == pt_LineSegment - a line segment,
• curveType == pt_Arc - a circle or an arc,
• curveType == pt_Polyline - a polyline,
• curveType == pt_Bezier - a Bezier curve,
• curveType == pt_CubicSpline - a cubic spline,
• curveType == pt_Hermit - a cubic Hermite spline,
• curveType == pt_Nurbs - a nonuniform rational B-spline of fourth order (cubic).
Parameters:
 [in] pointList - A point set. [in] curveClosed - A curve closedness. [in] curveType - A curve type. [out] result - The curve.
Returns:
Returns operation result code.
 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 given a sequence of control points.
Container 'weightList' can be empty.
Container 'knotList' can be empty.

Parameters:
 [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.
Returns:
Returns operation result code.
 MbResultType NurbsCopy ( const MbCurve & curve, MbCurve *& result )

Create a copy of a curve as a NURBS-curve.

Parameters:
 [in] curve - The initial curve. [out] result - The spline copy of the curve.
Returns:
Returns operation result code.
 MbResultType RegularPolygon ( const MbCartPoint & centre, const MbCartPoint & point, size_t vertexCount, bool describe, MbCurve *& result )

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:

• if vertexCount == 0, a circle with center 'center' passing through 'point' is created,
• if vertexCount == 1, a line segment with end points at 'centre' and 'point' is created,
• if vertexCount, == 2 a rectangle aligned with the global axes with the opposite vertices at points 'centre' and 'point' is created,
• if vertexCount >= 3, a regular polygon is created with a given number of sides, inscribed in a circle (describe == false) or circumscribed around a circle (describe == true) with the specified centre and passing through the given point:
Parameters:
 [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.
Returns:
Returns operation result code.
 MbResultType Cosinusoid ( const MbCartPoint & point0, const MbCartPoint & point1, const MbCartPoint & point2, double phase, double waveLength, MbCurve *& result )

Create a cosine curve given the points, phase and wave length.

Parameters:
 [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.
Returns:
Returns operation result code.
 MbResultType Cosinusoid ( const MbCartPoint & origin, double amplitude, double waveLength, double wavesCount, double phase, MbCurve *& result )

Create a cosine curve given the points, phase and wave length.

Parameters:
 [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.
Returns:
Returns operation result code.
 MbResultType CreateContour ( MbCurve & curve, MbContour *& result )

Create a composite curve (contour) on the basis of the given curve.

Parameters:
 [in] curve - The initial curve. [out] result - The contour created on the basis of the curve.
Returns:
Returns operation result code.
 MbCurve* DuplicateCurve ( const MbCurve & curve )

Create a copy of a curve with substitution of some curves.

Parameters:
 [in] curve - The initial curve.
Returns:
Returns a modified copy of the curve if it has been successfully created.
 MbContour* DuplicateContour ( const MbContour & cntr, bool modifySegments, MbSNameMaker * names = `NULL` )

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.

Parameters:
 [in] cntr - The initial contour. [in] modifySegments - The flag determines whether segments can be replaced or merged. [in] names - An object defining the names synchronized with contour.
Returns:
Returns a modified copy of the contour if it has been successfully created.
 MbContour* OffsetContour ( const MbContour & cntr, double rad, double xEpsilon, double yEpsilon, bool modifySegments, VERSION version = `Math::DefaultMathVersion()` )

Create the offset contour for a given contour.

Parameters:
 [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.
Returns:
Returns the offset contour if it has been successfully created.
 MbContour* AxisOffsetOpenContour ( const MbContour & cntr, const MbCartPoint & q1, const MbCartPoint & q2, double rad, double xEpsilon, double yEpsilon )

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.

Parameters:
 [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.
Returns:
Returns the offset contour if it has been successfully created.
 bool CurveTrim ( MbCurve & curve, double t1, double t2, double eps = `METRIC_PRECISION` )

Initialize a curve with new parameters.

Parameters:
 [in,out] curve - The curve to be modified. [in] t1 - A new start parameter. [in] t2 - A new end parameter. [in] eps - Tolerance.
Returns:
Returns 'true' if the curve has been successfully modified.
 MbResultType AddCurveToContour ( MbCurve & curve, MbContour & contour, bool toEnd )

Add a curve to a composite curve (a contour) 'contour'.
If toEnd == true, the curve is to be added to the end.
If toEnd == true, the curve is to be added to the beginning.

Parameters:
 [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.
Returns:
Returns operation result code.
 void CurveSection ( const MbCurve3D & curve, const MbPlacement3D & place, SArray< MbCartPoint > & result, RPArray< MbCurve > & resultCurve )

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.

Parameters:
 [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.
 void SurfaceSection ( const MbSurface & surface, const MbPlacement3D & place, RPArray< MbCurve > & result, VERSION version = `Math::DefaultMathVersion()` )

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.

Parameters:
 [in] surface - A surface. [in] place - The plane coordinate system. [out] result - The array of curves on the plane.
 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.
The result is a two-dimensional curve in the parametric domain of the given surface.

Parameters:
 [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.
Returns:
Returns operation result code.
 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
(the boundary space curves are considered to belong to the surface)

Parameters:
 [in] surface - A surface. [in] spaceCurve - A space curve. [in] version - Version. [out] result - The two-dimensional contour on the surface.
Returns:
Returns operation result code.
 bool IsLikeStraightLine ( const MbCurve & curve, double eps )

Whether the curve is like straight-line regardless of its parameterisation.

Parameters:
 [in] curve - Curve. [in] eps - Accuracy.
 ptrdiff_t CircleTanLineLineRad ( MbLine & pl1, MbLine & pl2, double rad, MbTempCircle * pc )

Calculate centers of circles with fixed radius rad, that touches two given lines pl1 and pl2.

Parameters:
 [in] pl1 - First line. [in] pl2 - Second line [in] rad - Radius of circle. [out] pc - Result - set of circles with required center.
Returns:
The number of circles in array.
 ptrdiff_t CircleTanLineCircleRadius ( const MbLine & pl1, const MbArc & pc1, double rad, MbTempCircle * pc )

Calculate centers of circles with fixed radius rad, that touches given line pl1 and circle pc1.

Parameters:
 [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.
Returns:
The number of circles in array.
 ptrdiff_t CircleTanCircleCircleRad ( MbArc & pc1, MbArc & pc2, double rad, MbTempCircle * pc )

Calculate centers of circles with fixed radius rad, that touches given circles pc1 and pc2.

Parameters:
 [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.
Returns:
Count of circles in set.
 void CircleTanCurveCentre ( const MbCurve & pCurve, MbCartPoint & pnt, PArray< MbTempCircle > & pCircle )

Create circles with given center, that touches given curve.

Parameters:
 [in] pCurve - Curve, that touches circle. [in] pnt - Center of circle. [out] pCircle - Set of circles.
 void CircleTangentCurveTwoPoints ( const MbCurve & pCurve, MbCartPoint & on1, MbCartPoint & on2, PArray< MbTempCircle > & pCircle )

Create circles that touch given curve and pass through given two points.

Parameters:
 [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, MbCartPoint & on, PArray< MbTempCircle > & pCircle )

Create circles that touch given curve and with a given radius, passing through a given point.

Parameters:
 [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 with a given radius that touch two curves.

Parameters:
 [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 that pass through given point and touch two curves.

Parameters:
 [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 with center on the first curve that touches second curve and passes through the given point.

Parameters:
 [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 ( MbCurve & curve, MbCartPoint & p1, double angle, PArray< MbTempCircle > & 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.

Parameters:
 [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, MbCartPoint & on1, MbCartPoint & on2, PArray< MbArc > & arc )

Create arcs of circles by two points that touches given curve.

Parameters:
 [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, MbCartPoint & on, PArray< MbArc > & arc )

Create arcs of circles by radius and point that touch given curve.

Parameters:
 [in] pCurve - Curve that touches arcs. [in] radius - Radius. [in] on - Point on arc. [out] arc - Set of arcs.
 void ArcTangentCurveContinue ( MbLine & line, MbCartPoint & p2, PArray< MbArc > & 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.

Parameters:
 [in] line - Curve to conjugate with. [in] p2 - Point on arc. [out] arc - A set that contains the arc of circle.
 void ArcTangentCurveRadContinue ( MbLine & line, double rad, MbCartPoint & p2, PArray< MbArc > & 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.

Parameters:
 [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, MbCartPoint & pnt, PArray< MbTempCircle > & circle )

Create circles that touch three curves.

Parameters:
 [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.
Clear temporary array cTmp.

Parameters:
 [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 and passing through a given point.

Parameters:
 [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.
 void LineParallelDistance ( double delta, const MbLine & pl, MbLine & pl_par )

Construct a line parallel to a given line at a given distance from it.

Parameters:
 [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 and being a bisector of angle between two given lines.

Parameters:
 [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 at an angle to a given line and passing through a given point.

Parameters:
 [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.
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.

Parameters:
 [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 point and perpendicular to a given curve.
A line origin is coincident with intersection point.

Parameters:
 [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 point and tangent to a given circle with given center and radius.

Parameters:
 [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.
Returns:
The number of lines.
 void CircleCentreOnCurveRadPointOn ( const MbCurve & pCurve, double radius, const MbCartPoint & on, PArray< MbTempCircle > & pCircle )

Construct a circle by radius and coincident point, a circle center lies on a given curve.

Parameters:
 [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 by two points, with a center lying on a given curve.

Parameters:
 [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 by two points, radius and direction.

Parameters:
 [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.
Returns:
The count of circles in array.
 MbCurve* CanonicToParametricConic ( double A, double B, double C, double D, double E, double F, double X1, double Y1, double X2, double Y2 )

Construct curves by conic section coefficients.

Parameters:
 [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.
Returns:
The construction results:
• circle arc -> circle arc;
• ellipse arc -> ellipse arc;
• parabola arc -> NURBS-curve;
• hyperbola arc -> NURBS-curve.
 void LinePointTangentCurve ( MbCartPoint & pnt, const MbCurve & pCurve, PArray< MbLine > & pLine, bool lineAsCurve = `false` )

Construct a line passing throgh a point and tangent to a given curve.
A line origin is coincident with a tangency point.

Parameters:
 [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.
 void LineAngleTangentCurve ( double angle, const MbCurve & pCurve, PArray< MbLine > & pLine )

Construct lines at angle "angle" to the axis OX and tangent to the curve.
A line origin is coincident with a tangency point.

Parameters:
 [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 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.

Parameters:
 [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.
Returns:
The number of lines in array "pl" that is equal to the number of the base points in array "sp".
 void LineTangentTwoCurves ( const MbCurve * pCurve1, const MbCurve * pCurve2, PArray< MbLine > * pLine, SArray< MbCartPoint > * secodnPnt )

Construct a line tangent to two curves.
A line origin is coincident with a point of tangency on the first curve.

Parameters:
 [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.
Returns:
The number of lines in array "pline" that is equal to the number of points in array "secondPnt".
 ptrdiff_t LineAngleTanCircle ( double angle, const MbCartPoint & centre, double radius, MbLine * pLine )

Construct lines at angle "angle" to the axis OX, tangent to a circle with the given center and radius.

Parameters:
 [in] angle - The angle. [in] centre - The circle center. [in] radius - The circle radius. [out] pLine - The result - the array of lines.
Returns:
The number of lines in array "pLine",
 void SwapLines ( MbLine & l1, MbLine & l2 ) ` [inline]`

Swap lines.

Parameters:
 [in] l1 - The first line. [in] l2 - The second line.
 MbCurve* NurbsConic_1 ( const MbCartPoint & mbPoint0, const MbCartPoint & mbPoint1, const MbCartPoint & mbPoint2, double fDiscr )

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.

Parameters:
 [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.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for a given parameters has failed.
 MbCurve* NurbsConic_2 ( std::vector< MbCartPoint > & vmbConicPoints, const MbCartPoint & mbVertex )

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.

Parameters:
 [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.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
 MbCurve* NurbsConic_3 ( const std::vector< MbCartPoint > & vmbConicPoints, MbVector & mbTangent1, MbVector & mbTangent2 )

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

Parameters:
 [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.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
 MbCurve* NurbsConic_4 ( const MbCartPoint & mbPoint1, const MbCartPoint & mbPoint2, const MbVector & mbTangent1, const MbVector & mbTangent2, double fDiscr )

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.

Parameters:
 [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.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
 MbCurve* NurbsConic_5 ( const std::vector< MbCartPoint > & vmbConicPoints, MbVector & mbTangent1, size_t tanPntNb = `1` )

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.

Parameters:
 [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.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
 MbCurve* NurbsConic_6 ( const std::vector< MbCartPoint > & vmbConicPoints )

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.

Parameters:
 [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.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
 void CreateSmoothFromBezier ( const MbBezier & bez, RPArray< MbCurve > & arCurve, bool bline )

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.

Parameters:
 [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 )

It works for the two types: 'pt_LineSegment' and 'pt_Arc'. If approximation with the given tolerance has failed then the function returns NULL.

Parameters:
 [in] nurbs - The initial NURBS-curve. [in] type - The type of a curve which is required to create. [in] eps - The tolerance of approximation.
Returns:
The pointer to the curve if it has been created.
 void CreateSurfaceHide ( const MbSurface & surf, const MbPlacement3D & eyePlace, double sag, RPArray< MbCurve > & hideCurves )

Get the array of surface silhouette curves of planar projection.