Skip to content

fix(ifc): a floor's void is tagged by the direction its first line is stored in, as Revit tags it (#1408) (RE-355) - #1482

Merged
DrunkOnJava merged 2 commits into
mainfrom
research/1408-void-loop-direction
Nov 9, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
research/1408-void-loop-direction

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

A floor's void is tagged by the direction its loop's first line (the lowest ElementId) is stored in: stored against the loop's counter-clockwise walk, that line is the tag; stored along it, the line after it. That is Revit's tag on 133 of 133 voids (BIM4LCA office as built 36, at building permit 35, Core Interior 62), including 3147725, and on 12 of 12 voids of Snowdon Towers architectural (11 before). Where the direction is not read the tag is the one void_tag gave.

Final unfiltered Measure 42517948182, 118 models: ifc.sha256 moves on the 4 exports above. On the office pair, the files #1408 names, no other void moves. Outside it, 1 void on Snowdon Towers architectural and 3 on Snowdon Towers structural move.

Closes #1408

Motivation

#1408: RE-339's rule gives Revit's tag on 69 of the office's 71 floor voids, not on 3147725 (6 lines, a notch drawn in the middle). A reading from the order the first two lines were drawn in fits the office and is wrong on 20 of Core Interior's 62, so it is not used.

Changes

  • src/research/element_record_plan_profiles.rs: first_line_tag (the rule; it reads only where every edge of the loop has one straight line and the first line's stored ends lie at its edge's two vertices in one order only), tag_voids takes the stored ends (StoredEnds) and uses first_line_tag where it reads, void_tag elsewhere; void_first_lines; failure-first tests of the pure helper.
  • src/research/partition_schema_mvp/slabs.rs: after the floor profiles are solved, the ends of the lowest line of each void are read from the line's own data (scan_sketch_curves) and the voids are tagged again, only where the exact sketch reads are on.
  • probes/examples/probe_re355_void_loop_directions.rs and tools/ci/scrub-holdout-results.sh (the void rule: count line, numbers only, kept for the held-out models).
  • reports/element-framing/RE-355-void-loop-directions.md, an addendum in docs/format-reconnaissance.md, changelog.d/fixed/1408-void-tag-first-line-direction.md.

