Skip to main content

Module examples

Module examples 

Source
Expand description

Example programs, written in Rust against the operation types.

Each refers to what earlier steps built only by name, and so reads as the recipe it is: extrude(box,end) is the end cap of the step box, whatever internal id it happens to get.

Functions§

all
Every example, by name.
boss_on_reference_plane
A box with a round boss standing on it, sketched on a reference plane: the plane half a unit above the box’s top (lifted, offset from extrude(box,end)), a circle sketched on it, and extruded back down through the gap and into the box, joined to it (boss) — the part is extrude(boss).
box_with_drill_hole
A 2 x 2 x 1 box with a blind hole drilled into its top: a rectangle sketched on the Z plane and extruded up (box), and a circle sketched on the box’s end cap extrude(box,end) and extruded back into it, cutting it out of the box (hole) — the drilled box is extrude(hole).
cross_drilled_shaft
A stepped shaft revolved around the world z-axis, cross-drilled through its thinner end: a half section sketched on the X plane, closed by the axis itself (shaft), and a circle on the Y plane extruded through both sides of it and cut out of it (bore) — the drilled shaft is extrude(bore).
two_plates
Two separate plates from one sketch of two regions, one with a round hole, extruded symmetrically into a single solid of two shells.