Skip to content
Shapemetry

objectData producers

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

MethodDescriptionArgTypeDefaultMeaning
cloneClonesourceobjectData[][]Node to copy — returns an independent deep copy.
nestingNesting — Only valid inside a sheet's own operations (flat lane): packs parts onto stock — 2D sheet outlines (seeded genetic-algorithm nesting) and/or 1D bar stock (deterministic first-fit-decreasing cutting-stock), dispatched per part by whether it's a sheet or a linear part (a section parameter). A mixed part list nests into both outputs at once. Part keys name components[] entries — their attributes.pattern content is what gets nested.partsobject[]Optional array of { key, quantity } overrides naming components[] entries to nest — e.g. [{key:'bracket',quantity}]. Empty (default) = nest every part actually placed in the 3D scene (via placePart), with quantity = its placement count.
stockWidthlength12202D stock sheet width in mm — sheet parts only.
stockHeightlength24402D stock sheet height in mm — sheet parts only.
spacinglength5Gap between nested 2D outlines, mm.
seednumber1Deterministic packing seed for the 2D layout — the same seed always produces the same layout.
stockLengthlength30001D stock bar length in mm — linear parts only.
kerfWidthlength31D saw-blade kerf consumed between adjacent cuts on the same bar, mm — linear parts only.
placeComponentPlace Component — Places a components[] entry. In a 3D chain: an instanced group, and — when the component declares opening — cuts those volumes out of whatever this chain already built. On paper: a declared-flat component splices its 2D body (a title block); a 3D component must be framed by a views[] entry (viewDetail) and placed as a ViewObject.sourcestringKey of a components[] entry to place.
atvector[0, 0, 0]Position offset (world space in a 3D chain; this space's local plane in a flat context).
rotateangle0Rotation in degrees about Z, applied at the local origin before the at offset.
scalenumber1
argsobjectOptional object literal overriding the component's own parameter values for THIS placement only - e.g. { width: 500 }. Two placements with different args render independently (Type/Instance split).
placePartPlace Part — Folds a part's flat pattern into 3D and places it at a position — sheet-metal bend / wood kerf-bend for an ordinary part, or a swept bar/profile (round bar, box section…) for a part with a section parameter set. The source names a components[] entry whose attributes.pattern content is the flat pattern; fold metadata (thickness/material/grain/section/…) is read from the component's own parameters.sourcestringKey of the components[] entry to fold and place — its attributes.pattern content is the flat pattern.
atvector[0, 0, 0]Position offset.
argsobject{}Optional parameter overrides for THIS placement, e.g. { thickness: 5 } — wins over the component's own parameter defaults (same contract as placeComponent's args).
anglesobject{}Optional per-bend angle override for THIS placement, keyed by the tagged bend/crease curve's own operation key — e.g. { lid: 0, flap1: 180 }. Empty = every bend at its own tagged default (fully folded). A key can reference an animated parameter for a fold-open/close animation.
surfaceDivideDivide Surface — Revit-style Divide Surface: UV-divide a surface into a Count U x Count V cell grid, each drawn as isocurve grid lines by default. Trim (optional, in the surface's own normalized UV space [0,1]x[0,1], z=0) drops cells fully outside it and clips border cells. Pattern (optional) names a components[] entry naming an adaptive pattern that exposes its own Region parameter — resolved per cell (sized to that cell's physical mm footprint) and mapped onto the surface; falls back to grid lines when empty, unresolved, or a cell's pattern produces nothing.surfacesurface[[0,0,0],[1000,0,0],[0,1000,0],[1000,1000,0]]The surface to divide — a surface parameter reference, a literal control-point grid, or a raw NurbsSurface (same forms the surface parameter itself accepts).
countUnumber4Cells along U (columns).
countVnumber4Cells along V (rows).
trimbrepData | curveData[] | point[][]Optional: closed loops in the surface's own normalized UV space [0,1]x[0,1] (z=0) — face, closed curves, or point rings. Cells fully outside are dropped; border cells are clipped. Empty = the full domain.
patternstring''Optional: key of a components[] entry naming an adaptive pattern (exposing a boundary parameter) to fill each cell with, instead of grid lines.
tableEntityTable ObjectData — Renders a tables[] chain's computed rows (same grid sheets.ts builds for a "table" placement) at a local position/scale. PAPER ONLY — a sheet's own operations (or another flat context); authored in root operations[] or a components[] body it is a validation error, since a report about the scene belongs on paper, not back inside the scene.sourcestringKey of a tables[] chain to render into this flat space.
atvector[0, 0, 0]Position offset in this space's local plane.
rotateangle0Rotation in degrees about Z, applied at the local origin BEFORE the at offset.
scalenumber1
viewObjectView Object — A ViewObject — an object whose geometry is a views[] entry — placed on paper. source / scale / crop live on the object; at / rotate live on the instance. PAPER ONLY — a sheet's own operations (or another flat context); authored in root operations[] or a components[] body it is a validation error.sourcestringKey of a views[] entry to embed into this flat space.
atvector[0, 0, 0]Paper-space point that receives the drawing's TOP-LEFT corner. Auto-tile (omit at) also places by top-left. No nine-point chooser.
rotateangle0Rotation in degrees about Z, applied at the drawing's top-left (the at point) BEFORE the offset.
scalestring'auto'Drawing scale — a number (0.02 = 1) or 'auto'. Auto-tiled (no at) view objects sharing 'auto' are fitted jointly. A positioned view object treats 'auto' as 1 (no layout pass to fit against).
cropobjectFractions 0–1 of the uncropped drawing [left, bottom, right, top]. Independent of scale. Omit = full drawing.
Last updated: 📖 5 min readEdit on GitHub