Skip to content

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
DrunkOnJava merged 4 commits into
mainfrom
fix/1494-door-axes-host-flip
Nov 15, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
fix/1494-door-axes-host-flip

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

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 scorer door_type_creator_vs_ifc.py (branch research/1494-door-type-creator, Measure 43683865183) found the separator:

  • Within each of Revit's door type entities one value holds: 0 mixed types on every model.
  • The creating instance's flips predict nothing the door's own flips do not.
  • On every door bound to no plain wall whose m_hostId names 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.
  • For the doors rvt-rs does bind, the wall's flip is not part of the rule: the flips alone are exact there, 1,061 of 1,061 (RE-347).

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_axes takes a door or window with no binding to a plain wall through native_symbol_cuts::instance_hosts. It keeps the same upright, along-the-wall and near-axis checks, and marks the result OPENING_PLACEMENT_FROM_STORED_HOST_FIELD.
  • src/ifc/export_content.rs, element_provenance.rs, tests/value_sources_offsets.rs, docs/export-diagnostics.md: PlacementAxesSource stored_axes_reversed_by_flips_and_host_wall_flip, with the readers the existing value lists.

Testing

The rule is in two commits. On dfeb9fad it wrote nothing (Measure 43686098590: 120 of 120 exports identical). A trace probe showed these doors' hosts decode as CurtainWall, which the plain-wall map leaves out. 1be73ffb reads them among curtain walls. On 1be73ffb, rows as registered above:

  1. 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 same as Revit's, 0 different. The housing's 8 per file name no curtain wall and are untouched. door_axes_vs_ifc in 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.

  2. Held. Every door and window RE-347 already places is unchanged and same as Revit's on every file, the held-out ones included.

  3. Held. 102 of 102 diagnostics.json are equal. Boxes keep their world extents.

  4. Held. The full Measure 43688981702 (1be73ffb against 4b1d8f19) moves 22 exports:

    • the four office files and RE1;
    • rac_advanced, rac_basic, rme_advanced and rme_basic of 2024 to 2027;
    • Snowdon Architectural.

    No scorer other than door_axes_vs_ifc moved. 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 on 1be73ffb (check run).

The commits after 1be73ffb are 4e977644 and 203ce6e5: RE-474, docs/status.md and 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

…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
DrunkOnJava marked this pull request as ready for review November 15, 2026 07:40
@DrunkOnJava
DrunkOnJava merged commit d3a23d6 into main Nov 15, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1494-door-axes-host-flip branch November 15, 2026 07:51
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.

Doors bound to no plain wall: 49 inverted relative to the axes rule, by IfcDoorType (RE-347 follow-up)

1 participant