Synopsis

PDX_MSGT gdx_ReduceCurveDegree(long option, T_GDX_NURB_CURVE *cur, int times, double toler, double *deverr)

Purpose

Reduce degree of Nurbs curve (if it is precisely reducible).

Description

This routine attempts to degree reduce a curve, precisely. That is, if the curve has degree p, then it will iteratively reduce the degree of the curve to p-1, p-2 ,..., p- times, as long as the resulting curves do not deviate from the original curve by more than the tolerance toler. The old curve is destroyed (but the cur pointer remains the same).

Input

option

Not used.

cur

will be a valid curve, even if an error is returned.

times

Try to reduce the degree this many times (1 <= times < p), where p is the degree of the original curve.

toler

The degree reduced curve will not deviate from the original curve by more than this tolerance.

Output

cur

Pointer not changed, but the contents of the structure pointed to by cur are changed.

deverr

The actual measured deviation of the degree reduced curve from the original.

Return

      GDX_NOERR
      Low level error return
      .fi