← Ecky CAD / Ecky Language Reference

REFERENCE / 10

Boolean and Transform Signatures

Boolean operations combine or remove material. Transforms change where geometry is or how large it is. Expressions are evaluated inside out, so rotating then translating differs from translating then rotating.

union

(union shape1 shape2 ...) → combined geometry.

Join the supplied shapes. Overlapping solids can become one connected body; separated solids stay disconnected. Use compound when you only need a group and do not want a boolean join.

fuse

Alias of union, with the same arguments.

difference

(difference base cut1 cut2 ...) → remaining geometry.

Subtract every cutter from base. The first argument is the material to keep. A cutter outside the base removes nothing. For through-holes, extend cutters slightly beyond both surfaces.

(model
  (part plate
    (difference
      (box 60 30 4)
      (translate 0 0 -1 (cylinder 3 6)))))

The cutter runs from Z = −1 to 5 while the plate runs from 0 to 4.

cut

Alias of difference, with the same arguments.

intersection

(intersection shape1 shape2 ...) → shared geometry.

Keep only the region common to the supplied shapes. Shapes with no overlap have no shared volume.

common

Alias of intersection, with the same arguments.

xor

(xor shape1 shape2 ...) → exclusive regions.

For two inputs, retain their non-overlapping regions and remove their shared region. Boolean forms require at least one shape argument.

translate

(translate x y z shape) → same kind as shape.

Move by the specified offsets. (translate 20 0 0 shape) moves it 20 mm along X.

rotate

(rotate x y z shape) → same kind as shape.

Angles are degrees around the axes through the origin. Rotating an already translated object also moves it around the origin. To rotate in place before positioning, put rotate inside translate.

scale

(scale factor shape) or (scale x y z shape) → same kind as shape.

Scale coordinates from the origin. A uniform factor of 2 doubles every dimension, including holes. XYZ factors allow different scaling on each axis. The native renderer supports both forms; FreeCAD interop requires explicit XYZ factors.

mirror

(mirror axis offset shape) → same kind as shape.

Reflect across the plane perpendicular to the named axis at offset. For example, (mirror 'x 0 shape) reflects X across the YZ plane.

(model
  (part block
    (translate 20 0 0
      (rotate 0 0 45 (box 10 6 4)))))

This rotates the block at the origin, then moves it 20 mm along X.