.. role:: blue :class: blue Construction of an extrusion surface ==================================== .. _Construction_of_Extrusion_Surface_: .. kernel version: 118057 The function .. code-block:: cpp MbResultType ExtrusionSurface( const MbCurve3D & curve, const MbVector3D & direction, bool simplify, MbSurface *& result ) constructs an extrusion surface. The input parameters of the function are: - **curve** — a generatrix curve; - **direction** — an extrusion vector that defines a direction and a length; - **simplify** — a flag for simplifying a surface, if it is possible (for example, reducing it to a simpler analytical type when it is allowed). The output parameter of the function is the constructed surface **result**. If successful, the function returns :blue:`rt_Success`; otherwise, it returns a result code from the :blue:`MbResultType` enumeration (see *mb_operation_result.h*). The function is declared in the *action_surface.h* file. An extrusion surface is one of the motion surfaces obtained by moving a generatrix curve along a given trajectory (a directing curve). For an extrusion surface, the trajectory is a straight-line segment defined by the **direction** vector. The extrusion surface is described in :ref:`MbExtrusionSurface extrusion surface `. Figure shows a surface constructed by extrusion of a curve along a given vector: .. figure:: /MODELER/SURFACE_CONSTRUCTION_METHODS/pictures/M.5.3.1.png :width: 12cm :align: center In the test application *test.exe*, construction of an extrusion surface is performed by the menu command "Create → Surface → Based on curves → Extrusion".