Skip to content
Shapemetry

brepData producers

Every producer whose return is brepData[] — what it creates is concatenated into the data stream. Authored as a step in an objects[] chain.

MethodDescriptionArgTypeDefaultMeaning
barcodeBarcode — A string as scannable barcode geometry: filled faces (one per bar) in the XY plane spanning Width × Height. Symbology picks the STANDARD, not a style — there is exactly one correct rendering per string. Quiet zones are not emitted (a margin is absence of ink): leave clear space around the placement, at least 10 module widths either side.textstring'AIM1234'The string to encode; single-quote the literal. code128 carries ASCII 32..126 — anything else is an error, never a substitution.
symbologystring'code128'The barcode standard. 'code128' (ISO/IEC 15417) is the only one implemented.
widthlength50Total symbol width in mm (bars only, no quiet zone).
heightlength15Bar height in mm.
nurbsSurfaceNURBS SurfacecontrolPointspoint[][[0,0,0],[100,0,40],[200,0,0],[0,100,40],[100,100,120],[200,100,40],[0,200,0],[100,200,40],[200,200,0]]Flat ROW-MAJOR list of control points [x,y,z] — the surface is pulled toward them. Row length = Columns.
columnsnumber3Points per row; the number of rows is total points / columns.
degreeUnumber3Smoothness along rows (clamped to rows - 1).
degreeVnumber3Smoothness along columns (clamped to columns - 1).
patchFromCornersPatch From Cornerscorner0point[0,0,0]First corner [x,y,z]; corners wind in order 0→1→2→3.
corner1point[100,0,0]Second corner [x,y,z].
corner2point[100,100,0]Third corner [x,y,z], diagonal from corner 0.
corner3point[0,100,0]Fourth corner [x,y,z].
straightSkeletonStraight Skeleton — Straight skeleton of a simple polygon, returned as lifted roof faces (one per boundary edge). Pitch 0 = the flat 2D skeleton partition; pitch > 0 = a hip roof. Reflex vertices (an L-shape's inner corner) are handled via split events.boundarypoint[][[0,0,0],[6000,0,0],[6000,4000,0],[0,4000,0]]Ordered [x,y,z] vertices of a simple (non-self-intersecting) polygon, no holes.
pitchangle30Roof slope: each face rises at this angle from horizontal, away from its boundary edge.
sweepMorphMorph SweepprofilescurveData[][]Ordered cross-section curves (2+); the sweep morphs from the first at the path start to the last at the path end.
pathcurveData[]Path the morphing cross-section travels along.
samplesnumber48Cross-sections placed along the path (higher = smoother along its length).
treeTree — Procedural deciduous tree (ported from ez-tree, github.com/dgreenheck/ez-tree) — recursive branch tubes + billboard leaf quads. bark.type/leaves.type select a small builtin bark/leaf material set by name ('oak' | 'aspen', unrecognized falls back to 'oak') — the tree stamps its faces with that name, resolved once the registry's builtin materials reach the render path (RegistryInput.builtinMaterials). seed reseeds the branch/leaf variation deterministically; branch mirrors ez-tree's own option group verbatim (every geometry-shaping field); bark/leaves keep only the fields with geometric or material-dispatch meaning.seednumber12345Random seed for branch/leaf variation — the same seed always regenerates the identical tree.
barkobject{ type: 'oak' }type selects the builtin bark material by name ('oak' | 'aspen' — unrecognized falls back to 'oak').
branchobject{ levels: 3, angle: { 1: 54, 2: 58, 3: 32 }, children: { 0: 4, 1: 2, 2: 3 }, force: { direction: { x: 0, y: 1, z: 0 }, strength: 0.01 }, gnarliness: { 0: 0.07, 1: -0.08, 2: 0.11, 3: 0.09 }, length: { 0: 28.08, 1: 4.55, 2: 9.78, 3: 7.16 }, radius: { 0: 1, 1: 1.02, 2: 0.69, 3: 1.19 }, sections: { 0: 16, 1: 9, 2: 8, 3: 1 }, segments: { 0: 7, 1: 5, 2: 3, 3: 3 }, start: { 1: 0.49, 2: 0.06, 3: 0.12 }, taper: { 0: 0.73, 1: 0.42, 2: 0.69, 3: 0.75 }, twist: { 0: -0.23, 1: 0.42, 2: 0, 3: 0 } }Per-recursion-level branch shape, verbatim ez-tree TreeOptions.branch: levels (recursion depth, 0 = trunk only), angle/children/gnarliness/length/radius/sections/segments/start/taper/twist keyed by level (0..levels, or 1..levels where ez-tree has no level-0 value), plus force { direction, strength } steering overall growth toward a direction.
leavesobject{ type: 'oak', billboard: 'double', angle: 42, count: 14, start: 0.16, size: 1.38, sizeVariance: 0.7 }Leaf quads grown on the terminal branch level — type selects the builtin leaf material by name ('oak' | 'aspen'), billboard ('single' or 'double' perpendicular quads), angle off the parent branch, count per qualifying branch, start (0..1, where along the branch leaves begin), size, sizeVariance.
triangulateTriangulate — Delaunay triangulation of scattered points into a TIN (triangulated irregular network) — one triangle Face per Delaunay triangle, computed on XY with Z carried through per vertex (a 2.5D site/terrain surface).pointspoint[][[0,0,0],[1000,0,0],[1000,1000,0],[0,1000,50],[500,500,150]]Scattered survey points [x,y,z] — triangulated on XY; Z is carried through to the output vertices unchanged.
Last updated: 📖 4 min readEdit on GitHub