# NAME

GDX_NURB_CURVE - General Rational B-Spline Curve

# GENERAL DESCRIPTION

A GDX General Rational B-Spline Curve (GDX NURB Curve) represents a piecewise parametric polynomial or rational curve described in terms of degree, control points, basis functions, knots and possibly weights. The control points are stored along with the weights in 4D homogenous form where the coordinates have been pre-multiplitied by the corresponding weights. Thus, the control points and weights are stored in a 4D array as X*W, Y*W, Z*W, and W.

Note that the maximum knot multiplicity allowed for internal knots is degree times and for end knots is order (i.e., degree + 1) times.

# DDF SPECIFICATION

    entity 1:0   GDX_NURB_CURVE   "General Rational B-Spline Curve" {

    char
    TYPE;

    count
    DEGREE;

    let
    ORDER = DEGREE + 1;

    count
    NUM_OF_KNOTS;

    count
    NUM_OF_CTRL_PTS;

    char
    PLANAR;

    char
    XY_PLANAR;

    char
    CLOSED;

    char
    RATIONAL;

    char
    PERIODIC;

    double
    KNOTS[NUM_OF_KNOTS];

    double
    CTRL_PTS[NUM_OF_CTRL_PTS * 4];

    double
    BOUNDS[2];

    double
    PLANE_NORMAL[3];

    };

# FIELD DESCRIPTIONS

TYPE

The type of the GDX Nurb Curve. Used to indicate that a particular geometric form is represented by the GDX NURB Curve. To set or check this value, use one of the following #defines (available by including gdx_Interface.h):

GDX_NURB_GENERAL

The form of the curve represented by the GDX NURB Curve is not specified.

GDX_NURB_LINE

The GDX NURB Curve represents a line.

GDX_NURB_ARC

The GDX NURB Curve represents a circular arc.

GDX_NURB_ELLIPSE

The GDX NURB Curve represents an ellipse.

GDX_NURB_PARABOLA

The GDX NURB Curve represents a parabola.

GDX_NURB_HYPERBOLA

The GDX NURB Curve represents a hyperbola.

GDX_NURB_COMPOSITE

The GDX NURB Curve represents a composite curve.

GDX_NURB_OFFSET_CURV

The GDX NURB Curve represents a offset curve.

GDX_NURB_POINT_CURV

The GDX NURB Curve represents a point (degenerate curve).

DEGREE

The degree of the basis functions.

ORDER

The order of the basis functions (= DEGREE + 1).

NUM_OF_KNOTS

The total number of knots in the knot vector used to define the basis functions.

NUM_OF_CTRL_PTS

The number of control points used to define the GDX NURB Curve.

PLANAR

Flag indicating whether or not the curve is planar. Note that if the curve is linear it is not considered to be planar as it is contained in an infinite number of different planes.

PDX_TRUE

The curve is planar.

PDX_FALSE

The curve is not planar.

XY_PLANAR

Flag indicating whether or not the curve lies in the Z = 0.0 plane.

PDX_TRUE

The curve lies in the Z = 0.0 plane.

PDX_FALSE

The curve does not lie in the Z = 0.0 plane.

CLOSED

Flag indicating whether or not the curve is closed.

PDX_TRUE

The curve is closed.

PDX_FALSE

The curve is not closed.

RATIONAL

Flag indicating whether or not the GDX NURB Curve is rational. If a NURB curve is indicated as non-rational, the weights will be ignored (treated as if all weights are set to 1.0).

PDX_TRUE

The curve is rational.

PDX_FALSE

The curve is non-rational.

PERIODIC

Flag indicating whether or not the GDX NURB Curve is periodic. A GDX NURB Curve is considered periodic if it is unclamped (i.e., the knots at the start and end of the knot vector do not have orderful multiplicity).

PDX_TRUE

The curve is periodic.

PDX_FALSE

The curve is non-periodic.

KNOTS

The non-decreasing set of knots that form the knot vector used by the basis functions.

CTRL_PTS

The set of 4D homogenous coordinates (X*W, Y*W, Z*W, W) that define the control points and weights of the GDX NURB Curve.

BOUNDS

The active parametric range of the curve.

BOUNDS[0]

The GDX NURB Curve starting parameter.

BOUNDS[1]

The GDX NURB Curve ending parameter.

PLANE_NORMAL

The 3D coefficients of the normal vector to the plane of the curve if the curve is planar. If non-planar, these values should be set to 0.0 and will be ignored.

# PARAMETERIZATION

The parameterization is the same as that used for the IGES Rational B-Spline Curve Entity (Type 126) and can be found in Appendix B of The Initial Graphics Exchange Specification (IGES) Version 5.2.

# PARAMETRIC RANGE

The GDX NURB Curve is defined over the following parametric range: KNOTS[DEGREE] <= u <= KNOTS[NUM_OF_KNOTS - ORDER]

The BOUNDS fields "trim" the parameter range as follows: BOUNDS[0] <= u <= BOUNDS[1]

# RESTRICTIONS

The GDX Nurb Curve is subject to the following restrictions: 0 < DEGREE <= GDX_MAX_DEG NUM_OF_CTRL_PTS > 1 CTRL_PTS[(I * 4) + 3] > 0.0, where 0 <= I <= (NUM_OF_CTRL_PTS - 1) (i.e., all weights > 0.0) KNOTS[DEGREE] <= BOUNDS[0] < KNOTS[NUM_OF_KNOTS - ORDER] KNOTS[DEGREE] < BOUNDS[1] <= KNOTS[NUM_OF_KNOTS - ORDER] multiplicity of KNOTS[I] <= ORDER, where I = 0, I = (NUM_OF_KNOTS - 1) multiplicity of KNOTS[I] <= DEGREE, where DEGREE < I < (NUM_OF_KNOTS - ORDER)