Repository navigation
fix(ifc): a door rvt-rs binds to no plain wall is placed on Revit's axes, from the wall its own record names and that wall's flip (#1494) (RE-474) - #2049
Merged
Conversation
…xes, from the wall its own record names and that wall's flip (#1494) (RE-474) RE-347 places a door or window set in a plain wall rvt-rs binds at its stored X, reversed where its hand and facing flips differ. The doors rvt-rs binds to no wall kept the default axes: the flips alone are wrong on 21 to 23 of them per BIM4LCA office file, uniformly by Revit's IfcDoorType. On every one whose native m_hostId names a straight wall with a read flip, Revit's X is the stored X reversed where the flips differ or that wall's m_isFlipped is set, but not both (273 of 273 over the office's four files, 1 of 1 on RE1). The wall's flip is now kept beside its native direction (m_wall_native_flipped), and attach_opening_placement_axes gives such a door the axes through native_symbol_cuts::instance_hosts, marked m_opening_placement_from_stored_host; the writer then says so with PlacementAxesSource stored_axes_reversed_by_flips_and_host_wall_flip. Claude-Session: https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut
…oor is set in (#1494) (RE-474) The trace probe showed the doors rvt-rs binds to no wall are set in curtain walls (66 of the office's 75 hosts decode as CurtainWall), which the rule's plain-wall direction map leaves out, so it wrote nothing. Their own m_hostId is now looked up among curtain walls with a native line and flip; RE-474, the docs row and the field docs say curtain wall. Claude-Session: https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut
DrunkOnJava
marked this pull request as ready for review
November 15, 2026 07:40
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 door set in a curtain wall, which rvt-rs binds to no plain wall because Revit's export cuts it no opening, is now placed on Revit's axes. Its stored X axis is reversed where its hand and facing flips differ, or where the curtain wall its own native record names (
m_hostId) is flipped, but not both. Until now these doors kept the default axes, because RE-347's rule, the flips alone, would be wrong on 21 to 23 of them per BIM4LCA office file.Motivation
#1494: "49 inverted relative to the axes rule, uniformly by
IfcDoorType". The research scorerdoor_type_creator_vs_ifc.py(branchresearch/1494-door-type-creator, Measure 43683865183) found the separator:m_hostIdnames a straight wall with a read flip, the rule above is Revit's: 67 of 67, 69, 68 and 68 on the office's four files, and 1 of 1 on RE1 Architecture, with 0 wrong. The flips alone get 48, 48, 47 and 47 of those, and 0 of 1.Changes
src/research/partition_schema_mvp/walls.rs,fields.rs: a wall keeps its native flip beside its direction (WALL_NATIVE_FLIPPED_FIELD).src/research/partition_schema_mvp/openings.rs:attach_opening_placement_axestakes a door or window with no binding to a plain wall throughnative_symbol_cuts::instance_hosts. It keeps the same upright, along-the-wall and near-axis checks, and marks the resultOPENING_PLACEMENT_FROM_STORED_HOST_FIELD.src/ifc/export_content.rs,element_provenance.rs,tests/value_sources_offsets.rs,docs/export-diagnostics.md:PlacementAxesSourcestored_axes_reversed_by_flips_and_host_wall_flip, with the readers the existing value lists.Testing
The rule is in two commits. On
dfeb9fadit wrote nothing (Measure 43686098590: 120 of 120 exports identical). A trace probe showed these doors' hosts decode asCurtainWall, which the plain-wall map leaves out.1be73ffbreads them among curtain walls. On1be73ffb, rows as registered above:Held. The door-placement run 43688985749 places 66 of 75, 68 of 77, 67 of 76 and 67 of 76 doors on the four office files, and 1 of 1 on RE1. All 269 are
sameas Revit's, 0 different. The housing's 8 per file name no curtain wall and are untouched.door_axes_vs_ifcin the full run: doors placed on Revit's axes go from 194 to 260 on the office as built (from 4 to 5 on RE1), still 0 different.Held. Every door and window RE-347 already places is unchanged and
sameas Revit's on every file, the held-out ones included.Held. 102 of 102
diagnostics.jsonare equal. Boxes keep their world extents.Held. The full Measure 43688981702 (
1be73ffbagainst4b1d8f19) moves 22 exports:rac_advanced,rac_basic,rme_advancedandrme_basicof 2024 to 2027;No scorer other than
door_axes_vs_ifcmoved. On the samples, the same-project check now compares 124 doors against the 2024 save (rac_advanced,rme_*), where it compared 107, and 22 where it compared 17 (rac_basic). The same-project gates pass on1be73ffb(check run).The commits after
1be73ffbare4e977644and203ce6e5: RE-474,docs/status.mdand the changelog fragment. The evidence is one office (four files) and one RE1 door; RE-474 section 5 says so.Closes #1494.
https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut