# NAME

GDX_TRIM_CURVE - Trim Curve

# GENERAL DESCRIPTION

A GDX Trim Curve represents a bounded curve that is obtained by extracting a selected portion, between two specified parameters, from the associated base GDX curve entity. It should be noted that the parameter values T0 and T1 are within the parameter range of the referenced CURVE entity. They are NOT the actual parameter range of the TC itself, as returned by gdx_GetCurvePBounds. Those bounds are defined from 0 to | CURVE parm1 - parm0 | (See description below).

# DDF SPECIFICATION

    entity 7:0  GDX_TRIM_CURVE   "Trim Curve" {

    char
    SENSE;

    double
    T0;

    double
    T1;

    ptr
    CURVE
    reftype = (P_CURVES);

    };

# FIELD DESCRIPTIONS

SENSE

Flag indicating whether the direction of the GDX Trim Curve agrees with or opposes that of the base curve defined by the CURVE field. For an open curve, the sense is redundant (SENSE is PDX_TRUE if T1 > T0 and PDX_FALSE if T0 > T1). Note, however, that the SENSE is essential for determining the correct portion of the base curve when the underlying curve is closed.

PDX_TRUE

The direction of the GDX Trim Curve agrees with the direction of the base curve.

PDX_FALSE

The direction of the GDX Trim Curve disagrees with the direction of the base curve.

T0

The starting parameter of the GDX Trim Curve.

T1

The ending parameter of the GDX Trim Curve.

CURVE

The database pointer of the GDX curve to be trimmed. The allowable GDX entity type/forms consists of the parametrically defined GDX curve entities as defined by the P_CURVES ptrlist variable in gdx.ddf. For reference, these entities are:

GDX_CONIC
GDX_NURB_CURVE
GDX_ARC
GDX_SPLINE_CURVE
GDX_POLYLINE
GDX_COMP_CURVE
GDX_OFFSET_CURVE
GDX_TRIM_CURVE

# PARAMETERIZATION

The GDX Trim Curve inherits its parameterization from the base curve referenced by the GDX Trim Curve via the CURVE field.

       TC(s) = BC(t)
          TC(s) = parameterization of the GDX Trim Curve
          BC(t) = parameterization of the base curve referenced by the
                  GDX Trim Curve via the CURVE field

where s and t are related as follows:

       If SENSE = PDX_TRUE:
          s = t - T0
       If SENSE = PDX_FALSE:
          s = T0 - t

Note that the T0 and T1 parameters used in the above relations of s and t and the PARAMETRIC RANGE section below are taken from the corresponding fields of the GDX Trim Curve. These values must first be adjusted if the base curve is closed and the trimmed portion of the curve spans the closure point. More specifically:

       If base curve is closed, SENSE = PDX_TRUE, and T1 < T0, then the GDX Trim
       Curve crosses point of closure and:
          T1 = T1 + (parametric range of the base curve)
       If base curve is closed, SENSE = PDX_FALSE, and T0 < T1, then the GDX Trim
       Curve crosses point of closure and:
          T0 = T0 + (parametric range of the base curve)

# PARAMETRIC RANGE

The GDX Trim Curve is defined over the following parametric range:

       0 <= s <= |T1 - T0|

Where T1 and T0 are subject to the rules described above in the PARAMETERIZATION section if the base curve is closed and the trimmed portion spans the point of closure.

# RESTRICTIONS

The GDX Trim Curve is subject to the following restrictions:

       T0 != T1
       T0 and T1 must be within the parametric range of the base curve
       referenced by the GDX Trim Curve.