Measured

  • Probe runs 42115473363, 42116875940, 42118790534 and 42122779912 (the office files, Core Interior): the rule's tag is Revit's on 36 of 36 (office as built), 35 of 35 (at permit) and 62 of 62 (Core Interior); loops read by branch: against the walk 27, 27 and 62, along it 9, 8 and 0, direction not read 0 (RE-355 section 3). The first-two-lines order is right on the office and wrong on 20 of Core Interior's 62.
  • Run 42122776008 (6d3f6c7 against a clean main, 54 exports) and the unfiltered run 42131336084 (e77ef0d, which merges main, -f base=main -f nordic=true -f r2025=true -f holdout=true -f samples=true, every scorer, 111 exports including the 24 Revit 2025 models): 4 exports moved and 107 are byte for byte main's. The 4: 3147725 on the office as built and at building permit; 1 void on Snowdon Towers architectural, now equal to Revit's (11 of 12 voids with a tag Revit's export has on the host before, 12 of 12 after, scored locally on the exports run 42125396606 kept; none left Revit's); 3 on Snowdon Towers structural, with no export to check them. The unfiltered run's scorer diff is in the two office files only: none in IfcSlab written with Revit's tag 35 of 36 to 36 of 36 (as built) and 34 of 35 to 35 of 35 (permit), box, name, PredefinedType and Reference equal on all, the extra: none in IfcSlab void gone, openings written that Revit's export does not 9 to 8 in each file, and one more missing Qto_OpeningElementBaseQuantities.Area in each census. Its same-project gates check run is a success on 6d3f6c7 and on e77ef0d.
  • A moved tag moves GlobalIds: step_writer.rs keys the opening's id on the tag, and the ids of its IfcRelVoidsElement, Pset_OpeningElementCommon and defining relation follow it, so 4 ids move on each of the 6 moved voids. No id redesign.
  • Measured on Revit 2024 only: every moved export is a 2024 file, no Revit 2025 export holds a floor void to check (the 23 puzzbobb models with an export hold no unfilled opening, RE1 Architecture's three are not floor voids), and no 2025 to 2027 export moved.
  • What the exporter exercises: the probe's table is the reading from each line's GLine; the exporter reads a subset (bounded_line_at rejects a start parameter not below the end or a non-unit direction, first_sketch_curve gives no line where the first record is an arc, 0.005 ft against the probe's 0.002 ft, collinear-merged rings do not read) and keeps void_tag's tag where it declines. An agreeing read leaves no trace, so the exporter visibly exercises the 6 voids that moved. The re-tag also runs for roofs, ceilings and pads, where only the decoded field changes, since only a Floor exports tags.
  • Held-out and spent models, counts only (run 42129836920, db0bb07, dispatched from the branch so its scrub script keeps the probe's count line): 11 read, each with 0 loops (so 0 right of 0 read), and 8 not read because the probe's native reader is not measured on Revit 2018 to 2022; the rule is exercised on no held-out model, and it moved none of their 19 exports (RE-355 section 3).
  • Why Revit does this is unread, and the rule for a first line stored along the walk rests on 9 loops of the office (RE-355 section 4).

Testing

  • tools/check-local.sh: not run locally (no local builds); the draft's fast jobs and the full CI are the gate. cargo test --profile ci --lib runs the new pure-helper tests in CI.
  • The Measure runs above.

Audit-honesty checklist

  • The report says what is not shown (why is unread, 9 loops, no curves, no export for Snowdon structural)
  • Changelog fragment changelog.d/fixed/1408-void-tag-first-line-direction.md
  • No emojis, no private paths, nothing licensed committed (Snowdon's Revit export was read locally, counts only)

Legal and contribution hygiene

  • Apache-2.0; clean-room: only bytes of the office (CC BY-SA 4.0), Core Interior (MIT) and Autodesk's samples, fetched, never committed, and Revit's own IFC exports of them.

Breaking changes

tag_voids (research API) takes a third argument. Tags and the GlobalIds that follow them change as measured above.

Verdict

The same-project gates check is a success on 6d3f6c7, the commit that holds the src/ change (run 42122776008), and on the merged head e77ef0d (run 42131336084). The commit after it, 9092184, touches src/ only in the #[cfg(test)] module of element_record_plan_profiles.rs (three failure-first cases of the pure helper: lines listed highest first, ends held for another line, ends that fit either order); no non-test code and no gate file changes.

@DrunkOnJava DrunkOnJava changed the title research(elements): a probe reads which way a floor void's sketch lines run and which line Revit tags (#1408) (RE-352) research(elements): a probe reads which way a floor void's sketch lines run and which line Revit tags (#1408) (RE-355) Nov 5, 2026
@DrunkOnJava DrunkOnJava added ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes and removed ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes labels Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 5, 2026 23:48
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava DrunkOnJava changed the title research(elements): a probe reads which way a floor void's sketch lines run and which line Revit tags (#1408) (RE-355) fix(ifc): a floor's void is tagged by the direction its first line is stored in, as Revit tags it (#1408) (RE-355) Nov 6, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 6, 2026 00:43
@DrunkOnJava
DrunkOnJava marked this pull request as draft November 8, 2026 20:00
auto-merge was automatically disabled November 8, 2026 20:00

Pull request was converted to draft

@DrunkOnJava
DrunkOnJava force-pushed the research/1408-void-loop-direction branch 2 times, most recently from 2137822 to e5cc36c Compare November 9, 2026 00:51
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 9, 2026 01:16
@DrunkOnJava
DrunkOnJava force-pushed the research/1408-void-loop-direction branch from e5cc36c to 8aa7430 Compare November 9, 2026 01:28
rvt-rs-review[bot]
rvt-rs-review Bot previously approved these changes Nov 9, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 9, 2026 02:08
@DrunkOnJava
DrunkOnJava merged commit 2e696ea into main Nov 9, 2026
36 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/1408-void-loop-direction branch November 9, 2026 02:47
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.

Floor void 3147725: the tag of a loop with a notch drawn later (RE-339 follow-up)

1 participant