Value types
What each valueType word on Nodes and each parameter method on Parameters means: the value an expression must evaluate to, and how to write it. Read live from engine_catalog's Catalog.types (crates/model/src/document/vocabulary.rs TYPE_REGISTRY).
35 type words. An arg's valueType and a node's returns are built from them: T[] is a list of T, A | B accepts either.
value
| type | what it is | min / max | options | catalog uses |
|---|---|---|---|---|
number | A number. | yes | yes | 41 |
integer | A whole number; a fraction fails loud. | yes | yes | 29 |
length | A number of millimetres. | yes | yes | 41 |
angle | A number of degrees. | yes | yes | 11 |
boolean | On or off: 0 / 1 or false / true, read by truthiness. | — | — | 18 |
string | Text, quoted: 'abc'. | — | yes | 28 |
color | A CSS colour, quoted: '#ffffff'. | — | yes | 12 |
url | An address, quoted: 'https:…' or 'data:…'. | — | yes | 11 |
vector | A direction [x, y, z]; [x, y] reads z as 0. | — | — | 21 |
point | A position [x, y, z] in millimetres; [x, y] reads z as 0. | — | — | 54 |
plane | { point, normal } — a point on the plane and its normal vector. | — | — | 1 |
line | { origin, direction } — an infinite line through origin. | — | — | 4 |
curve | Point rows [[x, y, z], …], an analytic curve value (Arc.*, Ellipse.*, Bezier.*, Nurbs.*, Spline.*) or a Curve. | — | — | 1 |
surface | A NURBS control net, the value of a surface parameter; nurbsSurface bakes it to a Mesh. | — | — | 3 |
transform | 16 numbers, a column-major 4x4 matrix, translation at indices 12/13/14. | — | — | 0 |
function | An arrow function, e.g. (p, i) => true. | — | — | 29 |
object | Any JSON-shaped value — an object { … } or an array [ … ]. | — | — | 18 |
font | The address of a font file, quoted; '' = the host's default font. | — | — | 2 |
data
| type | what it is | min / max | options | catalog uses |
|---|---|---|---|---|
curveData | A Curve — the evaluated curve shape. | — | — | 28 |
pointCloudData | A Curve with no edges — a point cloud. | — | — | 1 |
meshData | A Mesh — the evaluated face shape. | — | — | 17 |
blockData | A Block — evaluated objects kept together as one unit. | — | — | 2 |
linearDimensionData | A LinearDimensionRecord. | — | — | 1 |
radialDimensionData | A RadialDimensionRecord. | — | — | 1 |
angularDimensionData | An AngularDimensionRecord. | — | — | 1 |
leaderData | A LeaderRecord. | — | — | 1 |
imageData | An ImageRecord. | — | — | 1 |
sectionData | A SectionRecord. | — | — | 1 |
hatchData | A HatchRecord. | — | — | 1 |
objectData | Any evaluated stream piece — a Curve, a Mesh or a Block; an expression naming a sibling object reads that object's evaluated content. | — | — | 47 |
record
| type | what it is | min / max | options | catalog uses |
|---|---|---|---|---|
material | A materials[] key, quoted: 'oak'. | — | — | 3 |
layer | A layers[] key, quoted: 'walls'. | — | — | 3 |
pattern | A patterns[] key, quoted: 'brick'. | — | — | 4 |
view | A views[] key, quoted: 'plan'. | — | — | 1 |
component | A components[] key, quoted: 'door'; the named record evaluates to a whole ModelJson document. | — | — | 3 |
📖 3 min read