.. role:: blue :class: blue Constructing Two-Dimensional Compound Curve =========================================== .. _Constructing_Two-Dimensional_Compound_Curve_: .. версия ядра: 118047 The function .. code-block:: cpp 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 :blue:`rt_Success`, otherwise it returns an error code from :ref:`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 :ref:`MbContour Two-Dimensional Contour `. The function .. code-block:: cpp 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 :blue:`rt_Success`; otherwise, it returns an error code from the :ref:`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**: .. figure:: /MODELER/TWO-DIMENSIONAL_CURVE_CONSTRUCTION_METHODS/pictures/M.3.7.1.png :width: 12cm :align: center If the added curve **curve** is a compound curve, its components will be added to the **contour** curve.