Parameters and expressions
Root parameters
ParameterNode = { key, label?, method: <one of 12 value methods>, args? }
Argument = { key, input, min?, max?, options?, visible? } // all expressionsA parameter is a VALUE of its method's type (for example a length, a number, a string, a color, a url), never a function and never hand-built geometry. Its value argument carries the default. Value methods are listed in the catalog under Parameter methods and the value types under Value types.
A parameter whose value reads another parameter is a formula. It stays at the root only when two or more nodes read it or it is a visible readout; read by one node it is written inline there, and read by none it is deleted. The reserved size parameters are exempt.
Argument domain
minandmaxbound numeric arguments.optionslists the allowed values of comparable scalar types: number, integer, angle, string, color and url. The value must equal a row. A row is{ label, value }and may carry extra fields.- A
lengthargument or parameter never carriesoptions: the user types a length withinminandmax. A label never names a unit, because lengths are millimetres internally and the host shows them insettings.units. visibleis a boolean on a parameter'svalueargument; a hidden parameter still evaluates. Catalogmin,maxandoptionsare defaults.
Reserved size parameters
sizeX, sizeY and sizeZ are reserved length parameters: X is width, Y is depth, Z is height. They exist for the scale gesture, so a declared size equals the visible bounding box on its axis, protrusions included. A literal value is an input; a formula that reads other parameters is a read-only readout. A model whose dimension is its main body rather than the box names it width, height or depth instead.
The expression language
Expressions use a small subset of JavaScript (a jsep-based grammar): no statements, loops, assignment or return. Arrow parameters are always parenthesized: (p) => .... Method lists, builtins, constants and budgets are the interpreter's own dispatch, reported by the engine and reproduced in the expression vocabulary. A wrongly typed argument fails loudly; there is no coercion.
| Value | Is |
|---|---|
| A parameter name | The parameter's current value. |
| A namespace function | Point, Vector, Plane, Line, Transformation, Color, Format, Property and the curve values Arc, Ellipse, Bezier, Nurbs, Spline. Namespaces are PascalCase and closed. |
| The stream | Mid-chain, the data the previous step produced (Curve, Mesh, Block...). Named objects can be read by key. |
Property.parent(name) | The enclosing nest's own scalar for the copy the child lives in, or 'copy' for that copy's index. |
| Records of a component | key.materials, key.layers, key.patterns as { label, value } rows and key.options.<parameter>: the rows a part's root parameter declares. |
No namespace measures geometry: measurement has one path, engine_takeoff. Evaluation is pure: no network, no clock, no randomness.
Choosers
A parameter that names a component (loadComponent.url or placeComponent.component) is a chooser. It is read by nothing else, except that it may be forwarded verbatim as the whole value of one entry of a placeComponent parameters object, so a placed part's own chooser receives the host's choice. A host never branches on which document was chosen. An optional part is a row of its chooser whose first option is { label: 'None', value: '' }.