Section : Shape
section - superclass: shape; super-superclass:node - 13:0 - classID: #(549004141, 1725569194)
Constructor
Properties
Section Size Rollout
<section>.length Float default: 0.0 -- animatable
The length of the displayed section rectangle.
<section>.width Float default: 0.0 -- animatable
The width of the displayed section rectangle.
KNOWN PROBLEMS AND WORKAROUNDS:
|
Sometimes, the Section shape might not be able to properly collapse to a SplineShape.
This only happens when a Section shape is created inside a loop and is being converted
to a SplineShape.
To collapse to a SplineShape, a viewport redraw must be performed after the Section
shape is created.
An example of creating contour lines from an object is shown below:
|
EXAMPLE
|
meshSelected = sphere()-- object to create contours of
minZ = meshSelected.min.z-- get min and max Z positions
maxZ = meshSelected.max.z
numLevels = 10-- the number of contours
delta = (maxZ - minZ) / (numLevels + 1)-- the number of steps
for currentZ = minZ to maxZ by delta do-- start loop...
(
s = section pos:[0, 0, currentZ]-- create Section
max views redraw-- this line is needed to get around the problem
convertToSplineShape s-- convert Section to SplineShape
s.renderable = true-- set to renderable
)
|