Skip to content

spec: §IFC-EXPORT-SEED — row 36, IFC export emits an EMPTY file for any resident - #115

Merged
red1oon merged 1 commit into
masterfrom
spec/ifc-export-seed
Sep 18, 2026
Merged

red1oon merged 1 commit into
masterfrom
spec/ifc-export-seed

Conversation

@red1oon

@red1oon red1oon commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Spec for bim-ootb #1747 (merged). Written and committed before the code.

Measured defect: open Duplex (196 elements on screen), call Bonsai.ifc.build(), get {walls:0, openings:0, arrays:0, bytes:592} — an IFC4 header and nothing else. build() handles three op types; every ARC-seeded element is a fourth (GEOM_INSERT).

Records the design choice and its reason: reuse the renderer's own vertices rather than re-derive the world transform — the direct lesson of §XEDGE-GEOWIRE the same day, where a re-derivation described as "the same final numbers, fewer steps" was wrong for 798 of 934 elements.

Binding constraints, witness claims (E2 asserts the exact product count so a partial export can't pass), and out-of-scope items all stated up front.

🤖 Generated with Claude Code

…ny resident

Measured, not inferred: open Duplex (196 elements on screen), call Bonsai.ifc.build(),
get {walls:0, openings:0, rels:0, arrays:0, bytes:592}. A user who picks Export > IFC on a
resident gets an IFC4 header and nothing else. build() branches on GEOM_EXTRUDE_POLY,
GEOM_CUT and GEOM_ARRAY; every ARC-seeded element is a GEOM_INSERT, so the three handled
types match zero ops in a real building.

Spec: emit one IFC product per non-anchor GEOM_INSERT, typed from params.ifc_class, with
geometry as IfcTriangulatedFaceSet over IfcCartesianPointList3D (both confirmed present in
the vendored web-ifc).

The load-bearing design choice, and its reason: REUSE THE RENDERER'S OWN VERTICES rather
than re-derive the world transform. That is the direct lesson of today's §XEDGE-GEOWIRE —
cross_edges.js re-implemented 'world = centre + R*vert', called it 'the same final numbers,
fewer steps', and was wrong for 798 of 934 elements. The folded meshes already carry
world-space positions baked in (measured: matrixWorld identity on all 3,290 meshes, max
delta 0.000e+0 between geometry.boundingBox and Box3.setFromObject), so the export reads
those coordinates verbatim and parity with what the user sees is structural.

Binding constraints recorded: anchors excluded (SampleCastle has 65) since an export is an
audit; no silent box substitution for an unresolvable mesh (the §PRIME LESSON fault); the
three existing op types stay byte-identical.

Witness W-IFC-EXPORT-SEED specified with five claims, E2 asserting the EXACT product count
so a partial export cannot pass. Out-of-scope items named so the slice is not mistaken for
a fully-furnished IFC.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UU4FmnF1izwj4c2tqp6H29
@red1oon
red1oon merged commit 58e3799 into master Sep 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant