REFERENCE / 16
Complete Compiler Surface
Additional callable forms and helpers. Entries already explained in the preceding sections are omitted from this list.
*
(* a b...)
Multiplies numbers.
Example fragment:
(* radius 2)+
(+ a b...)
Adds numbers.
Example fragment:
(+ width clearance)-
(- a b...)
Subtracts numbers or negates one number.
Example fragment:
(- outer inner)/
(/ a b...)
Divides numbers.
Example fragment:
(/ width 2)<
(< a b)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(< 2 1)<=
(<= a b)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(<= 2 1)=
(= a b)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(= 2 1)>
(> a b)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(> 2 1)>=
(>= a b)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(>= 2 1)abs
(abs value)
Returns absolute value.
Example fragment:
(abs offset)analysis
(analysis id analysis-clause...)
Declares an authored FEM/engineering analysis contract tied to model parts and selector tags.
Example fragment:
(analysis load-case (linear-static :part body) (fixed :face-tag mounting) (solve :method direct))and
(and value...)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(and true false)append
(append list...)
Concatenates lists.
Example fragment:
(append front-points back-points)apply
(apply fn args)
Calls a function with arguments from a list.
Example fragment:
(apply union cutters)atan
(atan value)
Single-argument arctangent returning radians.
Example fragment:
(atan slope)atan2
(atan2 y x)
Two-argument arctangent returning radians.
Example fragment:
(atan2 y x)attractor-field
attractor-field
Seeded chaotic attractor-style field.
Example fragment:
(wall-pattern (:mode attractor-field :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)begin
(begin clause...)
Groups multiple model clauses where a single clause position is expected.
Example fragment:
(model (begin (params ...) (part body ...)))cellular
cellular
Seeded cellular/Voronoi-like displacement field.
Example fragment:
(wall-pattern (:mode cellular :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)clip-plane
(clip-plane geometry :origin '(x y z) :normal '(x y z) [:keep "positive"|"negative"])
Clips geometry against an oriented plane. :keep is text; quote it to avoid unresolved local symbols.
Example fragment:
(clip-plane body :origin '(0 0 10) :normal '(0 0 1) :keep "positive")cos
(cos radians)
Trigonometric helper using radians.
Example fragment:
(cos (deg->rad 45))define
(define name value)
Defines a helper value or function in expression scope.
Example fragment:
(define wall 2)diamond
diamond
Cross-hatched diamond displacement field.
Example fragment:
(wall-pattern (:mode diamond :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)diamond-field
diamond-field
Alias-style diamond periodic implicit field.
Example fragment:
(wall-pattern (:mode diamond-field :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)draft
(draft angle solid)
Applies a draft angle to a solid.
Example fragment:
(draft 2deg body)ellipse
(ellipse rx ry)
Creates an elliptical 2D profile with radii along X and Y.
Example fragment:
(ellipse 10 4)empty?
(empty? value)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(empty? '())even?
(even? number)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(even? 2)fbm
fbm
Fractal noise displacement field.
Example fragment:
(wall-pattern (:mode fbm :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)filter
(filter fn list)
Keeps list items where predicate returns true.
Example fragment:
(filter (lambda (i) (even? i)) (range 8))floor
(floor value)
Rounds down to an integer-valued number.
Example fragment:
(floor segments)fold
(fold fn initial list)
Reduces a list into a single accumulated value.
Example fragment:
(fold + 0 (range 5))fourier
fourier
Layered sine/cosine Fourier-style displacement field.
Example fragment:
(wall-pattern (:mode fourier :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)frame
(frame :origin '(x y z) :x-axis '(x y z) :z-axis '(x y z))
Defines origin/x/z; derives y as z cross x.
Example fragment:
(frame :origin '(50 0 15) :x-axis '(0 1 0) :z-axis '(1 0 0))groove
(groove solid profile path)
Removes material: sweeps profile along path and subtracts it from solid.
Example fragment:
(groove (box 20 20 20) (circle 3) (path (0 0 0) (0 0 30)))gyroid
gyroid
triply periodic gyroid implicit field.
Example fragment:
(wall-pattern (:mode gyroid :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)hammered
hammered
Seeded hammered texture using deterministic noise.
Example fragment:
(wall-pattern (:mode hammered :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)hull
(hull solid...)
Convex hull of the child solids as a single closed BREP solid.
Example fragment:
(hull (sphere 6) (translate 30 0 0 (sphere 6)))if
(if condition then else)
Chooses between two expressions from a boolean condition.
Example fragment:
(if useCap (sphere r) (cylinder r h))import-step
(import-step path)
Imports an exact STEP payload through native Direct OCCT.
Example fragment:
(import-step "/absolute/path/component.step")lambda
(lambda (arg...) body)
Creates an anonymous function for map/filter/fold helpers.
Example fragment:
(lambda (i) (translate (* i pitch) 0 0 cutter))let
(let ((name value)...) clause...)
Binds model-level constants for following clauses; bindings in one let are parallel.
Example fragment:
(model (let ((r 20)) (part body (sphere r))))let*
(let* ((name value)...) clause...)
Sequential model-level binding form; later bindings can use earlier bindings.
Example fragment:
(model (let* ((r 20) (h (* r 3))) (part body (cylinder r h))))list
(list value...)
Builds a list value.
Example fragment:
(list x y z)list?
(list? value)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(list? '())map
(map fn list ...)
Transforms each list item with a function.
Example fragment:
(map (lambda (i) (* i 10)) (range 4))max
(max a b...)
Returns largest number.
Example fragment:
(max wall 1.2)mesh
(mesh :vertices ((x y z) ...) :triangles ((a b c) ...))
Creates bounded indexed triangle geometry. Open orientable surfaces are allowed; invalid indices, degenerate faces, duplicates, non-manifold edges, or inconsistent winding reject.
Example fragment:
(mesh :vertices ((0 0 0) (10 0 0) (0 10 0)) :triangles ((0 1 2)))mesh-anchor
(mesh-anchor triangle-index barycentric-0 barycentric-1 barycentric-2)
Declares one exact triangle seed used inside a native mesh surface-trim path.
Example fragment:
(mesh-anchor 42 0.2 0.3 0.5)meta
(meta key value)
Stores literal model metadata in Core IR; :title labels the exported document and units strict enables dimensional checks.
Example fragment:
(meta :title "Bottle cage")min
(min a b...)
Returns smallest number.
Example fragment:
(min wall max-wall)neovius
neovius
Triply periodic Neovius implicit field.
Example fragment:
(wall-pattern (:mode neovius :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)not
(not value)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(not false)null?
(null? value)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(null? '())odd?
(odd? number)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(odd? 2)or
(or value...)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(or true false)place-component
(place-component (component :param value ...) :from port-id :to (port-ref part-id port-id) :normal aligned|opposed [:roll degrees] [:offset '(x y z)] [:mirror none|x|y])
Mates source and target ports without Euler math.
Example fragment:
(place-component (latch) :from mount :to (port-ref enclosure side-left-latch) :normal opposed)polyhedron
(polyhedron :vertices ((x y z) ...) :triangles ((a b c) ...))
Creates one closed orientable indexed triangle solid after deterministic topology validation.
Example fragment:
(polyhedron :vertices ((0 0 0) (10 0 0) (0 10 0) (0 0 10)) :triangles ((0 2 1) (0 1 3) (1 2 3) (2 0 3)))port
(port id :type type-id :frame frame [:compatible-with '(type-id ...)] [:params ((name value) ...)])
Declares one stable typed local interface.
Example fragment:
(port mount :type "mount.v1" :frame local-frame)port-ref
(port-ref part-id port-id)
References one target port.
Example fragment:
(port-ref enclosure side-left-latch)ports
(ports (port ...) ...)
Groups local interfaces.
Example fragment:
(ports (port mount :type "mount.v1" :frame local-frame))protrude
(protrude image-path height [:width w] [:depth d] [:fit contain|stretch] [:foreground dark|light])
Raises continuous raster foreground coverage above local Z=0. One physical dimension preserves source aspect ratio; two contain and center by default. :fit stretch explicitly fills a non-matching box. Transparent pixels remain empty; an internal closure epsilon stays below the authored base plane.
Example fragment:
(protrude image-path 4 :width 100 :depth 70 :fit contain :foreground dark)quote
(quote value) or 'value
Prevents evaluation of symbols/lists for literal data such as align tuples.
Example fragment:
'(center center min)range
(range count)
Builds integer indices from 0 to count - 1.
Example fragment:
(range 8)reduce
(reduce fn initial list)
Reduces a list into a single accumulated value.
Example fragment:
(fold + 0 (range 5))regular-polygon
(regular-polygon sides radius :rotation deg)
Creates a regular n-gon 2D profile by side count and circumradius.
Example fragment:
(regular-polygon 6 10)reverse
(reverse list)
Returns list items in reverse order.
Example fragment:
(reverse points)rib
(rib solid profile path)
Adds material: sweeps profile along path and unions it onto solid.
Example fragment:
(rib (box 20 20 20) (circle 3) (path (0 0 0) (0 0 30)))ribs
ribs
Straight rib pattern along the shell parameter direction.
Example fragment:
(wall-pattern (:mode ribs :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)rings
rings
Ring bands around the shell parameter direction.
Example fragment:
(wall-pattern (:mode rings :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)schwarz-d
schwarz-d
Triply periodic Schwarz D implicit field.
Example fragment:
(wall-pattern (:mode schwarz-d :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)schwarz-p
schwarz-p
Triply periodic Schwarz P implicit field.
Example fragment:
(wall-pattern (:mode schwarz-p :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)sin
(sin radians)
Trigonometric helper using radians.
Example fragment:
(sin (deg->rad 45))slot-arc
(slot-arc radius start end width)
Curved (annular) obround: a circular-arc centerline of given radius from start to end degrees, thickened by width.
Example fragment:
(slot-arc 20 0 90 10)slot-center-point
(slot-center-point cx cy px py width)
Obround 2D profile from a center point to an end point, with width.
Example fragment:
(slot-center-point 0 0 20 0 10)slot-center-to-center
(slot-center-to-center separation width)
Obround 2D profile specified by the distance between the two end-arc centers.
Example fragment:
(slot-center-to-center 30 10)slot-overall
(slot-overall length width)
Creates an obround (stadium) 2D profile of given overall length and width.
Example fragment:
(slot-overall 40 10)spiral
spiral
Spiral rib pattern across shell parameters.
Example fragment:
(wall-pattern (:mode spiral :depth 0.6 :uFreq 5 :vFreq 5 :seed 7) target)tag-edge
(tag-edge id :edge or :edges selector target)
Names a stable edge selection for downstream operations and analysis.
Example fragment:
(tag-edge rim :edges "top" body)tag-edges
(tag-edges id :edge or :edges selector target)
Names a stable edge selection for downstream operations and analysis.
Example fragment:
(tag-edges rim :edges "top" body)tag-face
(tag-face id :face or :faces selector target)
Names a stable face selection for downstream operations and analysis.
Example fragment:
(tag-face mounting :faces "bottom" body)tag-vertex
(tag-vertex id :vertex selector target)
Names a stable vertex selection for downstream operations and analysis.
Example fragment:
(tag-vertex datum :vertex "top" body)tan
(tan radians)
Trigonometric helper using radians.
Example fragment:
(tan (deg->rad 45))tapped-hole
(tapped-hole :iso "M8" :length len [:radius r] [:pitch p] [:depth d] [:base-width w] [:crest-width w] [:lefthand #t])
A tapped (internal female) thread cut as a positive cavity: a named-radius bore cylinder at the ISO minor diameter unioned with a helical relief ridge whose crest reaches the major diameter. :iso "M8" decodes a metric designation; an equal-nominal thread mates with it.
Example fragment:
(tapped-hole :iso "M8" :length 14)thread
(thread :radius r :pitch p :length len :depth d [:base-width w] [:crest-width w] [:female #t] [:clearance c] [:lefthand #t] [:iso "M4"])
Parametric helical thread: a core cylinder plus a helical-ridge (male), or a ridge cutter (:female). :iso "M4" decodes a metric designation into pitch/radius.
Example fragment:
(thread :radius 8 :pitch 2 :length 16 :depth 1)torus
(torus major minor)
Creates a ring torus: tube of radius minor swept at distance major from the Z axis.
Example fragment:
(torus 20 5)trapezoid
(trapezoid bottom top height :skew s)
Creates a trapezoid 2D profile (parallel bottom/top widths, given height, optional skew).
Example fragment:
(trapezoid 20 10 8 :skew 3)verify
(verify (tag id) [(intent text)] [(severity error|warning)] [(when bool-expr)] (metric id metric-expr) (expect id predicate))
Declares one conditional runtime check with intent, severity, and typed evidence.
Example fragment:
(verify (tag mesh-clean) (metric bad-edges (stl non-manifold-edge-count)) (expect bad-edges (= 0)))view
(view id (offset-part part dx dy dz)...)
Declares a preview-only exploded or print-layout view without changing export geometry.
Example fragment:
(view print-layout (offset-part lid 90 0 0) (offset-part body 0 0 0))voronoi-cell
(voronoi-cell sites index width height inset)
Creates one exact bounded Voronoi polygon, uniformly inset and expressed relative to its selected site.
Example fragment:
(voronoi-cell (voronoi-cells 3 3 12 12 1.5 23) 4 40 40 1.2)wedge
(wedge dx dy dz xmin zmin xmax zmax :align '(x y z))
Creates a wedge/ramp solid: a dx×dy×dz box whose top face is shrunk to the xmin..xmax / zmin..zmax window.
Example fragment:
(wedge 20 10 20 5 5 15 15)zero?
(zero? number)
Boolean predicate or comparator for conditionals and filtering.
Example fragment:
(zero? 2)