Delimit a NURBS surface trimming loop.
void bgntrim( ) void endtrim( )
SUBROUTINE BGNTRI SUBROUTINE ENDTRI
The bgntrim and endtrim subroutines mark the beginning and end of a definition for a trimming loop. A trimming loop is a set of oriented curves (forming a closed curve) that defines boundaries of a Non-Rational B-Spline (NURBS) surface. Include these trimming loop definitions in the definition of a NURBS surface.
The definition for a NURBS surface may contain many trimming loops. For example, in a definition for NURBS surface that resembles a rectangle with a hole punched out, there are two trimming loops. One loop defines the outer edge of the rectangle. The other trimming loop defines the hole punched out of the rectangle. The definitions of each of these trimming loops is bracketed by a bgntrim/endtrim pair.
The definition of a single closed trimming loop may consist of multiple curve segments, each described as a piecewise linear curve (as defined by the pwlcurve subroutine), or as a single NURBS curve (as defined by the nurbscurve subroutine), or as a combination of both in any order. The only GL subroutines that can appear in a trimming loop definition (between the bgntrim and endtrim subroutines) are the pwlcurve and nurbscurve subroutines.
The following code fragment defines a single trimming loop that consists of one piecewise linear curve and two NURBS curves:
bgntrim(); pwlcurve(...); nurbscurve(...); nurbscurve(...); endtrim();
The area of the NURBS surface that the system displays is the region in the domain to the left of the trimming curve as the curve parameter increases. Thus, the resultant visible region of the NURBS surface is inside for a counterclockwise trimming loop and outside for a clockwise trimming loop. For the rectangle mentioned previously, the trimming loop for the outer edge of the rectangle should run counterclockwise, and the trimming loop for the hole punched out should run clockwise.
If you use more than one curve to define a single trimming loop, the curve segments must form a closed loop. In other words, the endpoint of each curve must be the starting point of the next curve, and the endpoint of the final curve must be the starting point of the first curve.
If the endpoints of the curve are sufficiently close together but not exactly coincident, the system coerces the endpoints to match. If the endpoints are not sufficiently close, the system generates an error message and ignores the entire trimming loop.
If a trimming loop definition contains multiple curves, the direction of the curves must be consistent. In other words, the inside must be to the left of the curves. Nested trimming loops are legal as long as the curve orientations alternate correctly. If no trimming information is given for a NURBS surface, the entire surface is drawn.
This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.
|/usr/include/gl/gl.h||Contains C language constant and variable type definitions for GL.|
|/usr/include/gl/fgl.h||Contains FORTRAN constant and variable type definitions for GL.|
Marking the beginning and end of a NURBS surface definition with the bgnsurface and endsurface subroutines.
Returning the current value of a trimmed NURBS surfaces display property with the getnurbsproperty subroutine.
Controlling the shape of a NURBS trimming curve with the nurbscurve subroutine.
Controlling the shape of a NURBS surface with the nurbssurface subroutine.
Describing a piecewise linear trimming curve for NURBS surfaces with the pwlcurve subroutine.
Setting a property for the display of trimmed NURBS with the setnurbsproperty subroutine.
AIX Graphics Library Overview and Drawing NURBS Curves and Surfaces.