Value types
The value types an argument or a parameter can carry, with the engine's own description.
| Type | Category | Description |
|---|---|---|
curveData | data | A 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). |
pointCloudData | data | A Curve with no edges — a point cloud. |
meshData | data | A Mesh — the evaluated face shape. |
blockData | data | A Block — evaluated objects kept together as one unit. |
linearDimensionData | data | A LinearDimensionRecord. |
radialDimensionData | data | A RadialDimensionRecord. |
angularDimensionData | data | An AngularDimensionRecord. |
leaderData | data | A LeaderRecord. |
imageData | data | An ImageRecord. |
sectionData | data | A SectionRecord. |
hatchData | data | A HatchRecord. |
objectData | data | Any evaluated stream piece — a Curve, a Mesh or a Block; an expression naming a sibling object reads that object's evaluated content. |
material | record | A materials[] key, quoted: 'oak'. |
layer | record | A layers[] key, quoted: 'walls'. |
pattern | record | A patterns[] key, quoted: 'brick'. |
view | record | A views[] key, quoted: 'plan'. A visible / active value that is an arrow (i, camera) => boolean (i = the copy index) 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. |
component | record | A components[] key, quoted: 'door'; the named record evaluates to a whole ModelJson document. |
number | value | A number. |
integer | value | A whole number; a fraction fails loud. |
length | value | A number of millimetres, typed by the user within min/max, never picked from options. |
angle | value | A number of degrees. |
boolean | value | On or off: 0 / 1 or false / true, read by truthiness. |
string | value | Text, quoted: 'abc'. |
color | value | A CSS colour, quoted: '#ffffff'. |
url | value | An address, quoted: 'https:…' or 'data:…'. |
vector | value | A direction [x, y, z]; [x, y] reads z as 0. |
point | value | A position [x, y, z] in millimetres; [x, y] reads z as 0. |
plane | value | { point, normal } — a point on the plane and its normal vector. |
line | value | { origin, direction } — an infinite line through origin. |
curve | value | Point rows [[x, y, z], …], an analytic curve value (Arc.*, Ellipse.*, Bezier.*, Nurbs.*, Spline.*) or a Curve. |
surface | value | A NURBS control net, the value of a surface parameter. |
transform | value | 16 numbers, a column-major 4x4 matrix, translation at indices 12/13/14. |
function | value | An arrow function, e.g. (p, i) => true. |
action | value | The result of Property.animate(name, seconds, [v1, …]) or Property.set(name, [v1, …]): plain data the host plays on a click; valid only as the result of onClick. |
object | value | Any JSON-shaped value — an object { … } or an array [ … ]. |
font | value | The address of a font file, quoted; '' = the host's default font. |