DANBTC(3g) — Subroutines
Name
DANBTC − Builds the trim curve data record for the NONUNIFORM B-SPLINE SURFACE 3 function.
Operating States: PHOP, ∗, ∗, AROP
Digital PHIGS extension function
Syntax
DANBTC (NEWLOP, EDGVIS, ORDER, NCP, NKN, KNOTS, RATSEL, COORDX,
COORDY, COORDZ, TMIN, TMAX, MLDR, ERRIND, LDR, DATREC)
Argument Data Type Access Description
---------------------------------------------------------------------------
NEWLOP Integer Read New loop flag
EDGVIS Integer Read Edge visibility flag
ORDER Integer Read Curve order
NCP Integer Read Number of control points
NKN Integer Read Number of knots
KNOTS(NKN) Real Read Knot vector
RATSEL Integer Read Type of control points
COORDX(NCP) Real Read Control points, x-component
COORDY(NCP) Real Read Control points, y-component
COORDZ(NCP) Real Read Control points, z-component
TMIN, TMAX Real Read Parameter range
MLDR Real Read Maximum dimension of the B-spline
surface data record
ERRIND Integer Write Error indicator
LDR Integer Modify Dimension of the B-spline surface data
record array
DATREC(MLDR) Character ∗80 Modify B-spline surface data record
---------------------------------------------------------------------------
Constants
Defined Argument Constant Description
---------------------------------------------------------------------------
NEWLOP DNFRST Not first
DFRST First
EDGVIS POFF Edges off
PON Edges on
RATSEL PRAT Rational (4D) control points
PNRAT Nonrational (3D) control points
---------------------------------------------------------------------------
Description
DANBTC builds the trim curve data record for the PBSS3 function. The data record format is a header record followed by an array of trimming curve records. Each of these records is fully contained in one or more of the nonuniform B-spline surface data record elements (elements of DATREC).
Each time this function is called, a trimming curve record is added to the nonuniform B-spline surface data record and the header record is updated. The nonuniform B-spline surface data record is an input and output parameter for this function because it is passed in, added to, and passed back to the application. When you have added all the desired trimming curves to the data record through multiple calls to this function, you can use the data record with the PBSS3 function.
Because Digital PHIGS expects the nonuniform B-spline surface data record to have meaningful values when passed to the DANBTC function, you must initialize the data record before you call this function. To do this, call the PPREC function and specify three integers whose values are 0 (IL = 3, IA(1) = 0, IA(2) = 0, IA(3) = 0).
Note that the data record is an array of 80-byte character strings. Each 80-byte character string is referred to as an element of the data record. The header record is used to store the element number of the last trim curve record defined, as well as the number of loops and curves in the data record. These values are initially 0. After the first trim curve record is added, the value of IA(1) is 4, because the header record always occupies elements 1, 2, and 3 and the first trim curve record always starts in element 4.
The first element of the integer array within each trim curve record contains the size of the trim curve record. This value is given in terms of the number of data record elements required to store the trim curve record. This value, the element number of the last trim curve record defined (stored in the header record), and the fact that the first trim curve record is always started in element 4, makes it easy to traverse through the trim curve records.
This function is used with the old style of the PBSS3 function. If you use the ISO Fortran version of the PBSS3 function, use the PPTC function to pack the data record.
Data Record Information
The B-spline surface data record is as follows:
Header record:
INTEGER IL = 3 Number of integer values
INTEGER IA(1) First B-spline surface data record element of the
last trim curve record
INTEGER IA(2) Number of trimming loops defined (number of trimming
curve data records with new loop flag = DFRST)
INTEGER IA(3) Total number of trimming curve records
Trimming curve record:
INTEGER IL = 7 Number of integer values
INTEGER IA(7) 1. Size of record (see Description)
2. New loop flag (DNFRST, DFRST)
3. Edge visibility flag (POFF, PON)
4. Curve order
5. Number of control points
6. Number of knots
7. Type (PRAT, PNRAT)
INTEGER RL Number of real values
REAL RA(∗) 1. First knot
.
.
.
n. Nth knot (n = IA(6))
n+1 First control point, x component
.
.
.
n+m Mth control point, x component (m = IA(4))
n+m+1 First control point, y component
.
.
.
n+2m Mth control point, y component
n+2m+1 First control point, z component
.
.
.
n+3m Mth control point, z component
n+3m+1 Minimum parameter value
n+3m+2 Maximum parameter value
See Also
PBSS3