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.yesyes41
integerA whole number; a fraction fails loud.yesyes29
lengthA number of millimetres.yesyes41
angleA number of degrees.yesyes11
booleanOn or off: 0 / 1 or false / true, read by truthiness.——18
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.——21
pointA 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
curvePoint rows [[x, y, z], …], an analytic curve value (Arc.*, Ellipse.*, Bezier.*, Nurbs.*, Spline.*) or a Curve.——1
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.——29
objectAny JSON-shaped value — an object { … } or an array [ … ].——18
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.——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.——47

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'.——1
componentA components[] key, quoted: 'door'; the named record evaluates to a whole ModelJson document.——3
📖 3 min read