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
)