# Synopsis

PDX_MSGT gdx_ApproxNurbSurfAsParmSpl(long option, MDA_PTR gdx_ns_ptr, int model, int u_degree, int v_degree, double tolerance, int max_iters, void *gdx_spline)

# Purpose

Approximate a GDX NURB Surface as a GDX spline surface

# Description

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

# 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_ns_ptr

The valid GDX NURB Surface entity database pointer

## model

The model to create the GDX parametric spline surface

## u_degree

The degree of the parametric spline surface in the u direction

## v_degree

The degree of the parametric spline surface in the v direction

## tolerance

The conversion approximation tolerance

## max_iters

The maximium iterations to allow for convergence to tolerance

# Output

## gdx_spline

The parametric spline surface entity database pointer or structure pointer

# Tolerances

          MODEL_SPACE_PNT_TOL
          PNT_PROJ_TOL
          ANGLE_TOL
          ZERO_TOL
          .fi

# Return

          GDX_NOERR
          GDX_SURFNOTNURBS
          GDX_INVALIDMODEL
          GDX_IN
          Low level error return
          .fi