Producers
Steps that create geometry or records. A producer starts a chain or replaces the stream with new data.
30 methods: linearDimension, leader, centerMark, radialDimension, angularDimension, image, textCurve, polyline, curveFromFace, curveFunction, rectangle, polygon, arcCenterStartEnd, arcThreePoints, arcTangentEnd, circle, ellipseArc, cubicBezier, quadraticBezier, nurbsCurve, spline, revisionCloud, mesh, straightSkeleton, hatch, clone, placeComponent, curveFrom, pointCloud, section.
linearDimension - Linear Dimension
Distances along start–end, split by ratios, drawn on a line offset from it.
role producer, type step, valid on curve, mesh, block, returns linearDimensionData[], default key dimension.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
start | point | [0,0,0] | The first measured point. | |||
end | point | [100,0,0] | The last measured point. | |||
offset | vector | [0,-10,0] | From the start–end line to the dimension line; must be perpendicular to end − start. | |||
ratios | number[] | [1] | Relative weights start–end is split by, one segment each: [1, 2, 1] = quarter, half, quarter. | |||
style | object | Inline style object (fontSize, endpoint, endpointSize, decimals, rounding, textSuffix, extensionOffset, extensionOvershoot, lineOvershoot); no lane to name a style by — a string value fails loud. | ||||
text | string | '' | Override label text; empty draws the measured distance instead. |
leader - Leader
An arrow from target to landing, carrying text.
role producer, type step, valid on curve, mesh, block, returns leaderData[], default key leader.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
targets | point[] | [[0,0,0]] | Points the arrow(s) reach; one arrow per point, all landing at landing. | |||
landing | point | [20,10,0] | Point [x, y, z] in mm every arrow converges to and the text sits at. | |||
text | string | '' | Label text drawn at the landing; empty draws no text. | |||
style | object | Inline style object (fontSize, endpoint, endpointSize); no lane to name a style by — a string value fails loud. |
centerMark - Center Mark
The cross at a circle's centre; plain linework, measures nothing.
role producer, type step, valid on curve, returns curveData[], default key centerMark.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
center | point | [0,0,0] | Point [x, y, z] in mm the cross is centered on. | |||
style | object | Inline style object ({ centerMarkSize } in mm); no lane to name a style by — a string value fails loud. |
radialDimension - Radial Dimension
A leader from a circle/arc's rim, labelled with its radius.
role producer, type step, valid on curve, mesh, block, returns radialDimensionData[], default key dimension.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
curve | curveData | point[] | Circle/arc to measure (a curve, a sibling object, or point rows [x,y,z]) — its centre, radius and plane are recovered by fitting. | ||||
angle | angle | 45 | Where around the circle the leader points, degrees. | |||
style | object | Inline style object (fontSize, endpoint, endpointSize, decimals, rounding, textSuffix); no lane to name a style by — a string value fails loud. | ||||
text | string | '' | Override label text; empty draws the measured radius instead. |
angularDimension - Angular Dimension
The angle at vertex between point1 and point2; arcPoint sets the arc's radius and which side it sweeps.
role producer, type step, valid on curve, mesh, block, returns angularDimensionData[], default key dimension.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
vertex | point | [0,0,0] | The angle's vertex point [x, y, z] in mm. | |||
point1 | point | [100,0,0] | A point [x, y, z] in mm on the angle's first ray, measured from vertex. | |||
point2 | point | [0,100,0] | A point [x, y, z] in mm on the angle's second ray, measured from vertex. | |||
arcPoint | point | [12,12,0] | Point [x, y, z] in mm whose distance from vertex sets the arc's radius and whose side of point1's ray picks the sweep direction. | |||
style | object | Inline style object (fontSize, endpoint, endpointSize, decimals, rounding, textSuffix); no lane to name a style by — a string value fails loud. | ||||
text | string | '' | Override label text; empty draws the measured angle instead. |
image - Image
A picture placed on a rectangle, plus its border frame.
role producer, type step, valid on curve, mesh, block, returns imageData[], default key image.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
url | url | '' | A url-method parameter key or a direct URI. | |||
at | point | [0, 0, 0] | The rectangle's local bottom-left corner; width runs along +x, height along +y. | |||
width | length | 80 | Rectangle width in mm. | |||
height | length | 0 | 0 or negative falls back to width * 3/4. |
textCurve - Text
Glyph outline curves, width-wrapped and placed on a plane.
role producer, type step, valid on curve, returns curveData[], default key text.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
position | point | [0,0,0] | The text's local origin [x, y, z] in mm, on the plane spanned by normal/xAxis. | |||
text | string | '' | The string to render as glyph outlines; empty produces no geometry. | |||
font | font | A font's url, registered via engine_add_font; not yet loaded fails soft with a pending font request. Empty resolves to the host's own default font. | ||||
width | length | 0 | Wrap width in mm; 0 or absent means no width-wrapping (only newlines break lines). | |||
style | object | Inline style object ({ height } in mm, the glyph height); no lane to name a style by — a string value fails loud. Absent uses the 3.5mm builtin. | ||||
normal | vector | [0,0,1] | Unit plane normal in object-local space the text is drawn on; zero-length fails loud. | |||
xAxis | vector | [1,0,0] | In-plane direction for the text's local +X, re-orthogonalized against normal; parallel to normal fails loud. |
polyline - Polyline
A straight-sided chain through the given points.
role producer, type step, valid on curve, returns curveData[], default key polyline.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
points | point[] | [[0,0,0],[100,0,0],[100,0,100]] | Ordered vertices. | |||
closed | boolean | false | Close the loop back to the first point. |
curveFromFace - Curves From Face
Every boundary loop of the referenced mesh's faces, outer and holes alike.
role producer, type step, valid on curve, returns curveData[], default key outline.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
source | meshData[] | Node whose face boundaries to outline. |
curveFunction - Curve From Function
Sample a formula (t) => [x,y,z] into a raw sampled polyline.
role producer, type step, valid on curve, returns curveData[], default key curve.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
point | function | (t) => [50 * Math.cos(t * 6 * Math.PI), 50 * Math.sin(t * 6 * Math.PI), t * 300] | Callback (t) => [x,y,z], t in [0,1]. | |||
samples | number | 64 | 2 | Points sampled along t. | ||
closed | boolean | false | Join the end back to the start. |
rectangle - Rectangle
A closed 4-vertex rectangle in the plane of least spread.
role producer, type step, valid on curve, returns curveData[], default key rectangle.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
point1 | point | [0,0,0] | One corner. | |||
point2 | point | [100,100,0] | Opposite corner; the smallest-spread axis is the plane normal. |
polygon - Polygon
A regular polygon in the XY plane.
role producer, type step, valid on curve, returns curveData[], default key polygon.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
center | point | [0,0] | Polygon center; the plane normal is fixed to +Z, so the polygon lies flat at this point's own Z height. | |||
radius | length | 50 | Circumradius, mm — distance from center to each vertex. | |||
sides | integer | 6 | 3 | Minimum 3. |
arcCenterStartEnd - Arc (Center)
Circular arc from center, start on the rim, and end direction.
role producer, type step, valid on curve, returns curveData[], default key arc.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
center | point | [0,0] | Arc center; radius is the distance to startPoint. | |||
startPoint | point | [10,0] | Where the arc begins; sets the radius. | |||
endPoint | point | [0,10] | Sweep direction, snapped onto the radius. | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. |
arcThreePoints - Arc (3 Points)
Circular arc through three points.
role producer, type step, valid on curve, returns curveData[], default key arc.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
startPoint | point | [0,0] | First endpoint the arc passes through. | |||
middlePoint | point | [5,5] | Point on the arc between start and end. | |||
endPoint | point | [10,0] | Last endpoint the arc passes through. | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. |
arcTangentEnd - Arc (Tangent)
Arc leaving an axis and ending at a point.
role producer, type step, valid on curve, returns curveData[], default key arc.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
axis | line | { origin: [0,0,0], direction: [0,1,0] } | Start point plus leaving tangent ({ origin, direction }). | |||
endPoint | point | [10,0] | Where the arc ends. | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. |
circle - Circle
Closed circle in the plane of center + normal.
role producer, type step, valid on curve, returns curveData[], default key circle.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
center | point | [0,0] | Circle center. | |||
radius | length | 10 | Circle radius. | |||
normal | vector | [0,0,1] | Plane normal; default Z-up. | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. |
ellipseArc - Ellipse Arc
Elliptical arc (or full ellipse at 360°) from two axis vectors.
role producer, type step, valid on curve, returns curveData[], default key ellipse.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
center | point | [0,0] | Ellipse center. | |||
xAxis | vector | [10,0] | Major-axis vector; its length is the X radius. | |||
yAxis | vector | [0,5] | Minor-axis vector; its length is the Y radius. The plane is xAxis × yAxis. | |||
angle | angle | 360 | Sweep in degrees: 360 = full closed ellipse, under 360 = open arc. | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. |
cubicBezier - Cubic Bezier
Cubic Bezier through start/end with two tangent controls.
role producer, type step, valid on curve, returns curveData[], default key bezier.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
start | point | [0,0,0] | Start point (on curve). | |||
control1 | point | [3,10,0] | First tangent control point. | |||
control2 | point | [7,10,0] | Second tangent control point. | |||
end | point | [10,0,0] | End point (on curve). | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. |
quadraticBezier - Quadratic Bezier
Quadratic Bezier through start/end with one control.
role producer, type step, valid on curve, returns curveData[], default key bezier.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
start | point | [0,0,0] | Start point (on curve). | |||
control | point | [5,10,0] | Tangent control (pulled toward, not on curve). | |||
end | point | [10,0,0] | End point (on curve). | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. |
nurbsCurve - NURBS Curve
NURBS curve from a control net, then baked to a polyline.
role producer, type step, valid on curve, returns curveData[], default key nurbs.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
points | point[] | [[0,0,0],[3,5,0],[7,5,0],[10,0,0]] | Control points of the hull; the curve is pulled toward them, not through. | |||
degree | number | 3 | Polynomial degree; must be >= 1 and <= points.length-1. | |||
knots | number[] | [] | Knot vector (length = points.length + degree + 1). Empty = clamped-uniform. | |||
weights | number[] | [] | Per-point weight > 0. Empty = uniform 1. | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. |
spline - Spline
Interpolating spline through the given points, then baked.
role producer, type step, valid on curve, returns curveData[], default key spline.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
points | point[] | [[0,0,0],[40,0,40],[80,0,20],[120,0,60]] | Points the spline interpolates through. | |||
degree | number | 3 | Polynomial degree; must be >= 1 and <= points.length-1. A closed spline must be degree 3, or the step fails. | |||
segments | integer | 32 | 1 | Edges sampled along this curve. Closed curves need at least 3. | ||
closed | boolean | false | Close into a loop, tangent-continuous where it closes (cubic). |
revisionCloud - Revision Cloud
Chain of small outward-bulging arcs, baked to segments per bump.
role producer, type step, valid on curve, returns curveData[], default key revisionCloud.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
boundary | point[] | [[0,0,0],[100,0,0],[100,100,0],[0,100,0]] | Ordered polygon vertices to bulge, implicitly closed back to the first point. | |||
bumpRadius | length | 15 | Clamped to 45% of the bump chord. | |||
bumpSpacing | length | 40 | Target arc length between bump centers along each edge, mm; every non-degenerate edge still gets at least one bump. |
mesh - Mesh
Starts the stream with exactly this Mesh.
role producer, type step, valid on -, returns meshData[], default key mesh.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
data | object | {"vertices":[],"edges":[],"faces":[]} | The Mesh itself: { vertices, edges, faces }; a closed shell (every edge used by exactly two faces) or empty for no mesh. |
straightSkeleton - Straight Skeleton
Straight skeleton of a simple polygon, as lifted roof faces thickened into a closed solid.
role producer, type step, valid on mesh, returns meshData[], default key skeleton.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
boundary | point[] | [[0,0,0],[6000,0,0],[6000,4000,0],[0,4000,0]] | Simple polygon outline in object space, implicitly closed (last point connects back to the first). | |||
pitch | angle | 30 | Roof slope from horizontal, degrees; zero or negative fails loud, and any positive value is otherwise unclamped (90 drives the rafters to tan(90°), effectively vertical). | |||
thickness | length | 0 | Roof thickness, mm, measured perpendicular to every roof face and offset below the roof surface (Blender even thickness, MeshBuild::thicken); must be > 0, the default 0 fails loud because no thickness is a surface, never a solid. |
hatch - Hatch
A region filled by a named pattern, a solid/gradient fill, or both.
role producer, type step, valid on curve, mesh, block, returns hatchData[], default key hatch.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
region | curveData | point[] | The filled region: a closed world-space ring, or point rows [x,y,z] with the first row repeated last. | ||||
pattern | pattern | patterns[] record key. | ||||
angle | angle | 0 | Pattern rotation within the region's own plane (hatch-local x/y axes), degrees. | |||
scale | number | 1 | Multiplier on the pattern's authored line spacing; 1 = as authored. | |||
origin | point | Pattern origin offset [x, y] in the region's own plane, mm (hatch-local, not world). Only x and y are read; a third component, if given, is ignored. | ||||
color | color | CSS color overriding the pattern's own stroke color; absent uses the pattern's own. | ||||
fill | object | Solid or gradient fill under the pattern ({ type: 'solid'|'linearGradient'|'radialGradient', ... }); at least one of pattern or fill is required. |
clone - Clone
Starts the chain with another object as it exists — content and placements — by key.
role producer, type step, valid on curve, mesh, block, returns objectData[], default key clone.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
source | objectData[] | [] | Node to copy — an independent deep copy. |
placeComponent - Place Component
Starts the chain with a components[] entry evaluated under parameters, as one block.
role producer, type step, valid on curve, mesh, block, returns objectData[], default key component.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
component | component | A component of the enclosing scope's components lane. | ||||
parameters | object | Overrides the component's own parameter values for this placement. An arrow (copy) => ({ ... }) is called once per copy of the carrying object (copies + 1) and must return an object; it must be the object's only step, and the object's copies and scalar placement properties (translateX..pivotZ, each may be an arrow (i) => number) then place each copy's block; name/material/layer/visible/attributes are evaluated per copy on that copy's block. |
curveFrom - Curve From
Bakes point rows, a curve value, a raw { vertices, edges } Curve, or a sibling object's curve into document geometry.
role producer, type step, valid on curve, returns curveData[], default key curveFrom.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
curve | point[] | curveData | blockData | object | [[0,0,0],[100,0,0],[100,100,0]] | Point rows [x,y,z] in mm (closed when the first row is repeated last), an existing curve value, a sibling object's placed curve, or a raw { vertices, edges } Curve object. | |||
degree | number | 1 | For point rows: 1 bakes a polyline (any other value fails loud). For an analytic curve value (Arc/Ellipse/Bezier/Nurbs/Spline): a minimum tessellation segment count, auto-increased for a 0.5mm chord deflection. |
pointCloud - Render Points
Render-only markers, not construction geometry.
role producer, type step, valid on pointCloud, returns pointCloudData[], default key point.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
positions | point[] | [[0,0,0]] | Marker positions to visualize. |
section - Section Plane
A cutting plane a section view reads.
role producer, type step, valid on curve, mesh, block, returns sectionData[], default key section.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
point | point | [0,0,0] | A point on the cutting plane. | |||
normal | vector | [1,0,0] | Section views look along -normal. | |||
active | object | function | true | true cuts in every view including the free camera, false cuts in none, a non-empty list names exactly the views it cuts in, or an arrow (i, camera) => boolean (i = 0) cuts for every camera the function returns true for (the free camera included; see the view type for the record it receives). |