Extrusion sweep

An extrusion sweep uses a 2D curve in the xy plane and is extruded along the zaxis. An extrusion sweep is constructed from an extrusion curve (contour) and a height (trajectory)

      TExtrusion3D(   const TGCurve& extrusionCurve, 
                      GCoordinate height, 
                      TGrafBundle3D adoptBundle = NIL );
extrusionCurve: The 2-D curve in the x-y plane that defines the shape (contour) of the extrusion.

height: A distance in world-coordinate units that is applied in the z direction to define the height of the extrusion.

As shown in Figure 182 the extrusion curve (contour) provides the shape in the x-y plane, and the height (trajectory) provides the height in the z direction.


The following code fragment creates the extrusion shown above. The camera has been repositioned to show the side view.

      TExtrisopm3D extrusion( TGCurve( 
                              TGPoint( 25, 75 ), 
                              TGPoint( 45, 150 ), 
                              TGPoint( 95, 125 ), 
                              TGPoint( 70, 100 ) ), 150 );
      extrusion.Draw( thePort );

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker