# Synopsis

PDX_MSGT gdx_CubicSplineCurvWithEndDers(long option, int model, MTH_3DPNT *fit_pts, long npts, double **parms, int p_flag, double str_der[3], double end_der[3], double toler, MDA_PTR *gdx_db_ptr)

# Purpose

Create a GDX NURB Curve by cubic spline interpolation.

# Description

This routine does a cubic spline curve interpolation to point data and end derivatives. If option is set to GDX_UNNORM, parameter values, if generated, will not be normalized. Note that this affects the shape as the second and second from last control points are calculated using end derivative information (calculation involves first and last paramter "deltas").

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

If set, parameter values generatred using a relative chord length method will not be normalized.

## model

Model in which to create the GDX NURBS Curve.

## fit_pts

Data points to be fitted.

## npts

Number of points to be fitted.

## parms

The parameter values at which the data points are assumed (see p_flag).

## p_flag

### 1

The parameter values are in parms.

## str_der

Start derivative vector.

## end_der

End derivative vector.

## toler

Curve closure and coincident points tolerance.

# Output

## parms

(if p_flag == 0).

## gdx_db_ptr

The GDX NURB Curve fitted to the data.

# Return

          GDX_NOERR
          GDX_BADDATA  (npts < 2)
          GDX_SINGULAREQS  (singular system of equations)
          GDX_COINPNTS (coincident data points)
          Low level error return
          .fi