BlockAnnotations
Global drawing system that manages block insertions across all TechnicalDrawing instances.
Extends
AnnotationSystem<BlockAnnotationsSystem>
Implements
Constructors
new BlockAnnotations()
new BlockAnnotations(
components):BlockAnnotations
A block is a named, reusable geometry definition (e.g. a furniture symbol
or a detail imported from a DXF). Multiple insertions of the same block share
the same THREE.BufferGeometry, so only the transform (position, rotation,
scale) differs per instance.
Register via TechnicalDrawings.use:
const blocks = techDrawings.use(BlockAnnotations);
Typical workflow:
// 1. Project external geometry to drawing space
const projected = TechnicalDrawing.toDrawingSpace(ifcLines, drawing);
// 2. Register the block definition (global — do this once)
blocks.define("CHAIR", { lines: projected.geometry });
// 3. Insert on any drawing
blocks.add(drawing, { blockName: "CHAIR", position, rotation: 0, scale: 1, style: "default" });
Parameters
| Parameter | Type |
|---|---|
components | Components |
Returns
Overrides
AnnotationSystem<BlockAnnotationsSystem>.constructor
Properties
definitions
readonlydefinitions:DataMap<string,BlockDefinition>
Named block definitions in block-local XZ space. Register via define. Geometry is shared across all drawings and insertions.