C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
+ Collaboration diagram for Algorithms in Two-Dimensional Space:

Classes

struct  MbDistance
 Distance between curves. More...
 
class  DiskreteLengthData
 Data for support of discrete length/radius/distance. More...
 
class  MpVertex
 Vertex. More...
 
class  MpEdge
 Edge. More...
 
class  MpLoop
 Loop. More...
 
class  MpGraph
 Contours construction graph. More...
 
class  MbBreaksPart
 Part of break. More...
 
class  MbBreak
 Break. More...
 
class  MbTri
 Triangle. More...
 
class  MbPlanarGrid
 Triangulation of a two-dimensional region. More...
 
struct  StMLTipParams
 Tip parameters structure. More...
 
struct  StVertexOfMultilineInfo
 Information about a vertex. More...
 
class  MbBreaksRebuild
 Class for breaks rebuilding. More...
 

Enumerations

enum  EnMLVertexTracingType { mvt_ShearType , mvt_FilletType , mvt_SpecFilletType }
 Type of traverse of corners. More...
 
enum  EnMLInnerTipType { mit_UndefTip , mit_VerticesTip , mit_LinearTip , mit_ArcTip }
 Type of inner tip. More...
 
enum  EnMLTipType {
  mtt_UndefTip , mtt_LinearTip , mtt_ArcTip , mtt_PolylineTip ,
  mtt_ObliqueTip
}
 Type of tip. More...
 

Functions

bool ChangeFirstPoint (MbCurve *segment, const MbCartPoint &p)
 Correct the start point. More...
 
bool ChangeLastPoint (MbCurve *segment, const MbCartPoint &p)
 Correct the last point. More...
 
MbeItemLocation SecondContourLocation (const MbContour &contour1, const MbContour &contour2, double xEpsilon, double yEpsilon)
 Classify the position of the second contour relative to the first one. More...
 
bool IsSpaceNear (const MbCurve &curve1, const MbCurve &curve2, double xEpsilon, double yEpsilon, double devSag=5.0 *Math::deviateSag)
 Determine whether the first curve is close to the second curve. More...
 
double c3d::CalcAngle0X (double dx, double dy)
 Calculate angle between line and 0X-axis. More...
 
long double c3d::CalcAngle0X (long double dx, long double dy)
 Calculate the angle between a line and 0X-axis. More...
 
double c3d::CalcAngle0X (const MbCartPoint &p1, const MbCartPoint &p2)
 Calculate the angle between a line and 0X-axis. More...
 
void c3d::AngleToParam (double dir, bool left, double &t)
 Transform a circle angle to the curve parameter. More...
 
double c3d::CalcAngle3Points (const MbCartPoint &p1, const MbCartPoint &centre, const MbCartPoint &p3)
 Calculate the minimal angle between lines. More...
 
MbCartPoint c3d::LineSegDivide (const MbCartPoint &p1, const MbCartPoint &p2)
 Split segment by the middle. More...
 
MbeState DeleteCurvePart (List< MbCurve > &curveList, const MbCartPoint &pnt, MbCurve *curve, MbCurve *&part2)
 Delete the piece of a curve. More...
 
MbeState DeleteCurvePart (const MbCartPoint &p1, const MbCartPoint &p2, const MbCartPoint &p3, MbCurve *curve, MbCurve *&part2)
 Delete the piece of a curve. More...
 
MbeState TrimmCurvePart (List< MbCurve > &curveList, const MbCartPoint &pnt, MbCurve *curve, MbCurve *&part2)
 Keep the piece of a curve. More...
 
MbeState TrimmCurvePart (const MbCartPoint &p1, const MbCartPoint &p2, const MbCartPoint &p3, MbCurve *curve, MbCurve *&part2)
 Keep the piece of a curve. More...
 
MbeState JustifyCurve (MbCurve *curve, const MbCurve *limitCurve, const MbCartPoint &pnt, MbCurve *&part2)
 Justify the curve. More...
 
MbeLocation PointLocation (const RPArray< const MbCurve > &limits, const MbCartPoint &pnt)
 The position of the point. More...
 
MbeState BreakByClosedCurves (MbCurve &curve, const RPArray< const MbCurve > &limits, bool inside, PArray< MbCurve > &part2, SArray< MbCrossPoint > *cross=nullptr, bool *isEqualCurve=nullptr, bool cutOnCurve=false)
 Exclude the piece of a curve. More...
 
MbeState BreakByCurvesArr (MbCurve &curve, const RPArray< const MbCurve > &limits, PArray< MbCurve > &part2)
 Exclude the piece of a curve. More...
 
MbeState BreakCurve (MbCurve &curve, const MbCartPoint &p1, const MbCartPoint &p2, PArray< MbCurve > &part2)
 Split the curve. More...
 
MbeState BreakCurveNParts (MbCurve &curve, ptrdiff_t partsCount, const MbCartPoint &p1, PArray< MbCurve > &part2)
 Split the curve. More...
 
MbeState ExtendCurveToCurve (MbCurve *curve, const MbCurve *limitCurve, const MbCartPoint &pnt)
 Extend the curve. More...
 
int Circle2PointsRadius (const MbCartPoint &p1, const MbCartPoint &p2, double radius, MbTempCircle *circle)
 Calculate a circle center.
More...
 
bool CircleCentre3Points (const MbCartPoint &p1, const MbCartPoint &p2, const MbCartPoint &p3, MbCartPoint &centre)
 Calculate center and radius of a circle. More...
 
bool DistanceCurveCurve (const MbCurve &curve1, const MbCurve &curve2, MbDistance &dmin)
 Calculate distance. More...
 
void CalculateUV (const MbCurve &curve1, const MbCurve &curve2, double &u, double &v)
 Calculate parameters of curves. More...
 
bool PointsOnCurve (ptrdiff_t count, const MbCartPoint &on, const MbCurve &curve, SArray< MbCartPoint > &points, SArray< double > &pars)
 Put points on a curve. More...
 
MbCurveFatArcContour (const MbCurve &curve, double eps, double maxRadius, bool mate, VERSION version=Math::DefaultMathVersion())
 Approximation of a curve by arcs and segments. More...
 
bool BeginEnvelopeContour (const MbCartPoint &insidePnt, const MbCurve *selectCurve, SArray< MbCrossPoint > &cross, MbContour &contour, SArray< MbCrossPoint > &crossRight)
 Find the first segment of a contour. More...
 
MbCurveFindNearestCurve (List< MbCurve > &curveList, const MbCartPoint &pnt)
 Find the nearest curve. More...
 
void IntersectWithAll (const MbCurve *selectCurve, LIterator< MbCurve > &fromCurve, SArray< MbCrossPoint > &cross, bool self)
 Find intersection points. More...
 
void SortCrossPoints (double tProj, const MbCurve *selectCurve, SArray< MbCrossPoint > &cross, SArray< MbCrossPoint > &crossLeft, SArray< MbCrossPoint > &crossRight)
 Sort intersection points. More...
 
void RemoveEquPoints (double tProj, SArray< MbCrossPoint > &cross)
 Delete coincident points. More...
 
void Equid (const MbCurve *curve, double radLeft, double radRight, int side, bool arcMode, bool degState, PArray< MbCurve > &equLeft, PArray< MbCurve > &equRight)
 Construction of offset curves to a curve. More...
 
void MakeHatchingArea (const PArray< MbCurve > &contour, double witdh, PArray< MbCurve > &borders)
 Construction of curves hatching region. More...
 
bool Fillet (MbCurve *curve1, const MbCartPoint &pnt1, bool trim1, MbCurve *curve2, const MbCartPoint &pnt2, bool trim2, double rad, MbeState &state1, MbeState &state2, MbArc *&arc)
 Construct fillet between curves. More...
 
bool Chamfer (MbCurve *curve1, const MbCartPoint &pnt1, bool trim1, MbCurve *curve2, const MbCartPoint &pnt2, bool trim2, double len, double angle, bool type, MbeState &state1, MbeState &state2, MbLineSegment *&lineseg)
 Construct a chamfer. More...
 
MbeState FilletPolyContour (MbCurve *mc, double rad, bool nodeFlag, const MbCartPoint &pnt, MbContour *&contour)
 Construct a fillet. More...
 
bool ChamferPolyContour (MbCurve *mc, double l1, double par, bool chamferTypeFlag, bool nodeFlag, const MbCartPoint &pnt)
 Construct a chamfer. More...
 
bool Corner (MbCurve *crv1, MbCurve *crv2, const MbCartPoint &p1, const MbCartPoint &p2)
 Extend curves. More...
 
void HatchIntersectLine (double y, const MbCurve *curve, SArray< MbCartPoint > &crossPnt, bool skipTouchPoints=false)
 Find intersection with horizontal line. More...
 
void HatchIntersectCircle (const MbCurve *circle, const MbCurve *curve, SArray< MbCartPoint > &crossPnt)
 Find intersection with a circle. More...
 
double CurveRelative (const MbCurve &curve, const MbCartPoint &p1, const MbCartPoint &p2)
 The location of a curve relative to axis points. More...
 
double ContourRelative (const MbCurve &curve, const MbCartPoint &p1, const MbCartPoint &p2, double sag)
 A sign of area of a curve's shadow on a segment. More...
 
bool RemoveContourGaps (MbContour &contour, double accuracy, bool canInsert, bool canReplace)
 Remove contour gaps. More...
 
MpGraphEncloseContoursBuilder (const RPArray< MbCurve > &curveList, const MbCartPoint &p, PArray< MbCurve > &usedCurves, PArray< MbContour > &contourArray, double accuracy, bool strict, VERSION version, IProgressIndicator *progInd=nullptr)
 Create contours around the given point. More...
 
MpGraphEncloseContoursBuilder (const c3d::PlaneCurvesSPtrVector &curveList, const MbCartPoint &p, c3d::PlaneCurvesSPtrVector &usedCurves, c3d::PlaneContoursSPtrVector &contourArray, double accuracy, bool strict, VERSION version, IProgressIndicator *progInd=nullptr)
 Create contours around the given point. More...
 
MpGraphOuterContoursBuilder (const RPArray< MbCurve > &curveList, PArray< MbContour > &contourArray, double accuracy, bool strict, VERSION version, IProgressIndicator *progInd=nullptr)
 Construct enclosing contours on the basis of the given curves. More...
 
MpGraphOuterContoursBuilder (const c3d::PlaneCurvesSPtrVector &curveList, c3d::PlaneContoursSPtrVector &contourArray, double accuracy, bool strict, VERSION version, IProgressIndicator *progInd=nullptr)
 Construct enclosing contours on the basis of the given curves. More...
 
MpGraphContoursReconstructor (const RPArray< MbCurve > &curveList, MpGraph *graph, PArray< MbContour > &contourArray, double accuracy, bool strict, VERSION version, IProgressIndicator *progInd=nullptr)
 Reconstruct contours constructed around the point before. More...
 
MpGraphContoursReconstructor (const c3d::PlaneCurvesSPtrVector &curveList, MpGraph *graph, c3d::PlaneContoursSPtrVector contourArray, double accuracy, bool strict, VERSION version, IProgressIndicator *progInd=nullptr)
 Reconstruct contours constructed around the point before. More...
 
void NearPointProjections (const MbContour &contour, const MbCartPoint &pnt, SArray< double > &tProjs, bool isNear, double mEps=METRIC_REGION)
 Nearest projections on the contour. More...
 
MbeNewtonResult NearestPoints (const MbCurve &curve1, bool ext1, const MbCurve &curve2, bool ext2, double xEpsilon, double yEpsilon, double &t1, double &t2, double &dmin, VERSION version=Math::DefaultMathVersion())
 Calculate parameters of the nearest points of two curves. More...
 
double AreaSign (const MbCurve &curve, double sag, bool close)
 An area and orientation of a closed curve. More...
 
template<class Point >
bool c3d::EqualPoints (const Point &p1, const Point &p2, double xEpsilon, double yEpsilon)
 Check points for equality. More...
 
template<class Vector >
bool c3d::EqualVectors (const Vector &p1, const Vector &p2, double xEpsilon, double yEpsilon)
 Check equality of vectors with given tolerance. More...
 
bool c3d::EqualLengths (double lx, double ly, double minLen=METRIC_EPSILON, double minDev=LENGTH_EPSILON)
 Check lengths for equality. More...
 
bool FilletMultiline (MbMultiline &multiline, double rad, bool nodeFlag, MbCartPoint &pnt, const StVertexOfMultilineInfo &vertInfo)
 Construct a fillet of multiline. More...
 
bool ChamferMultiline (MbMultiline &multiline, double len, double par, bool type, bool nodeFlag, MbCartPoint &pnt, const StVertexOfMultilineInfo &vertInfo)
 Construct a chamfer of multiline. More...
 
void ToTakeIntoCurvesCrvRadii (MbCurve &curve, double angle, double &minPos, double &maxNeg)
 Out-of-class functions for curvature radii calculation/consideration (implementation in MltLine.cpp) More...
 
void GetContoursCrvRadii (MbContour &contour, double angle, double &minPos, double &maxNeg)
 Get the contour curvatures radii. More...
 
bool SmoothJointSuccessiveCurves (MbCurve &curve1, MbCurve &curve2)
 Join two curves. More...
 
bool BreakMultiline (const MbMultiline &multiline, const MbCartPoint &p1, const MbCartPoint &p2, PArray< MbMultiline > &parts)
 Split multiline. More...
 
bool BreakMultilineNParts (const MbMultiline &multiline, size_t partsCount, const MbCartPoint &point, PArray< MbMultiline > &parts)
 Split multiline. More...
 
void GetCorrectRegions (const RPArray< MbContour > &contours, bool sameContours, RPArray< MbRegion > &regions)
 Get a set of regions. More...
 
void MakeRegions (RPArray< MbContour > &contours, bool useSelfIntCntrs, bool sameContours, RPArray< MbRegion > &regions)
 Divide a set of regions into groups and construct regions. More...
 
