Repository navigation
feat(ifc): a railing that belongs to a stair is aggregated under it, as Revit's export aggregates it (#1624) - #1626
Merged
Merged
Conversation
DrunkOnJava
force-pushed
the
feat/stair-railings-aggregate
branch
from
November 9, 2026 19:02
aaf5ffe to
4ced317
Compare
…as Revit's export aggregates it (#1624) Revit's own IFC4 exports put each railing hosted on a stair among the parts of its IfcStair beside its runs and stringers: 76 of Snowdon Towers' 142 railings, and all 10 of the R2025 stair models 13 to 17. rvt-rs wrote them standalone, so the stair, which has no body of its own and is the sum of its parts, was short by its railings: on R2025 model 13 Revit's stair is 8.7821 ft3 and 0 to 8.0880 ft (flight 4.4903, two stringers 1.7854 each, two railings 0.3605 each) and rvt-rs's was 8.0611 and 0 to 5.3458. The saved-mesh default made it show: the stringers were boxes 13.1234 ft tall before and hid the missing railings. native_stairs::railing_records returns the stair each railing names (BaseRailing.m_stairsId, which RE-254 reads a stair railing's length from) with the lengths, from the one pass over the railings' records that read the lengths alone. attach_railing_lengths gives a railing that stair as its whole on Revit 2024 to 2027 where a run, landing or stringer already makes it one: a stair carried by its parts has no body of its own, and a railing alone must not take the body of a stair none of its parts names. aggregates_vs_ifc.py counts stair flights and railings beside the curtain wall's parts, which is why it never listed this.
…s export does not (#1624) The first Measure of #1624 counted one stair railing in each office file that only rvt-rs aggregates, 25 equal to Revit's whole beside it. The scorer listed the parts only Revit aggregates and those under another whole, with -v, and never the parts only rvt-rs aggregates, which are the ones a rule that is right on most parts and wrong on some shows. It now names them, and the parts under another whole, in every run; the parts only Revit aggregates, which can be many, stay behind -v.
… Revit's export leaves it out of its stair (#1624) (RE-390)
DrunkOnJava
force-pushed
the
feat/stair-railings-aggregate
branch
from
November 9, 2026 19:46
4ced317 to
ade6d7d
Compare
DrunkOnJava
marked this pull request as ready for review
November 10, 2026 16:42
…ce, record boxes where the saved mesh is not whole, and say a viewer draws the same boxes as before (#1624)
3 tasks done
This was referenced Nov 10, 2026
Open
DrunkOnJava
added a commit
that referenced
this pull request
Nov 10, 2026
…he census (#1634) ## Summary Measure's summary gains a section, "What the scorers show got worse (advisory)", written by the new `tools/re/cmp_measure.py` from the base and head directories the compare job already holds. It ends with two counts, "census regressions" and "body scorer regressions", and lists each model behind them. ## Motivation The property and quantity census says "equal fell, different or missing rose", and nothing else. On the stair-railing change (Measure 42688171578) it read "census regressions: 0" while the stair assembly's volume on the office's 13 stairs holding railings had moved from within 1 percent of Revit's to 2 to 127 times it; that was found by reading the scorer diffs by hand. The same comparator, on the wall-quantities change (Measure 42690731323), reports "body scorer regressions: 0". ## Changes - `tools/re/cmp_measure.py`: the models whose export moved (`ifc.sha256`), the scorer files that differ, the census regressions, and the body scorers' worsening: an element's volume that moved away from Revit's by more than 5 percent of Revit's, an "N of M" coverage count that fell (the nth line of a label against the nth, since a label opens several groups), and rows on a different storey that rose. - `.github/workflows/measure.yml`: the compare job's sparse checkout takes the script; the summary runs it before the raw scorer diff, capped at 60 KB, advisory (a failure prints a line, the job goes on). ## Testing No unit tests (banned). The script ran on two real Measure runs' artifacts: 42688171578 (stair railings: 7 body regressions, the office's and the five R2025 stair models' stair volumes, nothing else) and 42690731323 (wall quantities: 0). A dispatched Measure on this branch shows the section in the run summary (linked below once read). - [x] Verified on real Measure artifacts, command: `python3 -I tools/re/cmp_measure.py measure-base measure-head` in a directory holding `gh run download <run> -n measure-base -n measure-head`. - [x] `actionlint` and a YAML load of `measure.yml` pass; file modes match the other scorers. ## Audit-honesty checklist - [x] No user-visible change: no changelog fragment. - Limits: it reads the text the scorers print, so a scorer that prints no per-element volume or no "N of M" line is not covered, and a worsening that moves a count the scorer does not print is invisible. The 5 percent threshold is a first choice, not measured against a corpus of past changes. ## Breaking changes None. ## Related issues None. Follows the stair-railing aggregate (#1626), where the gap showed.
This was referenced Nov 10, 2026
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 railing whose record names a stair (
BaseRailing.m_stairsId) and no component of it (m_stairsComponentId) is aggregated under that stair on Revit 2024 to 2027, as Revit's export aggregates it (IfcRelAggregates, beside the stair's runs, landings and stringers). A railing that names a stair component stays a plain element of its storey, as Revit leaves it (RE-390). The aggregates scorer now also names a part rvt-rs aggregates where Revit does not.Motivation
A stair has no body of its own and is the sum of its parts, so with its railings standalone it was short by them: 2.74 ft of height and 0.72 ft3 of volume on R2025 model 13 (#1624). Revit's export aggregates the railing under its stair on every stair railing measured but one; that one, Tag 2598405 of the BIM4LCA office, is told apart by a field of its own record (RE-390).
Changes
src/research/partition_schema_mvp/stairs.rs:attach_railing_lengthshands a railing's stair to the aggregate unless the railing is on a component of it.src/research/native_stairs.rs:RailingRecords::on_components(the railings whose record namesm_stairsComponentId).tools/re/aggregates_vs_ifc.py: "aggregated by rvt-rs only" is counted, so a railing Revit leaves out cannot pass as agreement.probes/examples/probe_re390_railing_stairs.rs: prints every field of each railing'sBaseRailingand its stair'sStairsElement.reports/element-framing/RE-390-stair-railings-aggregated.md,changelog.d/changed/1624-stair-railings-aggregated.md.Testing
No unit tests (banned); end to end on Revit's own exports.
a43f517dagainstmain(118 models). Probe run 42686643077 on the office. The command lines are in the report's section 6.mainnone), 0 aggregated by rvt-rs only; R2025 models 13 to 17: 2 of 2 each. Snowdon Towers (local only): 65 of 65 that rvt-rs writes are Revit's.IfcRampstay).tools/check-local.shand the witness replay: run by CI's full jobs on this head.Audit-honesty checklist
changelog.d/changed/.probes/examples/and report RE-390.What this makes worse: the stair assembly's volume
The railings now inside the stair's sum are record boxes (RE-303), not Revit's thin bodies, so the stair's volume as the sum of its parts, read by
stair_bodies_vs_ifc.py, is larger than Revit's where before it was short by the railings: office stair 2598347 100.9 ft3 onmain, 707.6 with this change, Revit 101.6; the office's other 10 stairs that hold railings about 110 to 117 onmain, 3613 to 4094 here, Revit about the same asmain; R2025 model 13 8.06 to 25.9 ft3 against Revit's 8.78. The stair's extent now matches Revit's (model 13's every Revit vertex within 0.001 ft of rvt-rs's surface, where none was). Nothing exported reads the sum (no census moves), and a railing's body and quantities are the same standalone or aggregated; the boxes were always written, now inside the stair that owns them. The volume is exact only when the railings' bodies are (RE-303). Per-stair figures are in the report's section 4.Not shown: railings on a ramp (Revit aggregates 4 of Snowdon's under their
IfcRamp; rvt-rs does not), the component rule on a second model (it rests on one railing, which is one in each of two saves of one project), 11 of Snowdon's 76 stair railings that rvt-rs does not export at all.Breaking changes
None.
Related issues
Refs #1624 (the stair's extent is fixed; its volume is not, see above).