Operations
Every built-in operation, with a call to copy. An operation takes shapes and gives one; the method form
a.op(args) means op(a, args), so that a chain reads in order: box(lo, hi).rotate(30, "z"). In the
calls, a and b stand for shapes. Constructive solid geometry describes what each does to the
distance, and which keep it exact. Every operation below is used once in Studio/Models/gallery (the rows behind
the shapes in the figure of Shapes).
Combining shapes
Operation |
A call |
What it gives |
|---|---|---|
|
|
the solid inside any of them |
|
|
the solid inside all of them |
|
|
|
|
|
a union whose seams are filleted over about |
|
|
an intersection with rounded edges |
|
|
a difference with rounded edges |
|
|
a union evaluated through a bounding volume hierarchy: for many shapes |
|
|
a difference whose removed shapes are searched through a bounding volume hierarchy |
A plain union evaluates every shape at every point; bvh_union visits only the shapes near it, which pays from
a few tens of shapes on (smooth_union(..., bvh = true) does the same for a smooth one). Each counts toward the
nesting of calls a tape allows (see Reference).
Moving shapes
Operation |
A call |
What it gives |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Changing shapes
Operation |
A call |
What it gives |
|---|---|---|
|
|
inside and outside swapped (unbounded: cut it, |
|
|
|
|
|
a shell of half-thickness |
|
|
|
|
|
|
|
|
|
|
|
copies of |
Labeling shapes
Operation |
A call |
What it gives |
|---|---|---|
|
|
|
A label names a shape’s own parts only, before it is moved or combined: box(...).label(xmin = "inlet"), not
translate(box(...), v).label(xmin = "inlet"). A shape’s parts are listed in Shapes.