← Ecky CAD / Ecky Language Reference

REFERENCE / 06

Params and Controls

Parameter forms live in ecky/params.

params

(params
  decl
  decl
  :relations ((<= wall shell) (>= shell 1.6)))
  • container for parameter declarations
  • optional :relations list attaches cross-parameter constraints

Supported relation operators:

  • &lt;
  • &lt;=
  • &gt;
  • &gt;=

number

(number wall 2.4
  :label "Wall"
  :min 0.8
  :max 8
  :step 0.1
  :unit length
  :frozen #f)
  • positional 1: parameter key symbol
  • positional 2: default number
  • keywords:
  • :label text
  • :min number
  • :max number
  • :step number
  • :unit one of length | angle | ratio | count | text
  • :frozen boolean

Units and suffixed literals

Humans may use bare numbers because Ecky's base units are millimetres and degrees. Agent-generated physical dimensions should use suffixed literals like mm/cm/in/deg/rad when the suffix makes intent clearer.

Examples:

  • 12mm
  • 2.54cm
  • 0.25in
  • 45deg
  • 1.5708rad

Prompt generators use suffixed literals for physical lengths and angles. Bare numbers remain appropriate for counts, ratios, segments, and unitless math.

toggle

(toggle useFillet #t
  :label "Use fillet"
  :frozen #f)
  • positional 1: parameter key symbol
  • positional 2: default boolean
  • keywords:
  • :label
  • :frozen

select

(select material "PLA"
  :label "Material"
  :unit text
  :options
    ((option "PLA" "PLA")
     (option "PETG" "PETG")
     (option "ABS" "ABS"))
  :frozen #f)
  • positional 1: parameter key symbol
  • positional 2: default choice value
  • required keyword for practical use: :options
  • optional keywords:
  • :label
  • :unit
  • :frozen

image

(image decal "assets/logo.svg"
  :label "Decal"
  :frozen #f)
  • positional 1: parameter key symbol
  • positional 2: default image path text
  • optional keywords:
  • :label
  • :frozen

option

(option "Large" 42)
(option "PLA" "PLA")
  • positional 1: display label
  • positional 2: value
  • valid value kinds:
  • number
  • string / text symbol