Repository navigation
fix(ifc): cut each door's and window's opening to its host wall's depth (#227) (RE-83) - #440
Merged
Merged
Conversation
…th (#227) (RE-83) A door's or window's IfcOpeningElement took the element's whole box and stood up to 4.9 ft out of the wall. The opening's depth now comes from the host wall's plan outline, measured along the element's own axes; width and height stay the element's box. Against Revit's export (tools/re/openings_vs_ifc.py): Core Interior 138 of 138 within 0.25 ft (none before); Snowdon Towers 72 of 110 within 0.26 ft (none before). Walls that are not straight extrusions keep the element's box. Snowdon pairs 107 of 110 hosts with Revit's (#439), so the docs no longer say every host pairs.
DrunkOnJava
enabled auto-merge (squash)
September 28, 2026 00:17
Bugbot couldn't run - usage limit reachedBugbot 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_e3cb84f4-575a-4eec-bf3e-6139c3dc43d3) |
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
Each door's and window's
IfcOpeningElementis now as deep as the host wall it cuts, instead of the element's whole box (RE-83). Width and height stay the element's box.Motivation
#227: openings stood up to 4.9 ft out of both faces of their wall, because the opening was the door's box (swing and trim included).
Changes
src/ifc/mod.rsopening_cuts_through_hosts: for a hosted element with a rectangular extrusion, the host's plan outline (the one its body is built from) is measured along the element's two local plan axes. The axis on which the wall is a thin band (at most 3 ft, under half the other axis) is the through-axis; the opening spans the band there. Otherwise the element's box is kept. The element's rotation is not used to pick the axis: on Core Interior some walls run along Y with a door rotation of 0.IfcModel::opening_cuts(entities::OpeningCut, serde default) and the writer's opening chain use it for the profile size and origin.tools/re/openings_vs_ifc.py: scores openings against Revit's export by filler Tag.reports/element-framing/RE-83-openings-through-walls.md; README, supported profile, support matrix notes, CHANGELOG.Testing
tools/re/openings_vs_ifc.py, rvt-rs's export against Revit's own IFC4 export:The Snowdon residual is itemised in the report: 23 in "Solar Wall" hosts that Revit meshes as faceted face sets (the element's box is kept), 7 frame margin, 5 chase-wall windows (one with a different host, #439), 2 curtain-wall doors (host, #439), 1 overhead door.
-D warnings, rustdoc-D warningstools/ci/verify-real-files.sh --profile ciwith the family and project corpora: passcargo +1.85.0 check --profile ci --all-targets,cargo +nightly checkof the fuzz workspace (a fuzz target buildsIfcModel)ifc_schema_arity.py --witness-agreementpasses. Entity counts are unchanged, so the committed observations are unchanged.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.
IfcModelgains a field with a serde default.Related issues
Refs #227 (not closed), #439.
Note
Medium Risk
Changes IFC void geometry for all hosted doors/windows and touches the export pipeline and STEP writer; behavior is gated on host outline heuristics with documented fallbacks, but viewers that subtract openings will see different wall cuts.
Overview
Door and window
IfcOpeningElementgeometry now matches host wall thickness (#227, RE-83). Previously the void used the door/window bounding box (swing and trim included), so openings could extend several feet past both wall faces. Export now derives anOpeningCutper hosted filler: width and height stay the element box; depth comes from projecting the host wall’s plan outline onto the filler’s local axes and taking the thin “through-wall” band (≤3 ft and under half the other span). Non–straight-extrusion hosts keep the full element box.IfcModel::opening_cuts(serde-default map by filling entity index) is filled inopening_cuts_through_hostsduring export; the STEP writer uses it for opening profile dimensions and centre instead of the body extrusion.tools/re/openings_vs_ifc.pyscores world-space opening boxes against Revit’s IFC by fillerTag.Docs and changelog record validation (e.g. Core Interior 138/138 within 0.25 ft) and correct the claim that every measured model matches Revit on host pairs — Snowdon is 107/110 (#439).
Reviewed by Cursor Bugbot for commit f9012d9. Configure here.