ADD TRIMMING CURVE(3P+) — MISC. REFERENCE MANUAL PAGES
NAME
ADD TRIMMING CURVE − add trimming curve parameters to the trim curve parameter lists
SYNOPSIS
C Syntax
There is no C binding for this function.
FORTRAN Syntax
SUBROUTINE paddtc ( NEWLP, CVIS, CORDER, CRAT, CNKNTS, CKNOTS, CNCPTS, CCPTS,
CTMIN, CTMAX, NLOOPS, LOOPS, VIS, ORDER, TRATS, NTKNTS, TKSTRT, TKNOTS,
NTCPTS, TCSTRT, TCPTS, TMIN, TMAX, ERRIND )
INTEGERNEWLPnew loop flag
INTEGERCVIStrim curve visibility
INTEGERCORDERtrim curve order
INTEGERCRATrationality of trim curve
INTEGERCNKNTSnumber of knots for trim curve
REALCKNOTS(CNKNTS) trim curve knots
INTEGERCNCPTSnumber of control points for trim curve
REALCCPTS(3,CNCPTS)control points
REALCTMINlower parameter limit for trim curve
REALCTMAXupper parameter limit for trim curve
Note: The below parameters are exactly as passed to pnubss
INTEGERNLOOPSOUT number of trim loops
INTEGERLOOPS(∗)OUT number of trim curves in each loop
Note: In the array dimensions below, "nt" means the total number of trim curves.
INTEGERVIS(nt)OUT visibility flags for all trim curves
INTEGERORDER(nt)OUT curve orders for all trim curves
INTEGERTRATS(nt)OUT curve types for all trim curves
INTEGERNTKNTS(nt)OUT number of knots in each curve
INTEGERTKSTRT(nt)OUT start indices of knot lists in TKNOTS
REALTKNOTS(∗)OUT knots, for all trim curves
INTEGERNTCPTS(nt)OUT number of ctrl points in each curve
INTEGERTCSTRT(nt)OUT start indices of control point lists in TCPTS
REALTCPTS(3,∗)OUT control points, for all trim curves
REALTMIN(nt), TMAX(nt) OUT parameter limits for all trim curves
INTEGERERRINDOUT error indicator
Required PHIGS Operating States
(∗, ∗, ∗, ∗)
DESCRIPTION
Purpose
ADD TRIMMING CURVE builds the lists of trimming curve parameters to be passed to NON-UNIFORM B-SPLINE SURFACE in FORTRAN. It is called once for each trimming curve. The output arrays must be preallocated to the required size or larger.
This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard.
FORTRAN Input Parameters
All of the following data types are predefined in phigs77.h.
NEWLP
New loop flag. One means this trimming curve starts a new loop. Zero means this trimming curve is a continuation of the current loop.
CVISVisibility flag for this trimming curve.
CORDER
Order of this trimming curve.
CRATRationality of this trimming curve. Valid values are:
PRATRational
PNRATNon-rational
CNKNTS
Number of knots for this trimming curve.
CKNOTS(CNKNTS)
Knots for this trimming curve.
CNCPTS
Number of control points for this trimming curve.
CCPTS(3,CNCPTS)
Control points for this trimming curve. The point coordinates are stored in each column of the array as:
CCPTS(1,t) = u Coordinate
CCPTS(2,t) = v Coordinate
CCPTS(3,t) = w Coordinate
The w coordinate is not used if the curve is Non-rational.
CTMIN
Lower parameter limit for this trimming curve.
CTMAX
Upper parameter limit for this trimming curve.
FORTRAN Output Parameters
NLOOPS
Number of trimming curve loops. This variable must be initialized to zero prior to adding the first trimming curve and should subsequently be changed only by this function.
LOOPS(∗)
Number of trimming curves in each loop.
VIS(nt)
Array of visibility flags, one entry for each trimming curve.
ORDER(nt)
Array of curve orders, one entry for each trimming curve.
TRATS(nt)
Array of trimming curve rationalities, one entry for each trimming curve. Each entry is an integer specifying the rationality and hence the dimensionality of the control points.
NTKNTS(nt)
Number of knots in each curve, one entry for each trimming curve.
TKSTRT(nt)
Start positions of the knot lists in the array TKNOTS , one entry for each trimming curve.
TKNOTS(∗)
Array of knots for all trimming curves. Each curve uses a contiguous segment of the array. The index of the head of the array segment used by a curve is specified in the TKSTRT array.
NTCPTS(nt)
Number of control points in each curve, one entry for each trimming curve.
TCSTRT(nt)
Start positions of the control point lists in the array TCPTS , one entry for each trimming curve.
TCPTS(3, ∗)
Array of control points for all trimming curves. Each curve uses a contiguous segment of the array. The index of the head of the array segment used by a curve is specified in the TCSTRT array.
TMIN(nt), TMAX(nt)
Arrays of parameter limits for the trimming curves, one entry in each array for each trimming curve.
ERRIND
The error number of any error detected by this function.
Execution
ADD TRIMMING CURVE is a utility function to build the lists of trimming curve parameters passed to NON-UNIFORM B-SPLINE SURFACE in FORTRAN. ADD TRIMMING CURVE is called once per trimming curve. It adds the curve parameters to the appropriate places in the lists and increments the curve and loop counts as required. After this function has been called for all trimming curves the output parameter lists can be passed directly to NON-UNIFORM B-SPLINE SURFACE. See NON-UNIFORM B-SPLINE SURFACE for a complete description of all the parameters.
The output arrays must be declared or allocated large enough to contain all the trim curve data. No bounds checking is done on the length of these arrays and no memory allocation is performed by this function.
ERRORS
None
SEE ALSO
SET SURFACE APPROXIMATION CRITERIA (3P+)
SET TRIMMING CURVE APPROXIMATION CRITERIA (3P+)
NON-UNIFORM B-SPLINE CURVE (3P+)
SET EXTENDED INTERIOR REPRESENTATION (3P+)
INQUIRE CURVE AND SURFACE FACILITIES (3P+)
INTRO PHIGS+ (3P+)
Sun Release 4.0 — Last change: 2 August 1989