# Synopsis

PDX_MSGT gdx_DataReduceNurbSurf(long option, int gdx_model, MDA_PTR gdx_ns_ptr, double ubdytol, double vbdytol, double inttol, MDA_PTR *gdx_new_ns_ptr)

# Purpose

Data reduce a GDX NURB Surface, maintaining a specified tolerance.

# Description

This routine takes an input surface and reduces the number of control points to obtain another surface which approximates the original surface to within the specified maximum deviation tolerances. Separate tolerances can be specified for the boundaries and the interior of the surface. The knots of the output surface are a subset of the original knots. Degree and rationality of the surface are not changed. The corner points (and weights) remain unchanged.

# Input

## option

### GDX_LEAVE_LOCKED

If set, the returned entity will be left locked; in this case it is up to the caller to unlock the entity via mda_UnlockEntity. Note: the entity structure can be accessed via mda_GetLockedAddr.

## gdx_model

The GDX model for entity creation.

## gdx_ns_ptr

The database pointer of the GDX NURB Surface to be reduced.

## ubdytol

Allowable deviation tolerance for the u=umin and u=umax boundaries. If ubdytol < 0, no attempt will be made to remove any v-knots (hence, the u=umin and u=umax boundaries will absolutely not change).

## vbdytol

Allowable deviation tolerance for the v=vmin and v=vmax boundaries. If vbdytol < 0, no attempt will be made to remove any u-knots (hence, the v=vmin and v=vmax boundaries will absolutely not change).

## inttol

Allowable deviation tolerance for the interior of the surface. inttol >= 0 must hold.

# Output

## gdx_new_ns_ptr

The database pointer of the reduced surface. MDA_NULL_PTR pointer will be returned if the surface could not be data reduced, subject to the specified deviation tolerance.

# Return

          GDX_NOERR
          GDX_BADDATA
          Low level error return
          .fi