Repository navigation
feat(ifc): give the opening a door cuts in a second wall its Qto_OpeningElementBaseQuantities.Depth (#1165) - #1755
Closed
DrunkOnJava wants to merge 2 commits into
Closed
DrunkOnJava wants to merge 2 commits into
DrunkOnJava wants to merge 2 commits into
Conversation
…ingElementBaseQuantities.Depth (#1165)
…t too (#1165) Read on Revit's export of the BIM4LCA office as built: on the four such openings read, Width, Height and Depth are 100/2100/810 and 300/2100/1210 mm, the same way round as on any rectangular opening. Height is the outline's (2.1000 m on all four). Width is left out: the outline along the wall is 0.1000 and 0.3002 m, 0.2 mm off Revit's on two of the four.
Owner
Author
|
Superseded by #1779: the same change on a fresh branch on today's main, with the measured rows in its body. |
Closed
7 tasks done
Merged
7 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 12, 2026
… and Height (#1165) (#1784) ## Summary The 25 openings of the BIM4LCA office as built whose `Qto_OpeningElementBaseQuantities.Depth` Revit's export writes and rvt-rs's does not are the openings rvt-rs writes for a door that also cuts a second wall (`ifc::wall_cut_openings`'s `door_cut`, `quantities: false` since RE-338). They are written with no quantity set at all. This change writes their `Depth`, the extent the opening is extruded across that wall by, and leaves their `Width` and `Height` out. ## Evidence - `evidence/nordic-office-as-built/qtos_vs_ifc.txt`: `Depth: 308, equal 283, different 0, missing 25`, all 25 `on IfcOpeningElement x25`; a further 59 openings rvt-rs does not write are counted apart, and `rvt-rs quantities Revit does not write: 0`. - `evidence/nordic-office-as-built/unfilled_openings_vs_ifc.txt`, by kind of cutter and host: `IfcCurtainWall in IfcWall` 27 of 27, `IfcFireSuppressionTerminal in IfcWall` 39 of 39, `none in IfcWall` 30 of 30, `none in IfcSlab` 36 of 36 and `IfcSlab in IfcSlab` 1 have `Depth equal`; `IfcDoor in IfcWall` is the one kind with `revit: 39, written: 25` and `Depth in Revit's: 25` but no `Depth equal` line — rvt-rs writes those 25 openings and no `Depth` on any. - The counts close exactly: 283 equal = 187 openings of a door or window whose symbol cuts an outline (the filled openings, whose `Depth` the writer already writes) + 96 of the 99 wall-cut openings it writes (three curtain walls are written that Revit's export lacks); 283 + 25 = 308. So the 25 are precisely the door-in-second-wall openings, and Revit writes `Depth` on every one of them. - What Revit's value is. RE-321 §3 (the rectangular, cabinet and curtain-wall openings, all 96 equal) and RE-244 (the 187) find `Depth` to be the extrusion's depth, i.e. the extent the opening passes through the wall by, which is what `thickness_feet` already is for a wall-cut opening. On a door's second-wall opening that extent is the door's own width: `revit.ifc`'s opening `#77141` (Tag 1383546, unfilled, voiding `Basic Wall:VS-2:1352055`) carries `Width` 100, `Height` 2100, `Depth` 810 mm — the profile is the second wall's plane (the door's own wall thickness by the door's height) extruded 810 mm across it, and 810 mm is the door's own opening's across extent, which RE-338 §3 measured as the door's own opening box (equal to rvt-rs's box within 0.01 ft on 25 of 28 as built, and on all 25 these openings are the ones written). `Depth` = 3048 mm on exactly the 11 openings where the second wall runs *along* the door's wall, which rvt-rs leaves out (`door_second_wall_parallel_to_door_wall`, 9 of the 14 it leaves out of the 39). - Rule, and what stays out: `Depth` is written on every wall-cut opening whose host holds that quantity (all 607 walls that rvt-rs writes hold a `Width` here, and with `--no-base-quantities` the list is empty and nothing is written). `Width` and `Height` stay missing on the 25: Revit's export swaps them on a door's opening (RE-244, RE-235 §5) and nothing read says it does not on this one, even though `#77141`'s are the rectangle's extents. So `Width` 152 (missing 56) and `Height` 152 (missing 56) are unchanged, and the 14 door openings rvt-rs does not write are untouched. ## Changes - `src/ifc/step_writer.rs`: the wall-cut opening's quantity set is now written where its host holds the quantity, not only where `Width` and `Height` are written too; `Width` and `Height` are still pushed only for the rectangular, cabinet and curtain-wall openings, so their output is byte for byte what it was, and a door's second-wall opening gains a set holding `Depth` alone. - `src/ifc/entities.rs`, `src/ifc/wall_cut_openings.rs`: the doc comments of `quantities` say why that opening takes only its `Depth`. - `docs/supported-profile.md` and `docs/release-1.0-criteria.md`: the sentences listing what an opening a door cuts in a second wall carries gain the `Depth`, and say that its `Width` and `Height` stay out. - `changelog.d/added/1165-door-second-wall-opening-depth.md`: new fragment. ## Measured One Measure run scored this change together with nine others it was drafted beside (run 43086493417, head `f5f54467`, base `5e3ac5b0`: every model, with the BIM4LCA office and housing, the Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs; every shard and both same-project gates passed; rows registered on #1636 before it was read). Each change writes a value of a different name, so the rows below are this change's alone. Both sides' exports were kept, and the 58 sample saves, which no Revit export scores, were compared value by value. After the second read the stack was rebuilt on `main` as seven changes (the pipe change left it, and the roof and floor-opening rules were narrowed to square-cornered outlines) and measured once more in full (run 43100937918, head `53c19487` against `e8a99d03`, rows registered first, read on #1636): all shards and both same-project gates pass, "different" and "values Revit does not write" are unchanged on every model, and the rows below repeat except where a line says otherwise. The first draft wrote `Depth` alone. `Height` was added after reading four such openings in Revit's export of the office (Width, Height and Depth 100 / 2100 / 810 and 300 / 2100 / 1210 mm, the same way round as on any rectangular opening; the table is in the last comment on #1749). | Model | `Depth` equal, before | after | `Height` equal, before | after | newly different | |---|---:|---:|---:|---:|---:| | Office as built | 283 of 308 | 308 of 308 | 96 of 152 | 121 of 152 | 0 | | Office at permit | 262 of 295 | 295 of 295 | 75 of 137 | 108 of 137 | 0 | | Timber office as built | 286 of 302 | 302 of 302 | 101 of 142 | 117 of 142 | 0 | | Timber office at permit | 247 of 281 | 263 of 281 | 74 of 121 | 90 of 121 | 0 | | Concrete housing as built, at permit | 72, 62 of 79 | 75, 65 of 79 | 18, 6 of 35 | 21, 9 of 35 | 0 | | Timber housing as built, at permit | 67 of 68 each | 68 of 68 each | 7 of 19 each | 8 of 19 each | 0 | - The timber office at permit read 9 `Depth` values different before and reads the same 9 after. - Sample saves: one opening in each rac_basic save of 2024 to 2027 gains the two values. ## Still open - `Width`, which Revit's export writes too, stays out: Revit's is the thickness of the wall the door stands in, and rvt-rs's outline is 0.2 mm wider than that on two of the four openings read, which the scorer would count as different. - A second wall that runs along the door's wall is still not written. Stack: this is change 5 of 7; each branch holds the ones before it, so its own diff is its last commits until those land. First draft: #1755, then #1779. ## Testing - Built, linted and tested by CI on this head; nothing was built on a workstation. - Verified end to end on real Revit files against Revit's own exports: the Measure runs named above, which anyone can repeat with `gh workflow run measure.yml --ref main -f ref=<this head> -f base=e8a99d03be8a76a2c8871ea8cc28d036653ec6e2 -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true`. - No test was added: no unit test, and no pinned count moves except where the body says so. - `main` has moved since those runs (#1769 re-meshes trimmed faces, and #1771, #1773, #1781, #1782, #1787 and #1789 landed). This head, `44bafde9`, is built on #1783's merged head `0f82cb8e`, so until #1783 lands its diff against `main` also shows #1783's change; its own change (`0f82cb8e..44bafde`) is this pull request's two commits and nothing else (byte-equal outside `docs/`, word-equal inside). It is armed only after #1783 has merged. Measure 43108424934 measured the nine batch changes together on `main` with #1769 (`3f2a04c4` against `e7ac68e7`, rows registered on #1636 first): every count above repeats, and the same-project gates pass. ## Audit-honesty checklist - [x] Docs state what this change writes and what it leaves out - [x] A changelog fragment under `changelog.d/` - [x] No emojis, private paths or personal data in committed files - [x] Limits are in the body above and in the code's doc comments ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary source, decompiled internals or NDA material. Where revit-ifc (CLEANROOM.md source 5) is cited, it is read and cited by file and class, and no code is copied. - [x] No fixture with real-world personal data ## Breaking changes None.
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
The 25 openings of the BIM4LCA office as built whose
Qto_OpeningElementBaseQuantities.DepthRevit's export writes and rvt-rs's does not are the openings rvt-rs writes for a door that also cuts a second wall (ifc::wall_cut_openings'sdoor_cut,quantities: falsesince RE-338). They are written with no quantity set at all. This change writes theirDepth, the extent the opening is extruded across that wall by, and leaves theirWidthandHeightout.Evidence
evidence/nordic-office-as-built/qtos_vs_ifc.txt:Depth: 308, equal 283, different 0, missing 25, all 25on IfcOpeningElement x25; a further 59 openings rvt-rs does not write are counted apart, andrvt-rs quantities Revit does not write: 0.evidence/nordic-office-as-built/unfilled_openings_vs_ifc.txt, by kind of cutter and host:IfcCurtainWall in IfcWall27 of 27,IfcFireSuppressionTerminal in IfcWall39 of 39,none in IfcWall30 of 30,none in IfcSlab36 of 36 andIfcSlab in IfcSlab1 haveDepth equal;IfcDoor in IfcWallis the one kind withrevit: 39, written: 25andDepth in Revit's: 25but noDepth equalline — rvt-rs writes those 25 openings and noDepthon any.Depththe writer already writes) + 96 of the 99 wall-cut openings it writes (three curtain walls are written that Revit's export lacks); 283 + 25 = 308. So the 25 are precisely the door-in-second-wall openings, and Revit writesDepthon every one of them.Depthto be the extrusion's depth, i.e. the extent the opening passes through the wall by, which is whatthickness_feetalready is for a wall-cut opening. On a door's second-wall opening that extent is the door's own width:revit.ifc's opening#77141(Tag 1383546, unfilled, voidingBasic Wall:VS-2:1352055) carriesWidth100,Height2100,Depth810 mm — the profile is the second wall's plane (the door's own wall thickness by the door's height) extruded 810 mm across it, and 810 mm is the door's own opening's across extent, which RE-338 §3 measured as the door's own opening box (equal to rvt-rs's box within 0.01 ft on 25 of 28 as built, and on all 25 these openings are the ones written).Depth= 3048 mm on exactly the 11 openings where the second wall runs along the door's wall, which rvt-rs leaves out (door_second_wall_parallel_to_door_wall, 9 of the 14 it leaves out of the 39).Depthis written on every wall-cut opening whose host holds that quantity (all 607 walls that rvt-rs writes hold aWidthhere, and with--no-base-quantitiesthe list is empty and nothing is written).WidthandHeightstay missing on the 25: Revit's export swaps them on a door's opening (RE-244, RE-235 §5) and nothing read says it does not on this one, even though#77141's are the rectangle's extents. SoWidth152 (missing 56) andHeight152 (missing 56) are unchanged, and the 14 door openings rvt-rs does not write are untouched.Changes
src/ifc/step_writer.rs: the wall-cut opening's quantity set is now written where its host holds the quantity, not only whereWidthandHeightare written too;WidthandHeightare still pushed only for the rectangular, cabinet and curtain-wall openings, so their output is byte for byte what it was, and a door's second-wall opening gains a set holdingDepthalone.src/ifc/entities.rs,src/ifc/wall_cut_openings.rs: the doc comments ofquantitiessay why that opening takes only itsDepth.docs/supported-profile.mdanddocs/release-1.0-criteria.md: the sentences listing what an opening a door cuts in a second wall carries gain theDepth, and say that itsWidthandHeightstay out.changelog.d/added/1165-door-second-wall-opening-depth.md: new fragment.What was not checked
Qto_OpeningElementBaseQuantities.Depthon the office as built going from 283 equal and 25 missing to 308 equal, none missing and none different, withrvt-rs quantities Revit does not writestill 0 (two of the 25's openings Revit's export lacks are written anyway and carry the set, which the census does not score).#77141) plus RE-338's box agreement on all 25 and RE-321/RE-244's convention thatDepthis the extrusion's depth. If the measurement finds any of the 25 different, the value rvt-rs holds for it is wrong and the change must be narrowed (a per-element rule nothing read gives today) or dropped.tests/orprobes/referencesWallCutOpeningorQto_OpeningElementBaseQuantities; if a real-file test pins an export's entity counts, this adds oneIFCELEMENTQUANTITYand oneIFCRELDEFINESBYPROPERTIESper door's second-wall opening.Pilot draft: written by an automated worker and pushed as proposed, with rustfmt applied. Not yet read by a maintainer session; please do not review, approve or arm it.