.. role:: blue :class: blue Construction of a Revolution Surface ==================================== .. _Construction_of_Revolution_Surface_: .. kernel version: 118057 The function .. code-block:: cpp MbResultType RevolutionSurface( const MbCurve3D & curve, const MbCartPoint3D & origin, const MbVector3D & axis, double angle, bool simplify, MbSurface *& result ); constructs a revolution surface. The input parameters of the function are: - **curve** is a generatrix curve; - **origin** is a point defining the position of the rotation axis; - **axis** is a direction of the rotation axis; - **angle** is a rotation angle; - **simplify** is a flag for simplifying the resulting surface (if possible, an elementary surface is created, for example, a sphere, a torus, a cylinder, or a cone instead of a general revolution surface). 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 :ref:`MbResultType ` enumeration (see *mb_operation_result.h*). The function is declared in the *action_surface.h* file. A revolution surface is obtained by moving the generatrix curve along an arc of a circle whose center lies on an axis passing through the **origin** point in the direction of the **axis** vector, and whose sweep angle is equal to **angle**. If the **simplify** flag is set to *true*, the function tries to create a simplified (elementary) surface. For example, when a straight line is revolved about an axis, a cylindrical, conical, or planar surface can be created; when an arc of a circle is revolved, a spherical or toroidal surface can be created. A revolution surface is described in subsection :ref:`Revolution surface MbRevolutionSurface `. Figure shows a surface constructed by revolving a curve about an axis through a given angle: .. figure:: /MODELER/SURFACE_CONSTRUCTION_METHODS/pictures/M.5.4.1.png :width: 12cm :align: center In the test.exe application, construction of a revolution surface is performed by the menu command: “Create → Surface → Based on curves → Revolution”.