Skip to content

feat(elements): stop a wall layer by layer where it ends part way along another, as Revit draws T joints (#358) (RE-73) - #394

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/wall-t-joins
Sep 24, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/wall-t-joins

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Wall T joints (RE-73, #358). A wall whose centreline ends part way along another wall's centreline now stops against it the way Revit draws it. The other wall runs through, and this one stops layer by layer, by Revit's layer priorities (1 structure, 2 substrate, 3 thermal or air, 4 finish 1, 5 finish 2):

  • counted from the face it meets, each layer passes the other wall's layers of a larger function number and stops at the first of an equal or smaller one;
  • so a core passes the other wall's finishes and stops at its core, and a finish stops at its face;
  • a single-layer wall stops at the face.
Snowdon Towers, wall_bodies_vs_ifc.py / wall_layer_joins_vs_ifc.py --glb main this PR
axis-parallel walls with both of Revit's ends 516 of 976 675
angled walls with both of Revit's ends 18 of 102 18
GLB layer ends matching Revit's body 3,925 of 5,634 4,290

On Snowdon, 280 of the 313 T ends that can be measured are right in every layer, and 960 of 1,025 layer ends match. Per wall: 186 better, 14 worse, faces unchanged.

The join lists name the other wall at only 8 of Snowdon's 334 T ends, so T joints are found by geometry. An end qualifies when:

  • no other wall's centreline ends at the same point;
  • exactly one other wall overlapping it in elevation has the end on its centreline;
  • the two are perpendicular;
  • the end is at least half the stopping wall's width from that wall's ends.

The last condition comes from Core Interior. Eight of its walls end 0.083 ft from the end of the wall they reach, and Revit leaves them unjoined, running to that wall's centreline. A first draft without the condition broke all eight, so it was caught on the reference export before this PR.

Each T end names the wall it stops against: JoinStartWallElementId / JoinEndWallElementId and JoinStartRunsThrough / JoinEndRunsThrough false in the IFC, and "Start: stops at" / "End: stops at" in the viewer's element panel.

What gets worse

Revit draws some T joints as a clean stop at the face, and nothing read predicts which. The report lists what was checked: wall types, the element-record box, RE-26's trims, the join lists and heights.

  • 16 Snowdon T ends are such clean stops, and 13 walls lose an end they had.
  • All three T ends on RE1 (Revit 2025) are clean stops: 3 of its 7 walls keep both of Revit's ends, against 6 on main. RE-71 found RE1's one layered corner drawn the same way.

Changes

  • src/element_record_wall_joins.rs: tee_join, called by butt_joins for every end no other wall's centreline ends at. ButtJoin docs cover T joints.
  • src/partition_schema_mvp.rs, src/ifc/export_content.rs, src/ifc/scene_graph.rs, viewer/src/main.ts: doc comments. The fields, properties and panel rows are RE-70's and RE-71's.
  • viewer/tests/viewer-regression.spec.ts: Core Interior wall 20804, which stops against 20800 and 20802 at T joints, lists both in the element panel.
  • examples/probe_re73_tee_joins.rs, tools/re/wall_tee_joins_vs_ifc.py, reports/element-framing/RE-73-wall-tee-joins.md.
  • research/witness/magnetar-2024-core-interior{,-slim}/observations/rvt-rs.json: regenerated, since Core Interior's IFC gains 202 partner properties.
  • Support-matrix row, README walls row, status, viewer-api, CHANGELOG.

Testing

End to end. No unit tests were added.

  • Snowdon Towers (local only), against Revit's IFC4 export: wall_tee_joins_vs_ifc.py, wall_bodies_vs_ifc.py, and wall_layer_joins_vs_ifc.py --glb. rvt-ifc's IFC and rvt-gltf's GLB agree on all 1,078 walls, and rvt-ifc takes 10.0 s.
  • Core Interior, against Revit's slim export: 202 T ends, all right. ifc_world_aabb.py gives 351 of 360 walls world-exact, as on main, and no wall's box changes. The witness verdicts replay to PASS with all three observations matching, and ifc_schema_arity.py --witness-agreement passes.
  • RE1: wall_tee_joins_vs_ifc.py and wall_bodies_vs_ifc.py, as above.
  • MIT tutorial house (local only): 20 T ends on 16 walls, identical in the 2024 and 2025 saves. Its IFC and GLB agree on all 45 walls.
  • Viewer: the Playwright test above, in Chromium against the staged Core Interior demo.
  • Gates: fmt, clippy -D warnings, rustdoc -D warnings, the workspace suite, the corpus tests under --profile ci, cargo +1.85.0 check and the fuzz workspace check.

Audit-honesty checklist

  • Counts measured against Revit's own exports. The regressions are stated above and in the report.
  • RE finding: probe, tool and report.
  • No emojis, private paths or personal data.

Legal and contribution hygiene

  • Apache-2.0
  • Clean-room: byte observations, with Revit's own exports as oracles.
  • Snowdon Towers and the MIT house stay local.

Related issues

Refs #358.


Note

Medium Risk
Changes wall join geometry, IFC join metadata, and viewer relations for many walls; improves Revit alignment overall but introduces known regressions where Revit uses unpredictable clean face stops.

Overview
RE-73 (#358) adds T-joint handling when a wall’s centreline ends partway along another perpendicular wall (no butt-join mate at that point). The stopping wall is trimmed layer by layer using Revit layer priorities (each layer passes lower-priority layers on the host and stops at equal or higher priority); single-layer walls stop at the host face. Detection is geometry-based (one overlapping host, perpendicular, end on centreline, far enough from the host’s ends).

element_record_wall_joins::tee_join is invoked from butt_joins for those ends; existing reach/layer-reach fields drive centreline bodies and layered profiles. Each T end records the partner wall with runs_through: false in IFC join properties and the viewer element panel (“stops at”), including ~202 new partner properties on Core Interior (witness hashes updated).

Snowdon metrics improve (e.g. axis-parallel walls with both Revit ends 516 → 675, layer ends matching Revit 3,925 → 4,290). Some Revit T joints drawn as a clean face stop are not predictable from file data—13 Snowdon walls and 3 of 7 RE1 walls can lose an end they had before.

Adds probe_re73_tee_joins, wall_tee_joins_vs_ifc.py, the RE-73 report, doc/README/changelog updates, and a Playwright check on Core Interior wall 20804.

Reviewed by Cursor Bugbot for commit 5b5877a. Configure here.

…ng another, as Revit draws T joints (#358) (RE-73)
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 24, 2026 13:50
@cursor

cursor Bot commented Sep 24, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_12cc93b9-0259-43d4-b3ed-0b18c3401ae4)

@DrunkOnJava
DrunkOnJava merged commit fa8cc33 into main Sep 24, 2026
22 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/wall-t-joins branch September 24, 2026 13:52
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