GPTNBS
(uorder,
vorder,
unum,
vnum,
uknots,
vknots,
tflag,
utess,
vtess,
cflags,
cwidth,
ctlpts,
ncontour,
ncurve,
curveinfo,
tknot,
ttess,
cdwidth,
cddata) |

**Purpose**

Use
**GPTNBS** to insert a Trimmed
Non-Uniform B-Spline Surface structure element
into the open structure following the element pointer or to
replace the element pointed at by the element pointer with a
Trimmed Non-Uniform B-Spline Surface structure
element depending on the current edit mode.

At structure traversal time, a non-uniform
parametric surface of the specified
*uorder* and
*vorder* are generated using the specified control
points.
Only the region of the surface which is bounded by an odd
number of trimming curves is rendered.

This primitive generates no output if any of the following are true:

The trimming curves
*must* adhere to the following
rules; otherwise, the results are unpredictable:

The trimming curves have the following
*optional*
capability:

Polygon and surface attributes are applied to this primitive.

**GPTNBS** is identified as GDP 1036.

**Note: **

Not all GDPs are supported on all workstations. Use the Inquire List of Generalized Drawing Primitives (GPQGD) subroutine to determine the GDPs supported by an opened workstation. See also the workstation description in The graPHIGS Programming Interface: Technical Reference

**Parameters**

^ | m n o p | | i j k l Increasing v | | e f g h | | a b c d ---------------> Increasing u

would be stored in the order a, b, c, d, e, f, g, h, i, j, k, l,
m, n, o, and p.
The
*cwidth* parameter must be at least three.
If
*cflags* specifies that weights are included with
each control point, the
*cwidth* parameter must be at
least four.
Each weight
*W* must be greater than zero when specified.

**Note: **When
*W* is specified, the control points are not in
homogeneous form
(i.e.,*XW*,
*YW*,
*ZW*,
*W*)
They are specified after division by
*W* or
(*X*,
*Y*,
*Z*,
*W*)

This field must contain

If set, a tessellation quality value for each span of this
curve is specified in the
*ttess* parameter.

If set, the curve is rational and the weight is specified
for each control point in the
*cddata* parameter.

If set, the curve is treated as an edge of the composite fill area.

Order of the curve (>=2)

Number of entries of the
*cddata* parameter used to
define the curve.
This parameter corresponds to the
*npoint* parameter
of the Non-Uniform B-Spline Curve 2.
The specified number's entries of the
*cddata* parameter are used as its
*ctlpts*
parameter.

The parameter value representing the start point of the curve.

The parameter value representing the end point of the curve.

For each entry, the following fields are defined and the fields must be specified in this order without any gap.

**Error Codes**

**5**- FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
**341**- ORDER OF BASIS FUNCTION < TWO
**342**- ORDER IS GREATER THAN NUMBER OF CONTROL POINTS
**343**- KNOT VECTOR IS INVALID
**345**- WEIGHT IN CONTROL POINT IS <= ZERO
**347**- PARAMETER LIMITS ARE OUTSIDE VALID PARAMETER RANGE
**348**- MINIMUM PARAMETER LIMIT > MAXIMUM
**351**- OPTIONAL DATA AVAILABILITY FLAG IS INVALID
**353**- NUMBER OF CONTOURS < ZERO
**354**- NUMBER OF CURVES PER CONTOUR < ONE
**361**- CURVE OPTIONS FIELD IS INVALID
**362**- TESSELLATION CONTROL VALUE IS INVALID
**557**- WIDTH PARAMETER < MINIMUM ALLOWED

**Related Subroutines**

**GPBICD**- Set Back Interior Color Direct
**GPBICI**- Set Back Interior Color Index
**GPBSCD**- Set Back Specular Color Direct
**GPBSCI**- Set Back Specular Color Index
**GPBSPR**- Set Back Surface Properties
**GPECD**- Set Edge Color Direct
**GPECI**- Set Edge Color Index
**GPEI**- Set Edge Index
**GPELT**- Set Edge Linetype
**GPESC**- Set Edge Scale Factor
**GPFDMO**- Set Face Distinguish Mode
**GPICD**- Set Interior Color Direct
**GPICI**- Set Interior Color Index
**GPII**- Set Interior Index
**GPIS**- Set Interior Style
**GPISI**- Set Interior Style Index
**GPLMO**- Set Lighting Calculation Mode
**GPLSS**- Set Light Source State
**GPPGC**- Set Polygon Culling
**GPQTDF**- Inquire Trimming Curve Display Facilities
**GPSAC**- Set Surface Approximation Criteria
**GPSCD**- Set Specular Color Direct
**GPSCI**- Set Specular Color Index
**GPSPR**- Set Surface Properties
**GPTCAC**- Set Trimming Curve Approximation Criteria

**RCP code**

201345027 (X'0C004803')