# Synopsis

PDX_MSGT gdx_LocateCurveCusps(long option, MDA_PTR gdx_db_ptr, double toler, double **cusps, long *numcusps)

# Purpose

Locate cusps of a GDX curve.

# Description

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

# Input

## option

### GDX_UNNORM

Return normalized paramater values for the cusps that must be unnormalized for evaluation

## gdx_db_ptr

The GDX curve database pointer.

## toler

Point coincidence tolerance

# Output

## cusps

A 1D array containing the (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 must be deallocated in the calling program when it is no longer needed. The parameter values will be normalized (0.0 -> 1.0) if the option is set to GDX_UNNORM.

## numcusps

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

# Return

          GDX_NOERR
          GDX_INVALIDENTITYTYPE
          Low level error return
          .fi