bool CreateBooleanResultRegions (RPArray< MbContour > &contours1, RPArray< MbContour > &contours2, const MbRegionBooleanParams &operParams, RPArray< MbRegion > &regions, MbResultType *resInfo=nullptr)
 Perform boolean operation with regions. More...
 
bool CreateBooleanResultRegions (MbRegion &region1, MbRegion &region2, const MbRegionBooleanParams &operParams, RPArray< MbRegion > &regions, MbResultType *resInfo=nullptr)
 Perform boolean operation with regions. More...
 
bool MakeUnionRegions (RPArray< MbRegion > &regions, bool allowSelfTouch=true, bool mergeCurves=true)
 Perform union of regions. More...
 

Detailed Description

Enumeration Type Documentation

◆ EnMLVertexTracingType

Type of traverse of corners.

Type of traverse of corners at a vertex of multiline.

Enumerator
mvt_ShearType 

Traverse by shear.

mvt_FilletType 

Traverse by fillet.

mvt_SpecFilletType 

Traverse by fillet with a given radius.

◆ EnMLInnerTipType

Type of inner tip.

Type of inner tip of multiline.

Enumerator
mit_UndefTip 

No tip.

mit_VerticesTip 

Tip between corresponding vertices.

mit_LinearTip 

Linear tip.

mit_ArcTip 

Arc tip.

◆ EnMLTipType

Type of tip.

Type of tip of multiline.

Enumerator
mtt_UndefTip 

No tip.

mtt_LinearTip 

Linear tip.

mtt_ArcTip 

Arc tip.

mtt_PolylineTip 

Polyline tip.

mtt_ObliqueTip 

Inclined tip.

Function Documentation

◆ ChangeFirstPoint()

bool ChangeFirstPoint ( MbCurve segment,
const MbCartPoint p 
)

Correct the start point.

Change the start point of curve with a new one.
Changes the start point for curves of types:
pt_Nurbs, pt_Hermit, pt_Polyline, pt_Bezier, pt_CubicSpline, pt_LineSegment, pt_ReparamCurve,
or for contour pt_Contour if its first segment is of one of the listed types.

Parameters
[in]segment- The modified curve.
[in]p- A new start point.

◆ ChangeLastPoint()

bool ChangeLastPoint ( MbCurve segment,
const MbCartPoint p 
)

Correct the last point.

Change the end point of curve with a new one.
Changes the end point for curves of types:
pt_Nurbs, pt_Hermit, pt_Polyline, pt_Bezier, pt_CubicSpline, pt_LineSegment, pt_ReparamCurve,
or for contour pt_Contour if its last segment is of one of the listed types.

Parameters
[in]segment- The modified curve.
[in]p- A new start point.

◆ SecondContourLocation()

MbeItemLocation SecondContourLocation ( const MbContour contour1,
const MbContour contour2,
double  xEpsilon,
double  yEpsilon 
)

Classify the position of the second contour relative to the first one.

Classify the position of the second contour relative to the first one:
iloc_OutOfItem - outside,
iloc_OnItem - intersects,
iloc_InItem - inside.

Parameters
[in]contour1- The first contour.
[in]contour2- The second contour.
[in]xEpsilon- Tolerance in x direction.
[in]yEpsilon- Tolerance in y direction.
Returns
Returns the result of classification of the relative position.

◆ IsSpaceNear()

bool IsSpaceNear ( const MbCurve curve1,
const MbCurve curve2,
double  xEpsilon,
double  yEpsilon,
double  devSag = 5.0 *Math::deviateSag 
)

Determine whether the first curve is close to the second curve.

Determine whether curve 'curve1' is close to curve 'curve2' within the given precision.
The proximity is defined by the closeness of points of the first curve obtained by sampling
with the given turning angle to the second curve.

Parameters
[in]curve1- The first curve.
[in]curve2- The second curve.
[in]xEpsilon- Proximity tolerance in x direction.
[in]yEpsilon- Proximity tolerance in y direction.
[in]devSag- The maximal turning angle for sampling the curve.
Returns
Returns 'true' if the curves are close.

◆ CalcAngle0X() [1/3]

double c3d::CalcAngle0X ( double  dx,
double  dy 
)
inline

Calculate angle between line and 0X-axis.

Line is set by dx and dy increments. Angle is in range [0, 2*M_PI).

Parameters
[in]dx- Increment along X.
[in]dy- Increment along Y.
Returns
The required angle.

◆ CalcAngle0X() [2/3]

long double c3d::CalcAngle0X ( long double  dx,
long double  dy 
)
inline

Calculate the angle between a line and 0X-axis.

A line is defined by dx and dy increments. The angle is in range [0, 2*M_PI).

Parameters
[in]dx- Increment along X.
[in]dy- Increment along Y.
Returns
The required angle.

◆ CalcAngle0X() [3/3]

double c3d::CalcAngle0X ( const MbCartPoint p1,
const MbCartPoint p2 
)
inline

Calculate the angle between a line and 0X-axis.

Line is defined by two points. The angle is in range [0, 2*M_PI].

Parameters
[in]p1- The first point.
[in]p2- The second point
Returns
The required angle.

◆ AngleToParam()

void c3d::AngleToParam ( double  dir,
bool  left,
double &  t 
)
inline

Transform a circle angle to the curve parameter.

Parameters
[in]dir- Angle between X-axes of a circle and of the coordinate system.
[in]left- If true, then the coordinate system is left, otherwise it is right.
[out]t- Parameter to transform.

◆ CalcAngle3Points()

double c3d::CalcAngle3Points ( const MbCartPoint p1,
const MbCartPoint centre,
const MbCartPoint p3 
)
inline

Calculate the minimal angle between lines.

Lines are specified as follows: l1( centre, p1 ) and l2( centre, p3 ).

Parameters
[in]p1- A point on the first line.
[in]centre- The common point of two lines.
[in]p3- A point on the second line.
Returns
Signed result:
"+" - p3 lies to the left of vector ( centre, p1 ); "-" - p3 lies to the right of vector ( centre, p1 ).

◆ LineSegDivide()

MbCartPoint c3d::LineSegDivide ( const MbCartPoint p1,
const MbCartPoint p2 
)
inline

Split segment by the middle.

Parameters
[in]p1- Coordinates of the segment's start point.
[in]p2- Coordinates of the segment's end point.
Returns
Coordinates of the segment's middle point.

◆ DeleteCurvePart() [1/2]

MbeState DeleteCurvePart ( List< MbCurve > &  curveList,
const MbCartPoint pnt,
MbCurve curve,
MbCurve *&  part2 
)

Delete the piece of a curve.

Delete a piece of a curve by the point.
Delete the piece bounded by two successive parameters of intersection of the curve with the curves from the given list and the nearest to the projection of the given point.

Parameters
[in]curveList- The list of curves for intersection.
[in]pnt- The point indicating the piece of a curve to be deleted.
[in,out]curve- The curve to be modified.
[out]part2- The finite piece of the modified curve if the curve is split into two pieces.
Returns
The state of a curve after modification.

◆ DeleteCurvePart() [2/2]

