Extrusion

Description

simple box

Imagine an polygon (convex or concave) following a path through 3D space and that is an extrusion. In this image the polygon is the shape of the letter Q and is rendered as solid green. The path is linear and the path surface is striped.

Parts

The extrusion has three parts, the main extrusion surface (strped) and two end caps (solid green). Each part can have its own drawmode providing a range of render combinations.

Description Number Named bit-flag
Extrusion surface
End-cap at the path start
End-cap at the path end
0
1
2
S3D.BODY
S3D.END0
S3D.END1

Model View Orientation

In this case the model view origin and orientation are determined by the path coordinates.

Creating an Extrusion

Constructors
Extrusion(Path path, Polygon xsection)
Extrusion(Path path, Polygon xsection, Orientation orientation)
Extrusion(Path path, Polygon xsection, Scale scale)
Extrusion(Path path, Polygon xsection, Scale scale, Orientation orientation)
Parameter Comments
path
the path taken by the extrusion centre in 3D space
xsection
the polygon cross-section. It can have concave sides.
scale
the scale to be applied to the cross-section at different positions along the extrusion's length.
orientation
Allows the user to specify another model view orienation for this shape.
See Orientation guide.

Shapes3D provides a number of predefined paths but the library allows for user-defined paths.