# Synopsis

PDX_MSGT gcr_SplineCurve(long option, MDA_PTR orig_db_ptr, MDA_COUNT degree, MDA_COUNT num_of_segs, double *break_pnts, double **xyz_coefs, int gdx_model, MDA_PTR *gdx_SC_ptr)

# Purpose

Create a GDX Spline Curve.

# Description

Given a set of 3D XYZ ABCD... coefficients, the break points, and the degree of Spline curve, creates a GDX Spline curve.

The degree of the curve degree and the number of curve spline segments num_of_segs must be > 0;

The xy_planar field in the GDX entity will be deterined by verifying that the z coefficients are zero within GDX COPLANAR_TOL.

If the break_pnts knot values array is NULL, then the GDX Spline Curve is assumed to be a uniform curve and the GDX Spline Curve uniform break point values are generated.

If the break point value array is specified, the break point sequence must be in increasing order.

The GDX Spline curve is parameterized from the first break point to the last break point.

\fBRules\fR .IP • 3 num_of_segs > 0 .IP • 3 0 < degree <= GDX_MAX_DEG. .IP • 3 number of break_pnts = num_of_segs + 1 (if break_pnts not NULL) .LP

# Input

## option

### GCR_NOVALIDATE

No validation will occur on the input data.

## orig_db_ptr

The original entities orig_db_ptr as obtained from the mda_GetOrigDbptr call, or MDA_NULL_PTR

## degree

The degree of the Spline curve

## num_of_segs

The number of spline segments for the Spline curve.

## break_pnts

MDA memory containing the num_of_segs + 1 spline break point values or NULL. Always consumed by this function even on error.

## xyz_coefs

MDA memory array containing the 3D XYZ ABCD... order coefficient values xyz_coefs[num_of_segs][(degree + 1) * 3] Always consumed by this function even on error.

## gdx_model

The GDX model for entity creation

# Output

## gdx_SC_ptr

Entity database pointer of the GDX Spline Curve

# Tolerances

          GDX COPLANAR_TOL
          .fi

# Return

          GCR_NOERR
          GCR_SPLINE_DEGREE
          GCR_SPLINE_NUM_OF_SEGS
          Low level error return
          .fi