HM_ExtAPI::CurveCircleGetData()
Returns parameters that define circle.
Syntax
bool CurveCircleGetData(
const HM_EntityGeometryCurve& curve,
HM_Point& center_point,
HM_Vector& unit_normal,
HM_Vector& radius
);
Type
HyperMesh Ext API Function
Description
The function expects that the type of curve object is HM_ExtAPI::CIRCLE(). Application should call the function HM_ExtAPI::GeomCurveGetType() to verify the type before calling CurveCircleGetData function.
The points on the circle can be calculated parametrically as
C(t) = C + R cos t + [n X R] sin t
Using parameters returned by the CurveCircleGetData function as
summarized in the table below.
Parameters used by CurveCircleGetData | Circle parameters |
---|---|
center_point | C |
unit_normal | n |
radius | R |
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
- curve
- [in] - Handle to curve object that was returned by previous calls to API functions.
- center_point
- [out] - Circle center points.
- unit_normal
- [out] - Unit length vector normal to the plane that contains the circle.
- radius
- [out] - Vector from center point to circle point corresponding to zero angle parameter.
Errors
None.