MbeState DeleteCurvePart ( const MbCartPoint p1,
const MbCartPoint p2,
const MbCartPoint p3,
MbCurve curve,
MbCurve *&  part2 
)

Delete the piece of a curve.

Delete the piece of a curve by two points.
The third point is additionally specified for closed curves, it indicates the piece of a curve to be deleted.

Parameters
[in]p1- The point indicating the first boundary of the piece to be deleted.
[in]p2- The point indicating the second boundary of the piece to be deleted.
[in]p3- The point indicating the piece of a closed curve to be deleted.
[in,out]curve- The curve to be modified.
[out]part2- The finite piece of the modified curve if the curve is split into two pieces.
Returns
The state of a curve after modification.

◆ TrimmCurvePart() [1/2]

MbeState TrimmCurvePart ( List< MbCurve > &  curveList,
const MbCartPoint pnt,
MbCurve curve,
MbCurve *&  part2 
)

Keep the piece of a curve.

Keep the piece of a curve by the point. Keep the curve piece bounded by two successive parameters of intersection of the initial curve with the curves from the given list and the nearest to the projection of the given point.

Parameters
[in]curveList- The list of curves for intersection.
[in]pnt- The point indicating the piece of a curve to be kept.
[in,out]curve- The curve to be modified.
[in,out]part2- This value is always nullptr.
Returns
The state of a curve after its modification.
Warning
For internal use only.

◆ TrimmCurvePart() [2/2]

MbeState TrimmCurvePart ( const MbCartPoint p1,
const MbCartPoint p2,
const MbCartPoint p3,
MbCurve curve,
MbCurve *&  part2 
)

Keep the piece of a curve.

Keep the piece of a curve by two points.
The third point is additionally specified for closed curves, it indicates the piece of a curve to be kept.

Parameters
[in]p1- The point indicating the first boundary of the piece to be deleted.
[in]p2- The point indicating the second boundary of the piece to be deleted.
[in]p3- The point indicating the piece of a closed curve to be kept
[in,out]curve- The curve to be modified.
[in,out]part2- This value is always nullptr.
Returns
The state of a curve after its modification.
Warning
For internal use only.

◆ JustifyCurve()

MbeState JustifyCurve ( MbCurve curve,
const MbCurve limitCurve,
const MbCartPoint pnt,
MbCurve *&  part2 
)

Justify the curve.

Justify the curve relative to the given curve and a point on the curve.
The curve is truncated by the point of its intersection with the boundary curve, which is the nearest to the given point. Only the piece of a curve at the side of the given point is kept.

Parameters
[in,out]curve- The modified curve.
[in]limitCurve- Boundary curve for justification.
[in]pnt- The point for selecting the piece of a curve.
[in,out]part2- This value is always nullptr.
Returns
The state of a curve after modification.
Warning
For internal use only.

◆ PointLocation()

MbeLocation PointLocation ( const RPArray< const MbCurve > &  limits,
const MbCartPoint pnt 
)

The position of the point.

The position of the point relative to closed borders.

Parameters
[in]limits- The set of curves that defines boundaries. These curves should be closed boundaries in the aggregate.
[in]pnt- The point for the position definition.
Returns
The point position relative to the curve.

◆ BreakByClosedCurves()

MbeState BreakByClosedCurves ( MbCurve curve,
const RPArray< const MbCurve > &  limits,
bool  inside,
PArray< MbCurve > &  part2,
SArray< MbCrossPoint > *  cross = nullptr,
bool *  isEqualCurve = nullptr,
bool  cutOnCurve = false 
)

Exclude the piece of a curve.

Exclude curve pieces from closed boundaries.

Parameters
[in]curve- The bounded curve.
[in]limits- The array of closed curves-boundaries.
[in]inside- The attribute of deletion inside boundaries.
[out]part2- The array of remaining curve pieces.
[out]cross- The curve and boundaries intersection point.
[out]isEqualCurve- The attribute of coincidence between the broken curve with one of the given array of boundaries. It is worthwhile if the result is dp_NoChanged.
[in]cutOnCurve- If it equals to false, then the pieces of a curve coincident with pieces of the boundary are not to be deleted.
Returns
The state of a curve after modification.

◆ BreakByCurvesArr()

MbeState BreakByCurvesArr ( MbCurve curve,
const RPArray< const MbCurve > &  limits,
PArray< MbCurve > &  part2 
)

Exclude the piece of a curve.

Exclude pieces of a curve by coincidence with curves from a set.

Parameters
[in]curve- The bounded curve.
[in]limits- The array of curves for the hit testing.
[out]part2- The array of remaining curve pieces.
Returns
The state of a curve after modification.

◆ BreakCurve()

MbeState BreakCurve ( MbCurve curve,
const MbCartPoint p1,
const MbCartPoint p2,
PArray< MbCurve > &  part2 
)

Split the curve.

Split the curve into two pieces. In result the curve is split into pieces. The first piece remains, the other pieces are added to the array part2.

Returns
The state of a curve after modification.
Parameters
[in,out]curve- The curve for splitting.
[in]p1- The first point of splitting.
[in]p2- The second point of splitting.
[out]part2- The array of curve pieces.
Returns
The state of a curve after modification.

◆ BreakCurveNParts()

MbeState BreakCurveNParts ( MbCurve curve,
ptrdiff_t  partsCount,
const MbCartPoint p1,
PArray< MbCurve > &  part2 
)

Split the curve.

Split the curve by several equal pieces.

Parameters
[in,out]curve- The curve for splitting.
[in]partsCount- The count of pieces.
[in]p1- One of splitting points.
[out]part2- The array of curve pieces.
Returns
The state of a curve after modification.

◆ ExtendCurveToCurve()

MbeState ExtendCurveToCurve ( MbCurve curve,
const MbCurve limitCurve,
const MbCartPoint pnt 
)

Extend the curve.

Extend the curve to the given curve-boundary limitCurve from the end nearest to the given point pnt.

Parameters
[in,out]curve- The modified curve.
[in]limitCurve- The curve-boundary
[in]pnt- The point indicating the extended end of a curve.
Returns
The state of a curve after modification.

◆ Circle2PointsRadius()

int Circle2PointsRadius ( const MbCartPoint p1,
const MbCartPoint p2,
double  radius,
MbTempCircle circle 
)

Calculate a circle center.

Calculate a circle center by two points and radius.

Parameters
[in]p1- The first point.
[in]p2- The second point.
[in]radius- Radius.
[out]circle- The result - the array of temporary circles.
Returns
The count of elements in the array "circle".

◆ CircleCentre3Points()

bool CircleCentre3Points ( const MbCartPoint p1,
const MbCartPoint p2,
const MbCartPoint p3,
MbCartPoint centre 
)

Calculate center and radius of a circle.

Calculate center and radius of a circle by three points.

Parameters
[in]p1- The first point.
[in]p2- The second point.
[in]p3- The third point.
[out]centre- The result - the circle center.
Returns
true if the construction is possible.

◆ DistanceCurveCurve()

bool DistanceCurveCurve ( const MbCurve curve1,
const MbCurve curve2,
MbDistance dmin 
)

Calculate distance.

Calculate distance between two curves.

