HM_ExtAPI::CreateSurfaceCone()

Creates cone surface object.

Syntax

bool CreateSurfaceCone(
HM_EntityGeometrySurface & new_cone,
const HM_Point& center_point,
const HM_Vector& axis,
const HM_Vector& ellipse_major_axis,
double ellipse_ratio,
double ellipse_phase,
double ellipse_vparam,
double ellipse_vfactor,
double axis_vfactor
);

Type

HyperMesh Ext API Function

Description

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

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

S(U, V) = C + E0(U) [ 1 + β(V - V0)] + ε n ( V - V0),

where

E0(U) = P cos (U - φ) + α [n X P] sin (U - φ)

are points on the ellipse (shifted to the center point) that defines the cone, and

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

The following table summarizes correspondence of the cone parameters used in the equations above and the parameters used by the function CreateSurfaceCone.
Parameters used by CreateSurfaceCone Cone parameters
center_point C
axis N
elliipse_major_axis P
ellipse_ratio α
ellipse_phase φ
ellipse_vparam V0
ellipse_vfactor β
axis_vfactor ε

Note that the axis vector defined by the axis parameter does not have to have unit length. The vector ellipse_major_axis that defines the major axis of the ellipse corresponding to the parameter V = V0 does not have to be perpendicular to the axis vector but in this case it will be projected to the plane defined by the axis and the center point.

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_cone
[out] - Handle to new surface object.
center_point
[in] - Center point of the ellipse that defines the cone.
axis
[in] - Axis vector normal to the plane of the ellipse that defines the cone.
ellipse_major_axis
[in] - Vector that defines the major axis of the ellipse that defines the cone.
ellipse_ratio
[in] - Ratio between the length of the minor ellipse axis and the major ellipse axis of the ellipse that defines the cone.
ellipse_phase
[in] - Cone U parameter value that corresponds to the end of the major axis of constant V parameter ellipse that define the cone.
ellipse_vparam
[in] - The value of V parameter that corresponds to the ellipse that defines the cone.
ellipse_vfactor
[in] - The factor that defines the rate of the changes of the ellipse size corresponding to the changes of V parameter (see Description section above).
axis_vfactor
[in] - The factor that defines the rate of the changes of the cone height corresponding to the changes of V parameter (see Description section above).

None.