Synopsis

PDX_MSGT gdx_GetCurveNumSegs(long option, void *gdx_curve, long *num_segs)

Purpose

Retrieves the number of segments in u, v for a given curve.

Description

Given a GDX curve, determines the number of segments. If the curve is defined using a base curve, the number of segments is taken from that base curve. Segments are defined as follows:

GDX entity Segment Determination
GDX_CONIC Hyperbolas and parabolas are considered to be 1
segment. Ellipses are considered to have a segment
for each 90 degrees of the angular span.
GDX_NURB_CURVE Segments are taken from distinct knot values within
the knot vector (taking bounds into consideration)
GDX_ARC Each quarter circle is considered to be a segment.
GDX_SPLINE_CURVE Segments are taken from the nsegs field.
GDX_POLYLINE The number of segments is set to num_of_points - 1
(a single point will also return a single segment).
GDX_COMP_CURVE The number of segments will be set to the sum of
the number of segments of each constituent curve
GDX_OFFSET_CURVE The number of segments will be set to that of the
base curve.
GDX_TRIM_CURVE The number of segments will be set to that of the
base curve.

Input

option

Options (not used)

gdx_curve

Entity structure pointer of the GDX Surface

Output

num_segs

The number of u segments

Tolerances

      KNOT_TOL
      ANGLE_TOL
      .fi

Return

      GDX_NOERR
      Low level error return
      .fi