Skip to content
ParaShape

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

typewhat it ismin / maxoptionscatalog uses
numberA number.yesyes39
integerA whole number; a fraction fails loud.yesyes29
lengthA number of millimetres.yesyes41
angleA number of degrees.yesyes13
booleanOn or off: 0 / 1 or false / true, read by truthiness.——17
stringText, quoted: 'abc'.—yes28
colorA CSS colour, quoted: '#ffffff'.—yes12
urlAn address, quoted: 'https:…' or 'data:…'.—yes11
vectorA direction [x, y, z]; [x, y] reads z as 0.——22
pointA position [x, y, z] in millimetres; [x, y] reads z as 0.——62
plane{ point, normal } — a point on the plane and its normal vector.——1
line{ origin, direction } — an infinite line through origin.——4
curvePoint rows [[x, y, z], …], an analytic curve value (Arc.*, Ellipse.*, Bezier.*, Nurbs.*, Spline.*) or a Curve.——0
surfaceA NURBS control net, the value of a surface parameter; nurbsSurface bakes it to a Mesh.——3
transform16 numbers, a column-major 4x4 matrix, translation at indices 12/13/14.——0
functionAn arrow function, e.g. (p, i) => true.——31
objectAny JSON-shaped value — an object { … } or an array [ … ].——16
fontThe address of a font file, quoted; '' = the host's default font.——2

data

typewhat it ismin / maxoptionscatalog uses
curveDataA Curve — the evaluated curve shape. An arg of this type also accepts point rows [[x,y,z],...] (a polyline chain, closed when the last row repeats the first) or a list of such row lists (several chains).——28
pointCloudDataA Curve with no edges — a point cloud.——1
meshDataA Mesh — the evaluated face shape.——17
blockDataA Block — evaluated objects kept together as one unit.——2
linearDimensionDataA LinearDimensionRecord.——1
radialDimensionDataA RadialDimensionRecord.——1
angularDimensionDataAn AngularDimensionRecord.——1
leaderDataA LeaderRecord.——1
imageDataAn ImageRecord.——1
sectionDataA SectionRecord.——1
hatchDataA HatchRecord.——1
objectDataAny evaluated stream piece — a Curve, a Mesh or a Block; an expression naming a sibling object reads that object's evaluated content.——49

record

typewhat it ismin / maxoptionscatalog uses
materialA materials[] key, quoted: 'oak'.——3
layerA layers[] key, quoted: 'walls'.——3
patternA patterns[] key, quoted: 'brick'.——4
viewA views[] key, quoted: 'plan'. A visible / active value that is an arrow (camera) => boolean runs against the camera, which it receives as { projection: 'orthographic' | 'perspective', viewType: 'plan' | 'ceiling' | 'elevation' | '3d', position, target, up, direction, fov | height } — the active view's pose, else the free camera the host reported (no pose yet: false) — viewType is 'plan' for an orthographic camera looking straight down, 'ceiling' straight up, 'elevation' level, and '3d' for every other pose, direction is the unit vector from position to target, fov (degrees) is set on a perspective camera and height (mm) on an orthographic one; the function reads only camera and the builtins, names no view, and a throw or a non-boolean result is an error.——1
componentA components[] key, quoted: 'door'; the named record evaluates to a whole ModelJson document.——3
📖 4 min read