Parameters
[in]curve1- The first curve.
[in]curve2- The second curve.
[out]dmin- The result - the distance between curves.
Returns
true if curves do not intersect. false if curves intersect.

◆ CalculateUV()

void CalculateUV ( const MbCurve curve1,
const MbCurve curve2,
double &  u,
double &  v 
)

Calculate parameters of curves.

Calculate curves parameters for the minimal distance.

Parameters
[in]curve1- The first curve.
[in]curve2- The second curve.
[out]u- Parameter on the first curve.
[out]v- Parameter on the second curve.

◆ PointsOnCurve()

bool PointsOnCurve ( ptrdiff_t  count,
const MbCartPoint on,
const MbCurve curve,
SArray< MbCartPoint > &  points,
SArray< double > &  pars 
)

Put points on a curve.

Put a given number of points on curve.
Points may be put only on a bounded curve.

Parameters
[in]count- The number of points.
[in]on- Projection of this point will be added in the result in a case of closed curve.
[in]curve- The curve.
[out]points- Points on the curve.
[out]pars- Parameters on the curve.
Returns
true if points were calculated.

◆ FatArcContour()

MbCurve* FatArcContour ( const MbCurve curve,
double  eps,
double  maxRadius,
bool  mate,
VERSION  version = Math::DefaultMathVersion() 
)

Approximation of a curve by arcs and segments.

Approximation of a curve by arcs and segments.

Parameters
[in]curve- The curve for approximation.
[in]eps- The metric tolerance.
[in]maxRadius- The maximal approximation radius.
[in]mate- The approximation flag with consideration of conjugations.
[in]version- The version of construction.

◆ BeginEnvelopeContour()

bool BeginEnvelopeContour ( const MbCartPoint insidePnt,
const MbCurve selectCurve,
SArray< MbCrossPoint > &  cross,
MbContour contour,
SArray< MbCrossPoint > &  crossRight 
)

Find the first segment of a contour.

Find the first segment of a contour.
A piece of the curve "selectCurve" between intersection parameters is added in contour, the parameters are the nearest to the projection of the point "insidePoint".

Parameters
[in]insidePnt- The point around which to create the contour.
[in]selectCurve- The nearest curve.
[in]cross- The array of points of intersection with the nearest curve.
[out]contour- The contour for adding the segment to.
[out]crossRight- The node - the array of intersection points in the side of contour extension.
Returns
true if a segment has been added.

◆ FindNearestCurve()

MbCurve* FindNearestCurve ( List< MbCurve > &  curveList,
const MbCartPoint pnt 
)

Find the nearest curve.

Find the curve nearest to a point.

Parameters
[in]curveList- The list of curves.
[in]pnt- The point.
Returns
The nearest curve.

◆ IntersectWithAll()

void IntersectWithAll ( const MbCurve selectCurve,
LIterator< MbCurve > &  fromCurve,
SArray< MbCrossPoint > &  cross,
bool  self 
)

Find intersection points.

Find intersection points of the chosen curve with the other curves from the list.

Parameters
[in]selectCurve- The curve.
[in]fromCurve- The iterator of the curves list.
[out]cross- Intersection points.
[in]self- Flag of self-intersections search.

◆ SortCrossPoints()

void SortCrossPoints ( double  tProj,
const MbCurve selectCurve,
SArray< MbCrossPoint > &  cross,
SArray< MbCrossPoint > &  crossLeft,
SArray< MbCrossPoint > &  crossRight 
)

Sort intersection points.

Sort intersection points relative to the projection point of the chosen curve.

Parameters
[in]tProj- Parameter of the projection on the curve.
[in]selectCurve- The curve.
[in,out]cross- The array of intersection points for sorting.
[out]crossLeft- The node of intersection points on the left of the projection.
[out]crossRight- The node of intersection points on the right of the projection.

◆ RemoveEquPoints()

void RemoveEquPoints ( double  tProj,
SArray< MbCrossPoint > &  cross 
)

Delete coincident points.

Delete points from the array which are coincident with the projection point specified by the parameter.
If all the points are coincident with the projection point, then they will not be deleted.

Parameters
[in]tProj- The projection parameter.
[in,out]cross- The array of intersection points.

◆ Equid()

void Equid ( const MbCurve curve,
double  radLeft,
double  radRight,
int  side,
bool  arcMode,
bool  degState,
PArray< MbCurve > &  equLeft,
PArray< MbCurve > &  equRight 
)

Construction of offset curves to a curve.

Construction of equidistant curves to arbitrary curve on the right and on the left. A name of every offset contour matches with the name of the initial one.

Parameters
[in]curve- The initial curve
[in]radLeft- The equidistance radius on the left by direction.
[in]radRight- The equidistance radius on the right by direction.
[in]side- Attribute defining the side to construct:
0 - on the left by direction,
1 - on the right by direction,
2 - on the both sides.
[in]arcMode- The way of traverse of angles:
true - by arc, false - by section.
[in]degState- Attribute of degenerate segments allowance:
0 - degenerate segments are forbidden,
1 - degenerate segments are allowed.
[out]equLeft- The array of contours on the left side.
[out]equRight- The array of contours on the right side.

◆ MakeHatchingArea()

void MakeHatchingArea ( const PArray< MbCurve > &  contour,
double  witdh,
PArray< MbCurve > &  borders 
)

Construction of curves hatching region.

Construction of hatching with a given width inside or near curves.

Parameters
[in]contour- Initial curves
[in]witdh- The hatching width.
[out]borders- The array of hatching lines and hatching boundaries.

◆ Fillet()

bool Fillet ( MbCurve curve1,
const MbCartPoint pnt1,
bool  trim1,
MbCurve curve2,
const MbCartPoint pnt2,
bool  trim2,
double  rad,
MbeState state1,
MbeState state2,
MbArc *&  arc 
)

Construct fillet between curves.

Construct fillet with a constant radius between two curves.

Parameters
[in]curve1- The first curve.
[in]pnt1- The point near the first curve.
[in]trim1- The attribute of trimming of the first curve.
[in]curve2- The second curve.
[in]pnt2- The point near the second curve.
[in]trim2- The attribute of trimming of the second curve.
[in]rad- The radius of fillet.
[out]state1- The state of the first curve.
[out]state2- The state of the second curve.
[out]arc- The arc of fillet.
Returns
true in case of successful operation.

◆ Chamfer()

bool Chamfer ( MbCurve curve1,
const MbCartPoint pnt1,
bool  trim1,
MbCurve curve2,
const MbCartPoint pnt2,
bool  trim2,
double  len,
double  angle,
bool  type,
MbeState state1,
MbeState state2,
MbLineSegment *&  lineseg 
)

Construct a chamfer.

Construct a chamfer between two curves.

Parameters
[in]curve1- The first curve.
[in]pnt1- The point near the first curve.
[in]trim1- The attribute of trimming of the first curve.
[in]curve2- The second curve.
[in]pnt2- The point near the second curve.
[in]trim2- The attribute of trimming of the second curve.
[in]len- The size of the chamfer on the first curve.
[in]angle- The angle of the chamfer or the size of the chamfer on the second curve according to the type of construction.
[in]type- The type of chamfer construction:
true - size + angle,
false - size + size.
[out]state1- The state of the first curve.
[out]state2- The state of the second curve.
[out]lineseg- The segment of the chamfer.
Returns
is true in case of successful operation.

