ParaShape

Value types

The value types an argument or a parameter can carry, with the engine's own description.

TypeCategoryDescription
curveDatadataA 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).
pointCloudDatadataA Curve with no edges — a point cloud.
meshDatadataA Mesh — the evaluated face shape.
blockDatadataA Block — evaluated objects kept together as one unit.
linearDimensionDatadataA LinearDimensionRecord.
radialDimensionDatadataA RadialDimensionRecord.
angularDimensionDatadataAn AngularDimensionRecord.
leaderDatadataA LeaderRecord.
imageDatadataAn ImageRecord.
sectionDatadataA SectionRecord.
hatchDatadataA HatchRecord.
objectDatadataAny evaluated stream piece — a Curve, a Mesh or a Block; an expression naming a sibling object reads that object's evaluated content.
materialrecordA materials[] key, quoted: 'oak'.
layerrecordA layers[] key, quoted: 'walls'.
patternrecordA patterns[] key, quoted: 'brick'.
viewrecordA 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.
componentrecordA components[] key, quoted: 'door'; the named record evaluates to a whole ModelJson document.
numbervalueA number.
integervalueA whole number; a fraction fails loud.
lengthvalueA number of millimetres, typed by the user within min/max, never picked from options.
anglevalueA number of degrees.
booleanvalueOn or off: 0 / 1 or false / true, read by truthiness.
stringvalueText, quoted: 'abc'.
colorvalueA CSS colour, quoted: '#ffffff'.
urlvalueAn address, quoted: 'https:…' or 'data:…'.
vectorvalueA direction [x, y, z]; [x, y] reads z as 0.
pointvalueA position [x, y, z] in millimetres; [x, y] reads z as 0.
planevalue{ point, normal } — a point on the plane and its normal vector.
linevalue{ origin, direction } — an infinite line through origin.
curvevaluePoint rows [[x, y, z], …], an analytic curve value (Arc.*, Ellipse.*, Bezier.*, Nurbs.*, Spline.*) or a Curve.
surfacevalueA NURBS control net, the value of a surface parameter.
transformvalue16 numbers, a column-major 4x4 matrix, translation at indices 12/13/14.
functionvalueAn arrow function, e.g. (p, i) => true.
actionvalueThe 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.
objectvalueAny JSON-shaped value — an object { … } or an array [ … ].
fontvalueThe address of a font file, quoted; '' = the host's default font.

Edit on GitHub