curveData producers
Every producer whose return is curveData[] — what it creates is concatenated into the data stream. Authored as a step in an objects[] chain.
| Method | Description | Arg | Type | Default | Meaning |
|---|---|---|---|---|---|
arcCenterStartEnd | Arc (Center) | center | point | [0,0] | Arc center [x,y]; the radius = distance from center to start. |
startPoint | point | [10,0] | Where the arc begins; sets the radius. | ||
endPoint | point | [0,10] | Direction the arc sweeps toward (snapped onto the radius). | ||
arcTangentEnd | Arc (Tangent) | axis | axis | { origin: [0,0,0], direction: [0,1,0] } | Start point + leaving tangent direction, as an axis (magnitude irrelevant). |
endPoint | point | [10,0] | Where the arc ends. | ||
arcThreePoints | Arc (3 Points) | startPoint | point | [0,0] | First endpoint the arc passes through. |
middlePoint | point | [5,5] | Point on the arc between start and end (defines the bulge). | ||
endPoint | point | [10,0] | Last endpoint the arc passes through. | ||
centerMark | Center Mark — The cross at a circle's centre — plain linework, NOT a dimension: it measures nothing. Its size is the style's centerMarkSize (DXF's DIMCEN). | center | point | [0,0,0] | |
style | string | 'standard' | annotationStyles[] name — centerMarkSize is read from it. | ||
circle | Circle | center | point | [0,0] | Circle center [x,y] in the XY plane. |
radius | length | 10 | Circle radius. | ||
cubicBezier | Cubic Bezier | 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). | ||
curveFromFace | Curves From Face — Extract every boundary loop of the referenced face(s) as closed curves — the outer ring and each hole ring become one curve apiece. Reference another node by key (nested blocks are flattened; non-faces are ignored). Feed the result to offset/extrude/fill or use it as a construction outline. | source | brepData[] | Expression referencing the node whose faces to outline (e.g. a Group key like box). | |
curveFunction | NurbsCurve From Function — Sample a formula t => [x,y,z] over t in [0,1] into a curve — helix, spiral, sine profile: the shapes no fixed primitive covers. | 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]. The default draws a 3-turn helix, radius 50, height 300. |
samples | number | 64 | Points sampled along t — higher follows the formula closer at higher cost. | ||
degree | number | 3 | NurbsCurve smoothness through the samples: 1 = exact polyline, 3 = smooth cubic. | ||
closed | binary | 0 | true joins the end back to the start — author the formula with matching endpoints. | ||
ellipseArc | Ellipse Arc | center | point | [0,0] | Ellipse center [x,y]. |
xAxis | vector | [10,0] | Major-axis vector; its length is the X radius. | ||
yAxis | vector | [0,5] | Minor-axis vector (perpendicular to xAxis); its length is the Y radius. | ||
angle | angle | 360 | Sweep in degrees: 360 = full closed ellipse, under 360 = open arc. | ||
nurbsCurve | NURBS NurbsCurve | points | point[] | [[0,0,0],[3,5,0],[7,5,0],[10,0,0]] | Control points [x,y,z] of the hull; the curve is pulled toward them, not through. |
degree | number | 3 | Polynomial degree (clamped to points.length-1): 1 = polyline, 3 = smooth cubic. | ||
knots | number[] | [] | Knot vector (length = points.length + degree + 1, non-decreasing). Empty = auto clamped-uniform. | ||
weights | number[] | [] | Per-point weight, > 0 (length = points.length). Empty = uniform 1; higher pulls the curve toward that point. | ||
polygon | Polygon | center | point | [0,0] | Polygon center [x,y] in the XY plane. |
radius | length | 50 | Circumradius — distance from center to each vertex. | ||
sides | number | 6 | Number of edges, minimum 3. | ||
polyline | Polyline | points | point[] | [[0,0,0],[100,0,0],[100,0,100]] | Ordered vertices [x,y,z] (z optional, defaults 0). |
closed | binary | 0 | true closes the loop back to the first point; false leaves it open. | ||
quadraticBezier | Quadratic Bezier | 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). | ||
rectangle | Rectangle | point1 | point | [0,0,0] | One corner of the rectangle. |
point2 | point | [100,100,0] | Opposite corner. The axis with the smallest difference from Point 1 becomes the rectangle's plane (XY/XZ/YZ) — no separate rotate needed to place it on a different plane. | ||
revisionCloud | Revision Cloud — Drafting revision cloud: redraws a closed boundary as a chain of small outward-bulging arcs — the standard mark for a region changed since the last issue. Add a separate note/leader annotation near a corner to label the revision number. | boundary | point[] | [[0,0,0],[100,0,0],[100,100,0],[0,100,0]] | Ordered [x,y,z] vertices of the changed region (z optional, defaults 0). |
bumpRadius | length | 15 | How far each arc bulges outward. Clamped per edge when it would exceed 45% of that edge's own bump spacing (a valid 3-point arc can't bulge past half its chord). | ||
bumpSpacing | length | 40 | Target arc-chord length along each edge before starting the next bump. | ||
spline | Spline | points | point[] | [[0,0,0],[50,0,50],[100,0,100]] | Control points [x,y,z] the smooth curve passes through/near. |
degree | number | 3 | NurbsCurve smoothness: 1 = polyline, 2 = quadratic, 3 = cubic (most common). | ||
textCurve | Text NurbsCurve | text | string | 'Hello' | The string to render as outline curves; single-quote the literal. |
font | font | Font reference; leave '' to use the built-in fallback font. | |||
fontSize | length | 10 | Cap height of the glyphs in model units. | ||
width | length | 0 | Word-wrap into lines no wider than this (mm); 0 = single line. A \n in the text always breaks. | ||
voronoi | Voronoi Cells — 2D Voronoi cell layout — one closed curve per cell, clipped to Boundary. Feed curveExtrude/curveFill downstream for panel/partition layouts. Explicit Points override Count/Seed; a Point outside Boundary owns no cell. | points | point[] | [] | Explicit seed positions [x,y] (z ignored). Non-empty overrides Count/Seed entirely. |
count | number | 12 | Number of random seeds generated inside Boundary. Ignored when Points is non-empty. | ||
seed | number | 1 | Deterministic RNG seed for the random seeds (same seed = same layout). Ignored when Points is non-empty. | ||
boundary | point[] | [[0,0,0],[1000,0,0],[1000,1000,0],[0,1000,0]] | Ordered [x,y,z] vertices of the (convex) region cells are clipped to. | ||
relax | number | 2 | Lloyd relaxation iterations — moves each seed to its cell's centroid and recomputes, for more even cell sizes. |