# Synopsis

PDX_MSGT gdx_ApproxNurbCurveAsParmSpl(long option, MDA_PTR gdx_nc_ptr, int model, int degree, double tolerance, int max_iters, void *gdx_spline)

# Purpose

Approximate a GDX NURB Curve as a GDX spline curve

# Description

Convert a GDX NURB curve to a GDX spline curve. Mathmatically, only non-ration NURBS curve can be converted to parametric splines. So any input rational NURBS curve will result in an approximate spline curve. The conversion of rational NURBS curve to splines is exact. If the input NURBS curve is rational it is converted to a non-rational NURBS curve using the tolerance and degree. The resulting non-rational appriximated NURBS curve is then converted to a GDX spline curve. By default, If the u_degree or v_degree of the input curve is greater than the specified u_degree or v_degree, then the input NURBS curve is approximated. However, if the option GDX_RATIONAL_ONLY is specified, the non-rational nurbs will be approximated directly.

# Input

## option

### GDX_COMMIT

Commit the GDX parametric spline to the database

### GDX_RATIONAL_ONLY

By default the NURBS surface is approximated if the degree is higher than specified or rational. If this option is set, the NURBS surface will only be approximated if it is rational. Thus all input non-rational NURBS will be directly converted to splines.

## gdx_nc_ptr

The valid GDX NURB Curve entity database pointer

## model

The model to create the GDX parametric spline curve in

## degree

The degree of the parametric spline curve

## tolerance

The conversion approximation tolerance

## max_iters

The maximium iterations to allow for convergence to tolerance

# Output

## gdx_spline

The parametric spline curve entity database pointer or structure pointer

# Tolerances

          MODEL_SPACE_PNT_TOL
          PNT_PROJ_TOL
          ANGLE_TOL
          ZERO_TOL
          .fi

# Return

          GDX_NOERR
          GDX_CURVENOTNURBS
          GDX_INVALIDMODEL
          Low level error return
          .fi