Tube

Description

simple box

Imagine an oval (circular or elliptical) following a path through 3D space and that is a tube. The simplest tube would be a circle following a straight path to form a cylinder. This image of a pencil was created with a straight path and a cross-section with just 6 segments forming a hexagonal cross-section.

Parts

The tube has three parts, the main circular body forming the tube and two end caps. Each part can have its own drawmode providing a range of render combinations.

Description Number Named bit-flag
Main curved body
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 a Tube

Constructors
Tube(Path path, Oval xsection)
Tube(Path path, Oval xsection, Orientation orientation)
Tube(Path path, Oval xsection, Scale scale)
Tube(Path path, Oval xsection, Scale scale, Orientation orientation)
Parameter Comments
path
the path taken by the tube centre in 3D space
xsection
the oval cross-section
scale
the scale to be applied to the cross-section at different positions along the tube'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.