Repository navigation
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
Conversation
DrunkOnJava
marked this pull request as ready for review
November 5, 2026 23:48
DrunkOnJava
enabled auto-merge (squash)
November 6, 2026 00:43
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
force-pushed
the
research/1408-void-loop-direction
branch
2 times, most recently
from
November 9, 2026 00:51
2137822 to
e5cc36c
Compare
DrunkOnJava
marked this pull request as ready for review
November 9, 2026 01:16
DrunkOnJava
force-pushed
the
research/1408-void-loop-direction
branch
from
November 9, 2026 01:28
e5cc36c to
8aa7430
Compare
DrunkOnJava
enabled auto-merge (squash)
November 9, 2026 02:08
… stored in, as Revit tags it (#1408) (RE-355)
DrunkOnJava
force-pushed
the
research/1408-void-loop-direction
branch
from
November 9, 2026 02:10
8aa7430 to
58d3e46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_taggave.Final unfiltered Measure 42517948182, 118 models:
ifc.sha256moves 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_voidstakes the stored ends (StoredEnds) and usesfirst_line_tagwhere it reads,void_tagelsewhere;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.rsandtools/ci/scrub-holdout-results.sh(thevoid rule:count line, numbers only, kept for the held-out models).reports/element-framing/RE-355-void-loop-directions.md, an addendum indocs/format-reconnaissance.md,changelog.d/fixed/1408-void-tag-first-line-direction.md.Measured
main, 54 exports) and the unfiltered run 42131336084 (e77ef0d, which mergesmain,-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 bytemain'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 IfcSlabwritten with Revit's tag 35 of 36 to 36 of 36 (as built) and 34 of 35 to 35 of 35 (permit), box, name,PredefinedTypeandReferenceequal on all, theextra: none in IfcSlabvoid gone, openings written that Revit's export does not 9 to 8 in each file, and one more missingQto_OpeningElementBaseQuantities.Areain each census. Itssame-project gatescheck run is a success on 6d3f6c7 and on e77ef0d.step_writer.rskeys the opening's id on the tag, and the ids of itsIfcRelVoidsElement,Pset_OpeningElementCommonand defining relation follow it, so 4 ids move on each of the 6 moved voids. No id redesign.GLine; the exporter reads a subset (bounded_line_atrejects a start parameter not below the end or a non-unit direction,first_sketch_curvegives 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 keepsvoid_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 aFloorexports tags.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 --libruns the new pure-helper tests in CI.Audit-honesty checklist
changelog.d/fixed/1408-void-tag-first-line-direction.mdLegal and contribution hygiene
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 gatescheck is a success on 6d3f6c7, the commit that holds thesrc/change (run 42122776008), and on the merged head e77ef0d (run 42131336084). The commit after it, 9092184, touchessrc/only in the#[cfg(test)]module ofelement_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.