[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPRTNS - Reevaluate Trimmed Non-Uniform B-Spline Surface

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

Purpose

Use GPRTNS to reevaluate a large trimmed surface into smaller trimmed surfaces. This utilty creates x number of structure elements to define all the data and returns the number of structure elements created. If an error occurs, processing stops and the actual number of created structure elements is returned.

The reevaluation of the surface is based on the specified option. If the option is specified as 1=CONTROL_POINTS , then it reevaluates the surface by looking at the number of control points in the u and v dimension. If the option is specified as 2=ELEMENT_SIZE , then it reevaluates the surface by looking at the size of the surface. If either number exceeds 64K bytes, the surface is partitioned such that the resulting surfaces will not exceed 64K bytes.

If the option parameter is not a valid value, it defaults to 1=CONTROL_POINTS

Parameters

uorder -- specified by user, fullword integer

Order of the basis functions for the u parameter (>=2)

vorder -- specified by user, fullword integer

Order of the basis functions for the v parameter (>=2)

unum -- specified by user, fullword integer

Number of surface control points for the u direction (>= uorder)

vnum -- specified by user, fullword integer

Number of surface control points for the v direction (>= vorder)

uknots -- specified by user, array of floating-point numbers

Knot values for the u parameter. The length of this array must be uorder+ unum This parameter must be a non-decreasing knot value sequence.

vknots -- specified by user, array of floating-point numbers

Knot values for the v parameter. The length of this array must be vorder+ vnum This parameter must be a non-decreasing knot value sequence.

tflag -- specified by user, fullword integer

Surface tessellation quality value flag. This parameter indicates whether the tessellation quality values are specified or not.
Value     Meaning
0 Not specified.
1 Specified.

utess -- specified by user, array of short floating-point numbers

Tesselation quality values for the u direction. When the tflag parameter is 1 (specified), this parameter must contain unum- uorder+1 quality values. These values are used in conjunction with Surface Approximation Criteria method 8 to control the number of subdivisions made in the u direction. The number of subdivisions performed for a patch is approximately: value of utess [default] u (the Surface Approximation Criteria control value in the traversal state list).

vtess -- specified by user, array of short floating-point numbers

Tessellation quality values for the v direction. When the tflag parameter is 1 (specified), this parameter must contain vnum- vorder+1 quality values. These values are used in conjunction with Surface Approximation Criteria method 8 to control the number of subdivisions made in the v direction. The number of subdivisions performed for a patch is approximately: value of vtess [default] v (the Surface Approximation Criteria control value in the traversal state list).

cflags -- specified by user, fullword integer

Control point option data flags. This parameter indicates what data is specified for each control point. The value specified should be the sum of the following values based on the fields that are specified by the ctlpts parameter.
Value     Meaning
0 Control point coordinates.
1 Weights are specified with each control point.This produces the rational form of the Non-Uniform B-Spline Surface.

cwidth -- specified by user, fullword integer

Number of words between subsequent entries of control points array ctlpts

ctlpts -- specified by user, array of short floating-point numbers

Grid of control points. The control points are stored by row where a row is considered to be the direction associated with the u parameter. For example, the set of control points
                ^
                |  m  n  o  p
                |  i  j  k  l
   Increasing v |  e  f  g  h
                |  a  b  c  d
                -------------->
                 Increasing u
 
is stored in the order a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p. The cwidth parameter must be at least 3. If cflags specifies that weights are included with each control point, the cwidth parameter must be at least 4. 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)

ncontour -- specified by user, fullword integer

Number of contours to be generated (>=0)

ncurve -- specified by user, fullword integer

Number of curves in each contour. Each entry must be greater than or equal to 1. The length of this array is defined by the value of ncontour parameters.

curveinfo -- specified by user, array of 6 fullword data

Array containing information about each curve. Each entry of this parameter must have the following fields in this order:

type of curve

-- fullword integer

This parameter specifies various options of the curve. Each option is specified by a bit in this word and the following bits are currently defined:

Bit     Meaning
0-28 Reserved. Must be set at 0.
29 Tessellation quality flag.
If set, a tessellation quality value for each span of this curve is specified in the ttess parametr.
30 Weight flag.
If set, the curve is rational and the weight is specified for each control point in the cddata parameter.
31 Boundry flag.
If set, the curve is treated as an edge of the composite fill area.

order

-- fullword integer

Order of the curve (>=2)

number of data

-- fullword integer

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 entries of numbers of the cddata parameter are used as its ctlpts parameter.

start

-- short floating-point number

The parameter value representing the start point of the curve.

end

-- short floating-point number

The parameter value representing the end point of the curve.

tknot -- specified by user, array of short floating-point numbers

Array of knot values for the t direction of the curve. The sequence of each list in this array is assumed to match the order of the curve definitions in curveinfo The length of each list is equal to the order+ number of data for the curve.

ttess -- specified by user, array of short floating-point numbers

Array of tessellation quality values. This array must contain one list of each Non-Uniform B-Spline Curve with a tessellation quality flag set to ON. For other curves, this array is not referenced. The sequence of each list in this array is assumed to match the order of the curve definitions in curveinfo The length of each list is equal to the number of data- order+1 of the curve.

cdwidth -- specified by user, fullword integer

Specifies the number of fullwords between each entry of the array in cddata If there is any rational curve in the curveinfo parameter, this parameter must be at least 3. Otherwise, it must be larger than or equal to 2.

cddata -- specified by user, array of short floating-point numbers

This array must contain one list for each curve. The sequence of each list in this array is assumed to match the order of the curve definitions in curveinfo The length of each list is equal to the number of definition data specified by the curveinfo parameter.

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

u, v components

-- two short floating-point numbers

weight

-- short floating-point number

option -- specified by user, fullword integer

Option to use when reevaluating the surface (1=CONTROL_POINTS, 2=ELEMENT_SIZE )

nelem -- returned by the graPHIGS API, fullword integer

The number of structure elements created by the utility, or zero if none were created.

Error Codes

4
FUNCTION REQUIRES STATE STOP
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

GPTNBS
Trimmed Non-Uniform B-Spline Surface

RCP code

201348098 (X'0C005402')


[ Previous | Next | Contents | Glossary | Home | Search ]