HM_ExtAPI::CreateSurfaceCylinder()

Creates cylindrical surface object.

Syntax

bool CreateSurfaceCylinder(
HM_EntityGeometrySurface& new_cylinder,
const HM_Point& center_point,
const HM_Vector& axis,
const HM_Vector& origin_dir,
double radius,
double axis_vfactor
);

Type

HyperMesh Tcl Modify Command

Description

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

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,

p = P - n (nP) , n = N / | N |

The following table summarizes correspondence of the cylinder parameters and the parameters used by the function CreateSurfaceCylinder.

Parameters used by CreateSurfaceCylinder Cylinder parameters
center_point C
axis N
origina_dir P
radius R
axis_vfactor ε

Note that the axis vector defined by the axis parameter does not have to have unit length.

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_cylinder
[out] - Handle to new surface object.
center_point
[in] - Center point of the circular cross section at cylinder base.
axis
[in] - Cylinder axis vector.
origin_dir
[in] - Vector that defines position of the circle corresponding to U=0 parameter.
radius
[in] - Cylinder radius.
axis_vfactor
[in] - The factor that defines the rate of the change of the cylinder height corresponding to the changes of V parameter (see Description section above).

Errors

None.