◆ FilletPolyContour()

MbeState FilletPolyContour ( MbCurve mc,
double  rad,
bool  nodeFlag,
const MbCartPoint pnt,
MbContour *&  contour 
)

Construct a fillet.

Construct a fillet of polyline or contour.
The curve "mc" being modified should be a polyline or a contour.

Parameters
[in]mc- The modified curve.
[in]rad- The radius of fillet.
[in]nodeFlag- The flag of selection of fillet nodes.
true - fillet at all nodes,
false - fillet of the nearest node.
[in]pnt- The point of choosing of the nearest node.
[out]contour- Contour constructed by a polyline.
Returns
The state of a curve after modification.

◆ ChamferPolyContour()

bool ChamferPolyContour ( MbCurve mc,
double  l1,
double  par,
bool  chamferTypeFlag,
bool  nodeFlag,
const MbCartPoint pnt 
)

Construct a chamfer.

Construct a chamfer of polyline or contour.
The curve "mc" being modified should be a polyline or a contour.

Parameters
[in]mc- The modified curve.
[in]l1- The size of a chamfer.
[in]par- The angle of a chamfer or the size of a chamfer on the second curve according to the type of construction.
[in]chamferTypeFlag- The type of chamfer construction:
true - size + angle,
false - size + size.
[in]nodeFlag- The flag of selection of fillet nodes.
true - fillet at all nodes,
false - fillet of the nearest node.
[in]pnt- The point of choosing of the nearest node.

◆ Corner()

bool Corner ( MbCurve crv1,
MbCurve crv2,
const MbCartPoint p1,
const MbCartPoint p2 
)

Extend curves.

Extend two curves to the point of intersection.

Parameters
[in,out]crv1- The first curve.
[in,out]crv2- The second curve.
[in]p1- The point for selection of intersection location.
[in]p2- The point for selection of intersection location.

◆ HatchIntersectLine()

void HatchIntersectLine ( double  y,
const MbCurve curve,
SArray< MbCartPoint > &  crossPnt,
bool  skipTouchPoints = false 
)

Find intersection with horizontal line.

Find intersection of a curve with horizontal line. For hatching.

Parameters
[in]y- The coordinate of a horizontal line.
[in]curve- The curve.
[out]crossPnt- Intersection points.
[in]skipTouchPoints- Skip touch points. true - skip touch points, false - old function behavior.

◆ HatchIntersectCircle()

void HatchIntersectCircle ( const MbCurve circle,
const MbCurve curve,
SArray< MbCartPoint > &  crossPnt 
)

Find intersection with a circle.

Find intersection with a circle.
For hatching.

Parameters
[in]circle- The circle.
[in]curve- The curve.
[out]crossPnt- Intersection points.

◆ CurveRelative()

double CurveRelative ( const MbCurve curve,
const MbCartPoint p1,
const MbCartPoint p2 
)

The location of a curve relative to axis points.

For the definition of the rotation axis direction.

