HM_ExtAPI::CurveSegmentGetData()

Returns parameters that define straight segment curve.

Syntax

bool CurveSegmentGetData(
const HM_EntityGeometryCurve & curve,
HM_Point& start_point,
HM_Point& end_point
);

Type

HyperMesh Ext API

Description

The function expects that the type of curve object is HM_ExtAPI::SEGMENT(). Application should call the function HM_ExtAPI::GeomCurveGetType() to verify the type before calling CurveSegmentGetData function.

The points on the segment can be calculated parametrically as linear interpolation between start and end points

C(t) = S (1 - t) + E t

using parameters returned by the CurveSegmentGetData function as summarized in the table below.

Parameters used by CurveSegmentGetData Segment parameters
start_point S
end_point E

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.
start_point
[out] - The point corresponding to curve parameter value 0.
end_point
[out] - The point corresponding to curve parameter value 1.

Errors

None.