SunPHIGS 3.0 Extensions Reference Manual
  Search only this book
Download this book in PDF

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 )
INTEGER      NEWLP                   new loop flag
INTEGER      CVIS                    trim curve visibility
INTEGER      CORDER                  trim curve order
INTEGER      CRAT                    rationality of trim curve
INTEGER      CNKNTS                  number of knots for trim curve
REAL         CKNOTS(CNKNTS)          trim curve knots
INTEGER      CNCPTS                  number of control points for trim curve
REAL         CCPTS(3,CNCPTS)         control points
REAL         CTMIN                   lower parameter limit for trim curve
REAL         CTMAX                   upper parameter limit for trim curve
INTEGER      NLOOPS                  OUT number of trim loops.
INTEGER      LOOPS(* )               OUT number of trim curves in each loop.
INTEGER      VIS(nt)                 OUT visibility flags for all trim curves.
INTEGER      ORDER(nt)               OUT curve orders for all trim curves.
INTEGER      TRATS(nt)               OUT curve types for all trim curves.
INTEGER      NTKNTS(nt)              OUT number of knots in each curve.
INTEGER      TKSTRT(nt)              OUT start indices of knot lists in TKNOTS.
REAL         TKNOTS(* )              OUT knots, for all trim curves.
INTEGER      NTCPTS(nt)              OUT number of control points in each curve.
INTEGER      TCSTRT(nt)              OUT start indices of control point lists in TCPTS.
REAL         TCPTS(3,* )             OUT control points, for all trim curves.
REAL         TMIN(nt), TMAX(nt)      OUT parameter limits for all trim curves.
INTEGER      ERRIND                  OUT error indicator.

. The parameters below are exactly as passed to pnubss.
. In the array dimensions below, "nt" means the total number of trim curves.

Required PHIGS Operating States

(* ,* ,* ,* )

DESCRIPTION

Purpose

ADD TRIMMING CURVE builds the lists of trimming curve parameters to be passed to NONUNIFORM 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 PLUS 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.
CVIS
Visibility flag for this trimming curve.
CORDER
Order of this trimming curve.
CRAT
Rationality of this trimming curve. Valid values are:
PRAT
Rational
PNRAT
Non-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

NON-UNIFORM B-SPLINE CURVE (3PP)
INQUIRE CURVE AND SURFACE FACILITIES (3PP)
INTRO (3PP)