HM_ExtAPI::SurfaceRevolutionGetData()

Returns parameters that define revolution surface.

Syntax

bool SurfaceRevolutionGetData(
const HM_EntityGeometrySurface & surface,
HM_EntityGeometryCurve & generator_curve,
HM_Point& center,
HM_Vector& unit_axis
);

Type

HyperMesh Ext API

Description

The function expects that the type of surface object is HM_ExtAPI::REVOLUTION_SURFACE(). Application should call the function HM_ExtAPI::GeomSurfaceGetType() to verify the type before calling SurfaceRevolutionGetData function.

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 is the axis vector and R(V) = C(V) – A is the radius vector from the axis origin A to the point on the curve.

Parameters returned by SurfaceRevolutionGetData Revolution surface parameters
generator_curve C(V)
center A
unit_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

surface
[in] - Handle to surface object that was returned by previous calls to API functions.
generator_curve
[out] - Handle to curve object that represents the curve used to generate revolution surface.
center
[out] - Point on revolution axis.
unit_axis
[out] - Unit length revolution axis vector.

Errors

None.