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.
| Method | Description | Arg | Type | Default | Meaning |
|---|---|---|---|---|---|
clone | Clone | source | objectData[] | [] | Node to copy — returns an independent deep copy. |
nesting | Nesting — 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. | parts | object | [] | 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. |
stockWidth | length | 1220 | 2D stock sheet width in mm — sheet parts only. | ||
stockHeight | length | 2440 | 2D stock sheet height in mm — sheet parts only. | ||
spacing | length | 5 | Gap between nested 2D outlines, mm. | ||
seed | number | 1 | Deterministic packing seed for the 2D layout — the same seed always produces the same layout. | ||
stockLength | length | 3000 | 1D stock bar length in mm — linear parts only. | ||
kerfWidth | length | 3 | 1D saw-blade kerf consumed between adjacent cuts on the same bar, mm — linear parts only. | ||
placeComponent | Place 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. | source | string | Key of a components[] entry to place. | |
at | vector | [0, 0, 0] | Position offset (world space in a 3D chain; this space's local plane in a flat context). | ||
rotate | angle | 0 | Rotation in degrees about Z, applied at the local origin before the at offset. | ||
scale | number | 1 | |||
args | object | Optional 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). | |||
placePart | Place 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. | source | string | Key of the components[] entry to fold and place — its attributes.pattern content is the flat pattern. | |
at | vector | [0, 0, 0] | Position offset. | ||
args | object | {} | Optional parameter overrides for THIS placement, e.g. { thickness: 5 } — wins over the component's own parameter defaults (same contract as placeComponent's args). | ||
angles | object | {} | 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. | ||
surfaceDivide | Divide 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. | surface | surface | [[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). |
countU | number | 4 | Cells along U (columns). | ||
countV | number | 4 | Cells along V (rows). | ||
trim | brepData | 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. | ||
pattern | string | '' | Optional: key of a components[] entry naming an adaptive pattern (exposing a boundary parameter) to fill each cell with, instead of grid lines. | ||
tableEntity | Table 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. | source | string | Key of a tables[] chain to render into this flat space. | |
at | vector | [0, 0, 0] | Position offset in this space's local plane. | ||
rotate | angle | 0 | Rotation in degrees about Z, applied at the local origin BEFORE the at offset. | ||
scale | number | 1 | |||
viewObject | View 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. | source | string | Key of a views[] entry to embed into this flat space. | |
at | vector | [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. | ||
rotate | angle | 0 | Rotation in degrees about Z, applied at the drawing's top-left (the at point) BEFORE the offset. | ||
scale | string | '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). | ||
crop | object | Fractions 0–1 of the uncropped drawing [left, bottom, right, top]. Independent of scale. Omit = full drawing. |