Repository navigation
feat(ifc): give a curtain mullion turned near 45 degrees about its own axis its Span and Length (#1016) - #1754
Closed
DrunkOnJava wants to merge 2 commits into
Closed
DrunkOnJava wants to merge 2 commits into
DrunkOnJava wants to merge 2 commits into
Conversation
…n axis its Span and Length (#1016)
Owner
Author
|
Superseded by #1776: the same change on a fresh branch on today's main, with the measured rows in its body. |
7 tasks done
7 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
…s gets its Span and Length (#1016) (#1782) ## Summary `Pset_MemberCommon.Span` (and the same length as `Qto_MemberBaseQuantities.Length`) is not written on 18 of the BIM4LCA concrete office's 10,003 curtain mullions as built. All 18 are mullions that the record's instance transform turns about their own axis, so `add_mullion_span` finds the mullion's own three axes in the record but `oriented_box` (RE-106) refuses the record box: the turn is so near 45 degrees that its two horizontal extents are nearly equal and the box's extents along the mullion's own axes are not determined. The existing code then returns, and so does the RE-418 mesh rule, which needs the axis `attach_mullion_plain_hosts` remembers and that memory is keyed on a known axis. Where such a mullion's own Z is one of the model's axes, nothing about the box is undetermined for the length's direction: the mullion's own X and Y are square to that model axis, so the record box's extent along it *is* the box's extent along the mullion's own Z, exactly. That extent is now written as the `Span`, and as the `Length`. The two sides across the mullion stay unknown, so no `NetVolume` or `NetSurfaceArea` is taken from the box (they were not written before either, and the mesh pass already gives `NetVolume`). Of the 18, 6 have their own Z on the model's Z axis and get the value; the other 12 are turned about a horizontal axis, their own Z crossing the model's axes, and keep no `Span` or `Length`. ## Evidence **The gap is real, and nothing decided to leave it out.** `docs/evidence.md` ("Mullion span") and `docs/supported-profile.md` state the rule and the counts (9,984 of 10,003 as built, 1 different, 18 missing); `psets_vs_ifc.txt` line 51 and `qtos_vs_ifc.txt` line 39/111 agree. No maintainer decision leaves these out, no closed negative finding covers them (RE-19, RE-20, RE-399 do not touch mullions), and RE-226 §5 / RE-418 §1 record the 18 as the case the rule does not reach. **Which 18, matched by Tag between `revit.ifc` and `rvt-rs.ifc`.** Found by their `Pset_MemberCommon` carrying only `Reference` and `IsExternal` (20 such sets; 2 of them are the `NetVolume`-missing pair): 3024562-3024564, 3024608-3024610, 3027069-3027071, 3028417-3028419, 3028722-3028724, 3028884-3028886. | Tag | Revit `Span` | Revit `Length` | rvt-rs record box height | body | |---|---|---|---|---| | 3024562, 3024563, 3024564, 3027069, 3027070, 3027071 | 700 mm | 700 mm | 0.7 m | saved mesh, a vertical prism 0.05 x 0.05 x 0.7 | | 3024608, 3028722 (and the two clusters of three beside them) | 100.84757937952148 / ...2281 / ...2712 mm | same | 0.05 m | saved mesh, a 0.05 m tall prism whose 50 x 100.85 mm plan section is skewed, so its length runs on a plan diagonal | Revit's own placement for 3024562 has Z `(0,0,-1)` and RefDirection 43.6 degrees off the axes; its neighbour 3024561, turned 41.7 degrees, *has* a `Span` because `cos(2*41.7)` clears RE-106's 0.1 determinant and its solve succeeds. So the boundary is RE-106's, not a new one. **The rule.** For a mullion whose own axes are read and whose box along them is refused, where exactly one component of its own Z exceeds `INSTANCE_TURN_MIN_RADIANS`, the `Span` is the record box's extent along that model axis. This is an identity, not a fit: the record box is the axis-aligned box of the box along the mullion's own axes (RE-106), and if own Z is a model axis the two other own axes contribute nothing to that extent. **Measured, on the two IFC4 files only.** On the 6: 0.7 m from the box on all 6, Revit's 700 mm on all 6 (checked element by element on 3024562-3024564 and 3027069-3027071). On the 12: their own Z is not a model axis (the plan-skewed prism of 3024608 and 3028722 shows it), so the rule writes nothing there. **What it leaves out:** the 12 mullions turned about a horizontal axis; and, as before and unmeasured here, a mullion of any model whose record box overruns its solid, which RE-418 fixes only where the axis is known. ## Changes - `src/ifc/export_content.rs`: `add_mullion_span` keeps the read axes in `own`, and where the box along them is not solved it takes the length from the new `length_on_a_model_axis(axes[2], size)`; the doc comment names the case and says the sides across the mullion stay unknown, so no volume or area is taken. - `docs/supported-profile.md`, `docs/evidence.md`: the `Span` sentence and the "Mullion span" row state the added case, and the counts are marked as those before it. - `changelog.d/fixed/1046-mullion-span-of-a-mullion-turned-about-its-own-axis.md`: new fragment. - No test pins `Pset_MemberCommon` or these quantities, so `tests/` is untouched. ## 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. | Model | `Pset_MemberCommon.Span` and `Qto_MemberBaseQuantities.Length` equal, before | after | different | |---|---:|---:|---:| | Office as built | 9,984 of 10,003 | 9,990 of 10,003 | 1 to 1 | | Office at permit | 10,012 of 10,031 | 10,018 of 10,031 | 1 to 1 | | Timber office as built | 7,857 of 7,876 | 7,863 of 7,876 | 1 to 1 | | Timber office at permit | 7,850 of 7,872 | 7,856 of 7,872 | 4 to 4 | - Both names gain the same 6 on each file. No other model moves for this change and no sample save changes. ## Still open - The 12 mullions per file whose own Z runs across the model's axes get no length. Stack: this is change 3 of 7; each branch holds the ones before it, so its own diff is its last commits until those land. First draft: #1754, then #1776. ## 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. ## 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
Pset_MemberCommon.Span(and the same length asQto_MemberBaseQuantities.Length) is not written on 18 of the BIM4LCA concrete office's 10,003 curtain mullions as built. All 18 are mullions that the record's instance transform turns about their own axis, soadd_mullion_spanfinds the mullion's own three axes in the record butoriented_box(RE-106) refuses the record box: the turn is so near 45 degrees that its two horizontal extents are nearly equal and the box's extents along the mullion's own axes are not determined. The existing code then returns, and so does the RE-418 mesh rule, which needs the axisattach_mullion_plain_hostsremembers and that memory is keyed on a known axis.Where such a mullion's own Z is one of the model's axes, nothing about the box is undetermined for the length's direction: the mullion's own X and Y are square to that model axis, so the record box's extent along it is the box's extent along the mullion's own Z, exactly. That extent is now written as the
Span, and as theLength. The two sides across the mullion stay unknown, so noNetVolumeorNetSurfaceAreais taken from the box (they were not written before either, and the mesh pass already givesNetVolume).Of the 18, 6 have their own Z on the model's Z axis and get the value; the other 12 are turned about a horizontal axis, their own Z crossing the model's axes, and keep no
SpanorLength.Evidence
The gap is real, and nothing decided to leave it out.
docs/evidence.md("Mullion span") anddocs/supported-profile.mdstate the rule and the counts (9,984 of 10,003 as built, 1 different, 18 missing);psets_vs_ifc.txtline 51 andqtos_vs_ifc.txtline 39/111 agree. No maintainer decision leaves these out, no closed negative finding covers them (RE-19, RE-20, RE-399 do not touch mullions), and RE-226 §5 / RE-418 §1 record the 18 as the case the rule does not reach.Which 18, matched by Tag between
revit.ifcandrvt-rs.ifc. Found by theirPset_MemberCommoncarrying onlyReferenceandIsExternal(20 such sets; 2 of them are theNetVolume-missing pair): 3024562-3024564, 3024608-3024610, 3027069-3027071, 3028417-3028419, 3028722-3028724, 3028884-3028886.SpanLengthRevit's own placement for 3024562 has Z
(0,0,-1)and RefDirection 43.6 degrees off the axes; its neighbour 3024561, turned 41.7 degrees, has aSpanbecausecos(2*41.7)clears RE-106's 0.1 determinant and its solve succeeds. So the boundary is RE-106's, not a new one.The rule. For a mullion whose own axes are read and whose box along them is refused, where exactly one component of its own Z exceeds
INSTANCE_TURN_MIN_RADIANS, theSpanis the record box's extent along that model axis. This is an identity, not a fit: the record box is the axis-aligned box of the box along the mullion's own axes (RE-106), and if own Z is a model axis the two other own axes contribute nothing to that extent.Measured, on the two IFC4 files only. On the 6: 0.7 m from the box on all 6, Revit's 700 mm on all 6 (checked element by element on 3024562-3024564 and 3027069-3027071). On the 12: their own Z is not a model axis (the plan-skewed prism of 3024608 and 3028722 shows it), so the rule writes nothing there.
What it leaves out: the 12 mullions turned about a horizontal axis; and, as before and unmeasured here, a mullion of any model whose record box overruns its solid, which RE-418 fixes only where the axis is known.
Changes
src/ifc/export_content.rs:add_mullion_spankeeps the read axes inown, and where the box along them is not solved it takes the length from the newlength_on_a_model_axis(axes[2], size); the doc comment names the case and says the sides across the mullion stay unknown, so no volume or area is taken.docs/supported-profile.md,docs/evidence.md: theSpansentence and the "Mullion span" row state the added case, and the counts are marked as those before it.changelog.d/fixed/1046-mullion-span-of-a-mullion-turned-about-its-own-axis.md: new fragment.Pset_MemberCommonor these quantities, sotests/is untouched.What was not checked
I could not compile or measure. CI must confirm that the file builds under edition 2024/MSRV 1.87 and passes
clippy -D warnings(the new helper is the only added item), and the measurement must confirm:Pset_MemberCommon.SpanandQto_MemberBaseQuantities.Lengthon the office as built go frommissing 18tomissing 12withequal 9,990anddifferent 1unchanged, and on the office at permit likewise if it holds the same 6 (the permit file is not among the evidence I was given, so its 18 are unexamined);If the measurement shows any element where the box's extent along the model axis differs from Revit's
Span, the rule must be narrowed to the mullions whose record box is their solid (the RE-418 guard) or dropped.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.