REFERENCE / 12
Array and Frame Signatures
linear-array
Copy the shape count times. XYZ values are the step between copies, not the final overall displacement.
- signature:
linear-array count x y z shape - result: same geometry family as input
radial-array
Copy around Z. angle is the angular step in degrees and radius is the radial offset. Four copies spaced by 90 degrees make a full circle.
- signature:
radial-array count angle radius shape - result: same geometry family as input
grid-array
Copy across rows and columns. X and Y set the spacing between adjacent copies.
- signature:
grid-array rows cols x y shape - result: same geometry family as input
arc-array
- signature:
arc-array count radius start-angle end-angle shape - result: same geometry family as input
repeat
- signature:
repeat index count expr - verifier recognizes form
- use
repeat-unionto join copies orrepeat-compoundto keep a group when rendering native solid geometry
repeat-union
Evaluate the body for each index from 0 to count - 1, then join the resulting geometry. Use the index in a transform to put each copy in a different place.
- signature:
repeat-union index count expr - index must be symbol
- body should produce geometry
- result: union/fused geometry
repeat-compound
Evaluate one body per index and group the results without a boolean join.
- signature:
repeat-compound index count expr - index must be symbol
- body should produce geometry
- result: compound geometry
- native caveat: currently solid-only
repeat-pick
- signature:
repeat-pick index count predicate expr - index must be symbol
- predicate decides whether current body instance is selected
- result: last matching geometry
for-union
- macro alias:
for-union (index count) body- lowers to
repeat-union
for-compound
- macro alias:
for-compound (index count) body- lowers to
repeat-compound
plane
- signature:
plane - keywords:
:origin (x y z):x (x y z):normal (x y z)- result:
Frame
Defaults:
- origin
(0 0 0) - x direction
(1 0 0) - normal
(0 0 1)
location
- signature:
location frame - optional keywords:
:offset (x y z):rotate (x y z)- result:
Frame
path-frame
Construct a frame on a path. start and end choose its endpoints; a numeric :at selects a position along it. :up helps choose the frame orientation.
- signature:
path-frame path - optional keywords:
:at start | end | number:up (x y z)- result:
Frame
place
Put geometry into a frame. This is useful for attaching a feature to a path or an inclined plane without reconstructing the orientation by hand.
- signature:
place frame shape - optional keywords:
:offset (x y z):rotate (x y z)- result: placed shape
clip-box
Keep the portion of a shape inside the given XYZ bounds. Each bound is a two-number list in the shape coordinate system.
- signature:
clip-box shape - required keywords:
:x (min max):y (min max):z (min max)- result: clipped shape
Example:
(model
(part body
(build
(shape rail (path (0 0 0) (20 0 10) (20 10 10)))
(shape peg (box 4 2 6 :align '(min min min)))
(shape frame (path-frame rail :at 0.5))
(result (place frame peg :offset (1 2 3) :rotate (10 20 30))))))