HM_ExtAPI::SurfaceConeGetData()
Returns parameters that define cone surface.
Syntax
bool SurfaceConeGetData(
const HM_EntityGeometrySurface & surface,
HM_Point& center_point,
HM_Vector& unit_axis,
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 expects that the type of surface object is HM_ExtAPI::CONE(). Application should call the function HM_ExtAPI::GeomSurfaceGetType() to verify the type before calling SurfaceConeGetData function.
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. The following table summarizes correspondence of the parameters used in the equations to parameters returned by the function SurfaceConeGetData.
Parameters returned by SurfaceConeGetData | Cone parameters |
---|---|
center_point | C |
unit_axis | n |
ellipse_major_axis | P |
ellipse_ratio | α |
ellipse_phase | φ |
ellipse_vparam | V0 |
ellipse_vfactor | β |
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 ellipse that defines the cone.
- unit_axis
- [out] - Unit length axis vector normal to the plane of the ellipse that defines the cone.
- ellipse_major_axis
- [out] - Vector that defines direction of the major axis of the ellipse that defines the cone. The vector has a length equal to major axis half length. This vector is normal to the vector unit_axis.
- ellipse_ratio
- [out] - Ratio between the length of the minor ellipse axis and the major ellipse axis of the ellipse that defines the cone.
- ellipse_phase
- [out] - Cone U parameter value that corresponds to the end of the major axis of constant V parameter ellipse that define the cone.
- ellipse_vparam
- [out] - The value of V parameter that corresponds to the ellipse that defines the cone.
- ellipse_vfactor
- [out] - The factor that defines the rate of the changes of the ellipse size corresponding to the changes of V parameter (see Description above).
- axis_vfactor
- [out] - The factor that defines the rate of the changes of the cone height corresponding to the changes of V parameter (see Description above).
Errors
None.