Constructing Two-Dimensional Compound Curve
The function
MbResultType CreateContour( MbCurve & curve,
MbContour *& result );
constructs a compound curve (contour) based on an original curve.
curve original curve is an input parameter of the function.
The output parameter of the function is the pointer result containing a constructed curve.
If successful, the function returns rt_Success, otherwise it returns an error code from MbResultType.
The function is declared in the action_curve.h file.
The function constructs result compound curve based on the original curve. If the original curve is also compound, then result curve will include the components of the original curve. Two-dimensional compound curves are described in Item MbContour Two-Dimensional Contour.
The function
MbResultType AddCurveToContour( MbCurve & curve,
MbContour & contour,
bool toEnd,
double epsilon = METRIC_REGION );
modifies a compound curve by adding another curve.
The input parameters of the function are:
curve — a curve to be added;
contour — a compound curve to be modified;
toEnd — the flag indicating the position to add the curve;
epsilon — the point coincidence tolerance when adding the curve.
The output parameter of the function is the modified curve contour.
Upon successful completion, the function returns rt_Success; otherwise, it returns an error code from the MbResultType_ enumeration.
The function is declared in the action_curve.h file.
The function modifies the compound curve contour by adding the curve curve to the beginning or end of the compound curve.
If toEnd = true, the curve curve will be added to the end of the compound curve contour; if toEnd = false, the curve curve will be added to the beginning of the compound curve contour. The connection points of the modified curve and the added curve must coincide within the tolerance epsilon:
If the added curve curve is a compound curve, its components will be added to the contour curve.