HM_ExtAPI::SurfaceCylinderGetData()

Returns parameters that define cylindrical surface.

Syntax

bool SurfaceCylinderGetData(
const HM_EntityGeometrySurface & surface,
HM_Point& center_point,
HM_Vector& unit_axis,
HM_Vector& unit_origin_dir,
double& radius,
double& axis_vfactor
);

Type

HyperMesh Ext API Function

Description

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

The points on the surface of the cylinder can be calculated parametrically as

S(U, V) = C + R ( p cos U + [n X p] sin U ) + ε n V,

The following table summarizes correspondence of the parameters used in the equation to parameters returned by the function SurfaceCylinderGetData.

Parameters returned by SurfaceCylinderGetData Cylinder parameters
center_point C
unit_axis n
unit_origin_dir P
radius R
axis_vfactor ε

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.
center_point
[out] - Center point of the circular cross section at cylinder base.
unit_axis
[out] - Unit length axis vector normal to the plane of the ellipse that defines the cone.
unit_axis
[out] - Unit length cylinder axis vector.
unit_origin_dir
[out] - Unit length vector in the plane of the cylinder circular cross section that defines position of the circle corresponding to U=0 parameter. This vector is normal to the vector unit_axis.
radius
[out] - Cylinder radius.
axis_vfactor
[out] - The factor that defines the rate of the change of the cylinder height corresponding to the changes of V parameter (see Description above).

Errors

None.