Skip to content

feat(elements): run a wall through a butt join or stop it, from the walls' join lists (#358) (RE-70) - #386

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/wall-join-lists
Sep 24, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/wall-join-lists

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

A wall's own element data lists the walls it runs through at a join (RE-70, #358). Where two walls' centrelines end at one point, Revit runs one on to the other's far face and stops the other at its near face. The wall that runs through names the other in its join lists and is not named back.

The lists never contradict a joint Revit draws cleanly:

check agree undecided disagree
Revit's IFC4 bodies, Snowdon Towers, perpendicular L joints with clean ends 194 2 0
the same, angled L joints 18 0 0
record box, axis-parallel L joints, 5 files (2024 and 2025) 1,110 47 2

Wall bodies take these ends where both walls have a single layer:

Snowdon Towers, walls with both of Revit's ends main this PR
axis-parallel 338 of 976 346
angled 13 of 102 13

9 walls improve and none gets worse; no wall's faces move.

What was found

A wall's element data holds, usually twice:

07 00 00 00 · u32 tag · 02 00 00 00 · [00 00 00 00 on 2025] · u32 count · count × (u32 · u64 ElementId · u32)
  • The tag is one value per document: 0x0b9f7d on Snowdon, Core Interior and RE1, 0x039f3d on the MIT tutorial house.
    • It is in no schema class: both 2024 files carry the same 472,791-byte Formats/Latest without it.
    • It is no declared ElementId, and not tied to a build: Snowdon and Core Interior come from different builds and share it.
    • So the reader takes the one tag whose frames name only walls, and gives nothing if two do. Exactly one passes on every file measured.
  • Layers decide whether an end is clean. Revit cleans a join layer by layer, and where either wall has several layers its finishes wrap the corner. Of the perpendicular ends the rule decides, 158 of 158 are clean between single-layer walls, and 36 of 667 otherwise.
    • Applying the rule to layered joins too was measured first: 9 walls better and 14 worse, all at irregular ends. The exporter applies it only between single-layer walls.
  • The record box already carries the answer on axis-parallel walls. The through wall's box reaches half the other wall's thickness past the joint, and the stopped wall's ends at it. That is why RE-26's trims get most of these right, and why the gain is small.
    • The 8 axis-parallel walls gained are split-face CMU retaining walls, whose boxes run 0.401 ft past both joints where Revit's bodies reach ±0.318 ft.

Changes

  • src/partition_compound_structure.rs: wall_join_count_offset, wall_join_lists, scan_wall_join_partners.
  • src/element_record_wall_joins.rs: WallLine, butt_join_reaches.
  • src/partition_schema_mvp.rs: attach_wall_join_reaches, WALL_JOIN_REACH_FIELDS, WallAxis::join_reach_feet.
  • src/ifc/export_content.rs: wall_centreline_body draws a decided end there; JoinReachStartFeet / JoinReachEndFeet properties.
  • examples/probe_re70_wall_join_lists.rs, tools/re/wall_join_lists_vs_ifc.py, reports/element-framing/RE-70-wall-join-lists.md.
  • Support-matrix row (element-record-wall-centreline-bodies), README walls row, status, CHANGELOG.

Testing

End to end, against real files. No tests were added.

  • rvt-gltf on Snowdon Towers against Revit's IFC4 bodies with tools/re/wall_bodies_vs_ifc.py, main and branch, wall by wall.
  • Core Interior and RE1: byte-identical GLB. MIT house 2024 and 2025: byte-identical IFC apart from the timestamp.
  • The probe and tools/re/wall_join_lists_vs_ifc.py on all five files reproduce every table in the report.
  • rvt-ifc on Snowdon: 9.7 to 10.1 s on both builds.
  • 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.

What stays

  • Layered L joints: 375 Snowdon ends are off. Each layer needs its own end; the lists say which wall's core runs through.
  • Free ends and T junctions: 482 ends are off.
  • Angled joins at other than a right angle: the rule holds on all 18 clean ends, but the through wall's end is slanted, which a rectangle can't draw.

Audit-honesty checklist

  • Every count is measured against Revit's own export or the record box.
  • RE finding: probe and report.
  • No emojis, private paths or personal data.

Legal and contribution hygiene

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

Related issues

Refs #358.


Note

Medium Risk
Changes wall body geometry and IFC properties for butt joins based on heuristic partition parsing; impact is narrowed to single-layer perpendicular L-joints with fail-closed rules, but incorrect join-list reads could still mis-trim walls.

Overview
RE-70 (#358) teaches rvt-rs to read which wall runs through a butt join from each wall’s partition join lists, then trims centreline wall bodies to match Revit for single-layer L-joints.

The decoder scans 07 00 00 00 join-list frames in element data (scan_wall_join_partners / wall_join_lists, with a 2025 layout tweak), picks the per-document tag whose entries name only walls, and butt_join_reaches decides each end: exactly one perpendicular partner at the same centreline point, elevation overlap, and asymmetric naming (the wall that lists the other runs through by half the partner’s thickness; the named wall stops short). Those reaches attach as m_wall_join_*_reach on WallAxis.

IFC / geometry extends wall_centreline_body so decided ends lengthen or shorten the run along the centreline (axis-parallel and angled rectangles), and exports JoinReachStartFeet / JoinReachEndFeet when set. Multi-layer joins, T-junctions, and ambiguous lists are left unchanged.

Also adds probe_re70_wall_join_lists, wall_join_lists_vs_ifc.py, the RE-70 report, and updates README / support matrix / status / CHANGELOG with measured Snowdon gains (e.g. more walls with both Revit ends).

Reviewed by Cursor Bugbot for commit d07f540. Configure here.

…alls' join lists (#358) (RE-70)

A wall's element data lists the walls it runs through at a join (07 00 00 00, a per-document tag, 02 00 00 00, a zero u32 on Revit 2025, a count and u32 + u64 ElementId + u32 entries). Where two walls' centrelines end at one point, the wall naming the other reaches its far face and the named one stops at its near face.

On Snowdon Towers the lists agree with every clean joint in Revit's IFC4 bodies: 194 perpendicular and 18 angled ends, 2 undecided, none contradicted. They also agree with the record box at 1,110 axis-parallel ends on five 2024 and 2025 files, with 2 contradictions, both irregular in Revit's body. The tag is read off the data, since it is in no schema class, no ElementId and no build: 0x0b9f7d on Snowdon, Core Interior and RE1, 0x039f3d on the MIT house.

Bodies take these ends only between single-layer walls. Revit cleans layered joins layer by layer: 631 of 667 multi-layer ends are irregular, against 0 of 158 single-layer ends. On Snowdon 9 walls improve and none gets worse, and axis-parallel walls with both of Revit's ends go from 338 to 346. Core Interior, RE1 and the MIT house export unchanged. The IFC reports each such end as JoinReachStartFeet / JoinReachEndFeet.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 24, 2026 09:26
@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_a2a5b0e0-99f2-47e8-a312-02fe6ac86d0c)

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