Parameters
[in]curve- The initial curve.
[in]p1- The first point of an axis.
[in]p2- The second point of an axis.
Returns
0 in a case of failure,
otherwise the vector product of the normalized axis vector ('p1', 'p2') and the vector ('p1', 'w') is returned. ('w' is the coordinates of the curve's center of gravity).

◆ ContourRelative()

double ContourRelative ( const MbCurve curve,
const MbCartPoint p1,
const MbCartPoint p2,
double  sag 
)

A sign of area of a curve's shadow on a segment.

This is required for the definition of the sweep contour direction. If a curve is not closed then it becomes closed through an axis.

Parameters
[in]curve- The initial curve.
[in]p1- The first point of a segment.
[in]p2- The second point of a segment.
[in]sag- The deviation angle. Used for calculation of the step by a curve.
Returns
The area of the shadow with a sign.

◆ RemoveContourGaps()

bool RemoveContourGaps ( MbContour contour,
double  accuracy,
bool  canInsert,
bool  canReplace 
)

Remove contour gaps.

Remove contour gaps.

Parameters
[in]contour- A contour.
[in]accuracy- Upper gap size.
[in]canInsert- Allow insert segments.
[in]canReplace- Allow replace segments.
Returns
true, if something have changed.

◆ EncloseContoursBuilder() [1/2]

MpGraph* EncloseContoursBuilder ( const RPArray< MbCurve > &  curveList,
const MbCartPoint p,
PArray< MbCurve > &  usedCurves,
PArray< MbContour > &  contourArray,
double  accuracy,
bool  strict,
VERSION  version,
IProgressIndicator progInd = nullptr 
)

Create contours around the given point.

Create contours around the given point. One outer and several inner loops are constructed with single nesting level. Do not send composite curves (contours, polylines, polygons and etc) as input curves. Break them down into on the components.

Parameters
[in]curveList- List of curves for construction.
[in]p- A point the contours are constructed around.
[out]usedCurves- Used curves.
[out]contourArray- The result of construction is a set of contours.
[in]accuracy- The accuracy of determining the intersection of curves and proximity.
[in]strict- If false, the construction is performed roughly.
[in]version- The version of construction. The last version Math::DefaultMathVersion().
[in]progInd- Execution progress indicator.
Returns
Contours construction graph.
Warning
While using functions EncloseContoursBuilder, OuterContoursBuilder, ContoursReconstructor, a single state of 'strict' flag and version must be used in one treatment process.

◆ EncloseContoursBuilder() [2/2]

MpGraph* EncloseContoursBuilder ( const c3d::PlaneCurvesSPtrVector &  curveList,
const MbCartPoint p,
c3d::PlaneCurvesSPtrVector &  usedCurves,
c3d::PlaneContoursSPtrVector &  contourArray,
double  accuracy,
bool  strict,
VERSION  version,
IProgressIndicator progInd = nullptr 
)

Create contours around the given point.

Create contours around the given point. One outer and several inner loops are constructed with single nesting level. Do not send composite curves (contours, polylines, polygons and etc) as input curves. Break them down into on the components.

Parameters
[in]curveList- List of curves for construction.
[in]p- A point the contours are constructed around.
[out]usedCurves- Used curves.
[out]contourArray- The result of construction is a set of contours.
[in]accuracy- The accuracy of determining the intersection of curves and proximity.
[in]strict- If false, the construction is performed roughly.
[in]version- The version of construction. The last version Math::DefaultMathVersion().
[in]progInd- Execution progress indicator.
Returns
Contours construction graph.
Warning
While using functions EncloseContoursBuilder, OuterContoursBuilder, ContoursReconstructor, a single state of 'strict' flag and version must be used in one treatment process.

◆ OuterContoursBuilder() [1/2]

MpGraph* OuterContoursBuilder ( const RPArray< MbCurve > &  curveList,
PArray< MbContour > &  contourArray,
double  accuracy,
bool  strict,
VERSION  version,
IProgressIndicator progInd = nullptr 
)

Construct enclosing contours on the basis of the given curves.

Construct enclosing contours on the basis of the given curves. Outer and inner loops are constructed with an arbitrary level of inclusion. Do not send composite curves (contours, polylines, polygons and etc) as input curves. Break them down into on the components.

Parameters
[in]curveList- List of curves for construction.
[out]contourArray- The result of construction is a set of contours.
[in]accuracy- The accuracy of determining the intersection of curves and proximity.
[in]strict- If false, the construction is performed roughly.
[in]version- The version of construction. The last version Math::DefaultMathVersion().
[in]progInd- Execution progress indicator.
Returns
Contours construction graph.
Warning
While using functions EncloseContoursBuilder, OuterContoursBuilder, ContoursReconstructor, a single state of 'strict' flag and version must be used in one treatment process.

◆ OuterContoursBuilder() [2/2]

MpGraph* OuterContoursBuilder ( const c3d::PlaneCurvesSPtrVector &  curveList,
c3d::PlaneContoursSPtrVector &  contourArray,
double  accuracy,
bool  strict,
VERSION  version,
IProgressIndicator progInd = nullptr 
)

Construct enclosing contours on the basis of the given curves.

Construct enclosing contours on the basis of the given curves. Outer and inner loops are constructed with an arbitrary level of inclusion. Do not send composite curves (contours, polylines, polygons and etc) as input curves. Break them down into on the components.

Parameters
[in]curveList- List of curves for construction.
[out]contourArray- The result of construction is a set of contours.
[in]accuracy- The accuracy of determining the intersection of curves and proximity.
[in]strict- If false, the construction is performed roughly.
[in]version- The version of construction. The last version Math::DefaultMathVersion().
[in]progInd- Execution progress indicator.
Returns
Contours construction graph.
Warning
While using functions EncloseContoursBuilder, OuterContoursBuilder, ContoursReconstructor, a single state of 'strict' flag and version must be used in one treatment process.

◆ ContoursReconstructor() [1/2]

MpGraph* ContoursReconstructor ( const RPArray< MbCurve > &  curveList,
MpGraph graph,
PArray< MbContour > &  contourArray,
double  accuracy,
bool  strict,
VERSION  version,
IProgressIndicator progInd = nullptr 
)

Reconstruct contours constructed around the point before.

Reconstruct contours constructed around the point before. The function reconstructs the graph constructed by EncloseContoursBuilder function.

Parameters
[in]curveList- List of curves for construction.
[in]graph- A graph to reconstruct.
[out]contourArray- The result of construction is a set of contours.
[in]accuracy- The accuracy of determining the intersection of curves and proximity.
[in]strict- If false, the construction is performed roughly.
[in]version- The version of construction. The last version Math::DefaultMathVersion().
[in]progInd- Execution progress indicator.
Returns
Contours construction graph.
Warning
While using functions EncloseContoursBuilder, OuterContoursBuilder, ContoursReconstructor, a single state of 'strict' flag and version must be used in one treatment process.

◆ ContoursReconstructor() [2/2]

MpGraph* ContoursReconstructor ( const c3d::PlaneCurvesSPtrVector &  curveList,
MpGraph graph,
c3d::PlaneContoursSPtrVector  contourArray,
double  accuracy,
bool  strict,
VERSION  version,
IProgressIndicator progInd = nullptr 
)

Reconstruct contours constructed around the point before.

Reconstruct contours constructed around the point before. The function reconstructs the graph constructed by EncloseContoursBuilder function.

Parameters
[in]curveList- List of curves for construction.
[in]graph- A graph to reconstruct.
[out]contourArray- The result of construction is a set of contours.
[in]accuracy- The accuracy of determining the intersection of curves and proximity.
[in]strict- If false, the construction is performed roughly.
[in]version- The version of construction. The last version Math::DefaultMathVersion().
[in]progInd- Execution progress indicator.
Returns
Contours construction graph.
Warning
While using functions EncloseContoursBuilder, OuterContoursBuilder, ContoursReconstructor, a single state of 'strict' flag and version must be used in one treatment process.

◆ NearPointProjections()

void NearPointProjections ( const MbContour contour,
const MbCartPoint pnt,
SArray< double > &  tProjs,
bool  isNear,
double  mEps = METRIC_REGION 
)

Nearest projections on the contour.

Nearest projections of point on the contour.

Parameters
[in]contour- A contour.
[in]pnt- Projecting point.
[out]tProjs- Parameters of nearest projections.
[in]isNear- Select only the projections which are located from projecting point within a given tolerance.
[in]mEps- A tolerance of nearest points selection.

◆ NearestPoints()

MbeNewtonResult NearestPoints ( const MbCurve curve1,
bool  ext1,
const MbCurve curve2,
bool  ext2,
double  xEpsilon,
double  yEpsilon,
double &  t1,
double &  t2,
double &  dmin,
VERSION  version = Math::DefaultMathVersion() 
)

Calculate parameters of the nearest points of two curves.

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

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

◆ AreaSign()

double AreaSign ( const MbCurve curve,
double  sag,
bool  close 
)

An area and orientation of a closed curve.

Calculate an area of a closed curve. Orientation of a closed curve is defined by the sign of an area. If the area is positive then the closed curve is directed counterclockwise.
If the curve is not closed, but the flag of closedness is set, then an area will be calculated for the curve which is closed by a section connecting bounds.

Parameters
[in]curve- The initial curve.
[in]sag- An angular deviation of a tangent curve at the neighbor integration points, is it used for the calculation of the step by a curve.
[in]close- A flag of closedness.
Returns
An area of closed curve with a sign (orientation).

◆ EqualPoints()

template<class Point >
bool c3d::EqualPoints ( const Point &  p1,
const Point &  p2,
double  xEpsilon,
double  yEpsilon 
)

Check points for equality.

Parameters
[in]p1- The first cartesian point.
[in]p2- The second cartesian point.
[in]xEpsilon- The metric tolerance of points coincidence along the X axis.
[in]yEpsilon- The metric tolerance of points coincidence along the Y axis.
Returns
True if points coincide,
false otherwise.

◆ EqualVectors()

template<class Vector >
bool c3d::EqualVectors ( const Vector &  p1,
const Vector &  p2,
double  xEpsilon,
double  yEpsilon 
)

Check equality of vectors with given tolerance.

Check equality of vectors with given tolerance. Vectors are equal if their coordinates differs less than given tolerance.

Parameters
[in]p1- The first vector.
[in]p2- The second vector.
[in]xEpsilon- The metric tolerance of points coincidence along the X axis.
[in]yEpsilon- The metric tolerance of points coincidence along the Y axis.
Returns
Returns true if the vectors are equal.

◆ EqualLengths()

bool c3d::EqualLengths ( double  lx,
double  ly,
double  minLen = METRIC_EPSILON,
double  minDev = LENGTH_EPSILON 
)
inline

Check lengths for equality.

Parameters
[in]lx,ly- Compared lengths.
[in]minLen- A minimum possible length.
[in]minDev- A metric accuracy of lengths equality.
Returns
True if lengths are equal,
false otherwise.

◆ FilletMultiline()

bool FilletMultiline ( MbMultiline multiline,
double  rad,
bool  nodeFlag,
MbCartPoint pnt,
const StVertexOfMultilineInfo vertInfo 
)

Construct a fillet of multiline.

Construct a fillet of the base curve of multiline.

Parameters
[in]multiline- A multiline to be modified.
[in]rad- The radius of fillet.
[in]nodeFlag- Flag of selection of vertices to fillet:
true - fillet of all vertices of multiline,
false - fillet of the vertex nearest to 'pnt' point.
[in]pnt- Point for indication the required vertex.
[in]vertInfo- Information for new vertices of a multiline.

◆ ChamferMultiline()

bool ChamferMultiline ( MbMultiline multiline,
double  len,
double  par,
bool  type,
bool  nodeFlag,
MbCartPoint pnt,
const StVertexOfMultilineInfo vertInfo 
)

Construct a chamfer of multiline.

Construct a chamfer of the base curve of multiline.

Parameters
[in]multiline- A multiline to be modified.
[in]len- Length of chamfer.
[in]par- Parameter depending on 'type' type:
if type = true, par is a corner,
if type = false, par is a size.
[in]type- The type of a chamfer specification:
true - chamfer specified as size + angle,
false - chamfer specified as size + size.
[in]nodeFlag- Flag of selection of vertices to process:
true - chamfer between each two neighboring segments of multiline,
false - chamfer between two neighboring multiline segments joining at the vertex nearest to 'pnt' point.
[in]pnt- Point for indication the required pair of segments.
[in]vertInfo- Information for new vertices of a multiline.

◆ ToTakeIntoCurvesCrvRadii()

void ToTakeIntoCurvesCrvRadii ( MbCurve curve,
double  angle,
double &  minPos,
double &  maxNeg 
)

Out-of-class functions for curvature radii calculation/consideration (implementation in MltLine.cpp)

Consider the curve curvature radii.

Consider the curve curvature minimum positive and maximum negative radii.
For internal use only.

Parameters
[in]curve- A curve of multiline.
[in]angle- An angular tolerance.
[in,out]minPos- Curve radius if it is less than current value of 'minPos' variable.
[in,out]maxNeg- Curve radius if it is greater than current value of 'minPos' variable.

◆ GetContoursCrvRadii()

void GetContoursCrvRadii ( MbContour contour,
double  angle,
double &  minPos,
double &  maxNeg 
)

Get the contour curvatures radii.

Get the contour curvature minimum positive and maximum negative radii.
For internal use only.

Parameters
[in]contour- A contour.
[in]angle- An angular tolerance.
[out]minPos- Minimal contour segment radius.
[out]maxNeg- Maximal contour segment radius.

◆ SmoothJointSuccessiveCurves()

bool SmoothJointSuccessiveCurves ( MbCurve curve1,
MbCurve curve2 
)

Join two curves.

Smoothly join two consecutive curves.
For internal use only.

Parameters
[in]curve1- The first curve.
[in]curve2- The second curve.
Returns
True if at least one curve has been changed.

◆ BreakMultiline()

bool BreakMultiline ( const MbMultiline multiline,
const MbCartPoint p1,
const MbCartPoint p2,
PArray< MbMultiline > &  parts 
)

Split multiline.

Split multiline into two pieces.

Parameters
[in]multiline- A multiline to be split.
[in]p1- Splitting point or start point of a new multiline if the multiline is closed.
[in]p2- End point of a new multiline if the multiline is closed.
[out]parts- The array of obtained pieces (two elements).

◆ BreakMultilineNParts()

bool BreakMultilineNParts ( const MbMultiline multiline,
size_t  partsCount,
const MbCartPoint point,
PArray< MbMultiline > &  parts 
)

Split multiline.

Split multiline into N equal pieces.

Parameters
[in]multiline- A multiline to be split.
[in]partsCount- The count of pieces.
[in]point- Bounding point for closed multiline.
[out]parts- The array of obtained pieces (partsCount elements).

◆ GetCorrectRegions()

void GetCorrectRegions ( const RPArray< MbContour > &  contours,
bool  sameContours,
RPArray< MbRegion > &  regions 
)

Get a set of regions.

Get a set of correct regions from arbitrary set of regions.
From sent contours there are selected such contours which are suitable for construction of region - closed, without self-intersections and discontinuities.

Parameters
[in]contours- A set of contours.
[in]sameContours- A flag of using of contours originals when creating regions.
[out]regions- The result is a set of points.

◆ MakeRegions()

void MakeRegions ( RPArray< MbContour > &  contours,
bool  useSelfIntCntrs,
bool  sameContours,
RPArray< MbRegion > &  regions 
)

Divide a set of regions into groups and construct regions.

Divide arbitrary set of contours into connected groups of contours and construct regions.
For any contour belonging to connected group, this group contain all contours:
1) which coincide with the given contour
2) which intersect the given contour
3) which contain the given contour
4) which are contained in the given contour
Groups are returned in regions form (perhaps, incorrect).

Parameters
[in]contours- A set of contours for dividing into groups.
[in]useSelfIntCntrs- If true then self-intersected contours form separate groups (incorrect regions), otherwise - such contours are not used at all.
[in]sameContours- A flag of using of contours originals when creating regions.
[out]regions- The result is a set of points.

◆ CreateBooleanResultRegions() [1/2]

bool CreateBooleanResultRegions ( RPArray< MbContour > &  contours1,
RPArray< MbContour > &  contours2,
const MbRegionBooleanParams operParams,
RPArray< MbRegion > &  regions,
MbResultType resInfo = nullptr 
)

Perform boolean operation with regions.

Perform boolean operation with two regions, which are set by the contours array.
Polyline is undesirable as a contour segment. It needs to be converted to a set of segments.

Parameters
[in]contours1- First set of contours.
[in]contours2- Second set of contours.
[in]operParams- A Boolean operation parameters.
[out]regions- The result is a set of points.
[out]resInfo- Operation result code.
Returns
Returns true if the operation succeeded.

◆ CreateBooleanResultRegions() [2/2]

bool CreateBooleanResultRegions ( MbRegion region1,
MbRegion region2,
const MbRegionBooleanParams operParams,
RPArray< MbRegion > &  regions,
MbResultType resInfo = nullptr 
)

Perform boolean operation with regions.

Perform boolean operation with two regions.

Parameters
[in]region1- First region.
[in]region2- Second region.
[in]operParams- A Boolean operation parameters.
[out]regions- The result is a set of points.
[out]resInfo- Operation result code.
Returns
Returns true if the operation succeeded.

◆ MakeUnionRegions()

bool MakeUnionRegions ( RPArray< MbRegion > &  regions,
bool  allowSelfTouch = true,
bool  mergeCurves = true 
)

Perform union of regions.

Perform union of regions.

Parameters
[in,out]regions- Initial and resulting regions.
[in]allowSelfTouch- Admissibility of self-touches as a result.
[in]mergeCurves- Merge similar segments of curves.
Returns
Returns true if a pair of regions has been united.