Skip to content

v1.0.4 — Assembly general-arrangement drawings

Choose a tag to compare

@gsdali gsdali released this 13 Jun 22:53
· 10 commits to main since this release
2c3f813

General-arrangement / assembly drawings (#50)

DrawingComposer.Composer.render only took a single Shape. Two new overloads produce one GA sheet that lays out multiple parts together with per-component identity:

  • render(spec:components:) — lays out [DrawingComponent] in shared views (one scale + placement frame → parts sit in assembled positions), draws a numbered balloon per part, and renders a parts-list (BOM) table. Same partNumber/name merge into one BOM row with summed quantity; every instance is still drawn. Optional per-component transform (12-elt row-major 3×4) positions a part before projection.
  • render(spec:document:) — flattens an XCAF Document to its positioned leaf parts and delegates; leaf names drive the parts list.

Reuses upstream OCCTSwift v0.150 BillOfMaterials + Sheet.renderBOM + DXFWriter primitives. DrawingComposerResult gains componentCount + partsList (both defaulted → source-compatible; the single-shape path and the occtkit CLI are unchanged).

Scope: per-view sections/detailViews/dimensions/manual annotations key to one drawing per named view and are not carried into the GA path; auto centrelines/centermarks are applied per component. No cross-component hidden-line removal (each part's HLR is independent).

Tests

First tests for the DrawingComposer module — new DrawingComposerTests target (3): multi-component BOM merge, empty-throws, placement transform.

🤖 Generated with Claude Code