Construction of a Revolution Surface

The function

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 rt_Success; otherwise, it returns a result code from the 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 Revolution surface MbRevolutionSurface. Figure shows a surface constructed by revolving a curve about an axis through a given angle:

../../../../_images/M.5.4.1.png

In the test.exe application, construction of a revolution surface is performed by the menu command:

“Create → Surface → Based on curves → Revolution”.