← Ecky CAD / Ecky Language Reference

REFERENCE / 03

Forms and Structure

These forms organize a model. They do not describe dimensions or shapes by themselves.

model

(model
  (params (number width 60))
  (part body (box width 30 4)))

Use one model per file. Its direct clauses include params, part, feature, verify, topology tags, view, and analysis. Put reusable define and define-component declarations before it. Use let* for derived values that depend on model parameters.

part

(part body geometry)
(part body "Display name" geometry)

body is a stable part identifier. The optional string is its display label. The last expression produces its geometry. Separate part forms let you export and inspect pieces independently; they do not force the geometry inside each part to be connected.

feature

(feature body :role shell geometry)
(feature body :role shell :params (width height) geometry)

A feature gives geometry an identifier and a role. :params lists the parameters associated with it. Use it when you need to refer to a semantic feature in checks or downstream operations.

build

(build
  (shape blank (box 60 30 4))
  (shape bore (translate 0 0 -1 (cylinder 3 6)))
  (result (difference blank bore)))

build evaluates named intermediate values in order and returns one result. Later shapes can use earlier names. It requires exactly one result, after the shape bindings.

shape

(shape blank (box 60 30 4))

Inside build, bind a value to a name. Here blank can be used by later expressions in that build. shape does not create an extra exported part.

result

(result (difference blank bore))

Return the final value from build. Do not put more shape bindings after it.

assembly (planned)

This is not accepted model syntax yet. Declare physical pieces with part. For exploded placement that must not affect exports, use view and offset-part.

export (planned)

This is not accepted model syntax yet. Export through the app or CLI. An ordinary transform inside a part affects the geometry you export; only a view offset is preview-only.