.. role:: blue :class: blue Constructing a Ruled Body ========================= .. _Constructing_a_Ruled_Body_: .. kernel version: 118041 The function .. code-block:: cpp MbResultType RuledShell( const MbRuledShellParams & ruledParams, MbRuledShellResult & outParams ); constructs a non-closed ruled body from two parametrically defined curves. A **ruledParams** object of the :blue:`MbRuledShellParams` class is the input parameter of the function (see *op_shell_parameter.h*) and contains the construction parameters: - **pars** -- is an object containing operation parameters (geometric information needed to construct the body); - **operNames** -- is the operation namer; - **isPhantom** -- is the phantom creation mode. The function output parameter is the **result** parameter, which contains a constructed body. The function returns a result code of the operation from the :blue:`MbResultType` enumeration (see *mb_operation_result.h*). This function is declared in *action_shell.h* file. A ruled body is constructed from two curves -- **pars**.\ *curve0* and **pars**.\ *curve1*. If the curves are composite, then a ruled surface will be constructed based on each pair of compound curve segments, and a body face will be constructed on each surface. Adjacent faces will have common edges. The **pars**.\ *curve0* and **pars**.\ *curve1* curves can be additionally split into segments using **pars**.\ *breaks0* and **pars**.\ *breaks1* parameters. The **pars**.\ *joinByVertices* parameter indicates whether it is required to connect the contours having the same number of segments through the vertexes. By default, **pars**.\ *joinByVertices* = *false*. The **pars**.\ *checkSelfInt* parameter indicates whether it is necessary to check the curves for self-intersection. By default, **pars**.\ *checkSelfInt* = *false*. The **pars**.\ *simplifyFaces* parameter specifies whether to simplify edges of a constructed body. The **pars**.\ *proportional* parameter initiates the proportional natural curve parametrization. The **pars**.\ *mismatchMax* parameter defines the acceptable mismatch of opposite segment connection points. The **pars**.\ *segmentSplit* parameter indicates whether to divide a shell into faces by contour segments. Fig. shows a ruled body constructed from compound curves and each curve has three segments: .. figure:: /MODELER/METHODS_OF_SOLID_BUILDING/pictures/M.1.9.2.png :width: 12cm :align: center A constructed body has one or several faces. A ruled surface always has borders formed by the initial curves. This function can check the faces for self-intersection. **pars**.\ *curve0* and **pars**.\ *curve1* curves can be cyclically closed. The function adds :blue:`MbRuledShell` constructor declared in *cr_ruled_shell.h* file in a newly constructed body log.