HM_ExtAPI::CreateSurfaceRevolution()

Creates revolution surface object.

Syntax

bool CreateSurfaceRevolution(
HM_EntityGeometrySurface& new_surf,
const HM_EntityGeometryCurve& generator_curve,
const HM_Point& center,
const HM_Vector& axis
);

Type

HyperMesh Ext API

Description

The function creates the surface object of the type HM_ExtAPI::REVOLUTION_SURFACE().

Surface of revolution is defined by “generator” curve and rotation axis. The surface is obtained by rotating the curve around the axis in counter clockwise direction. Parameter V corresponds to the parameter of the curve. Parameter U corresponds to the rotation angle.

Parametrically, the surface of revolution can be represented as

S(U, V) = A + n (n R(V)) + [R(V) - n (n R(V))] cos U + [n X R(V)] sin U

Where n = N / | N | is the unit axis vector and R(V) = C(V) – A is the radius vector from the axis origin A to the point on the curve.

Parameters used by CreateSurfaceRevolution surface parameters
generator_curve C(V)
center A
axis N

If the function succeeds, the return value is true. If the function fails, the return value is false. To get extended value information, call HM_ExtAPI::GetLastErrorCode().

Requires including hm_extapi.h.

Inputs

new_surf
[out] - Handle to new surface object.
generator_curve
[in] - Handle to curve object that represents the curve used to generate revolution surface. The handle that was returned by previous calls to API functions must be used.
center
[in] - Point on revolution axis.
axis
[in] - Revolution on axis vector.

Errors

None.