Synopsis

PDX_MSGT gdx_LocateNurbCurveCusps(long option, T_GDX_NURB_CURVE *cur, double toler, double **cusps, long *numcusps)

Purpose

Locate cusps of a GDX NURB Curve.

Description

This routine finds cusps (visual/geometric tangent discontinuities) which are located at a knot value, and it also finds linear (straight line) segments between two knots. Note the following: - visual tangent discontinuities are found; these may or may not be parametric discontinuities. - only those discontinuities which are at a knot location are found; any discontinuity strictly interior to a knot span will not be found. - discontinuities arising from multiple control points, as well as those from multiple knots (or a mixture) will be found.

Input

option

Not used.

cur

The Nurbs curve.

toler

Point coincidence tolerance

Output

cusps

A 1D array containing the knots (parameter values) corresponding to visual cusps and linear segments. The number of values in cusps is numcusps. The array cusps is allocated in this routine (but only if at least one cusp or linear segments is found). It should be deallocated in the calling program when it is no longer needed.

numcusps

The number of parameter values in the array cusps. These correspond to either cusps or the endpoints of linear segments.

Tolerances

      MODEL_SPACE_PNT_TOL
      ANGLE_TOL
      KNOT_TOL
      ZERO_TOL
      .fi

Return

      GDX_NOERR
      Low level error return
      .fi