Repository navigation
research(ifc): count apart the storey count Revit's exporter before IFC 26.1 writes (#1097) (RE-263) - #1098
Merged
Conversation
…FC 26.1 writes (#1097) (RE-263) Revit's exporter wrote Pset_BuildingCommon.NumberOfStoreys as the number of storeys that contain an element until IFC 26.1, and as the number of storeys since. rvt-rs writes the second, IFC4's definition. The property census now reads each reference export's exporter version from its FILE_NAME header and counts the value apart where the exporter is older than 26.1 and the value is the first count and not the second.
…correct which exporter wrote modelo_bim (#1097) (RE-263)
DrunkOnJava
enabled auto-merge (squash)
October 29, 2026 21:08
Merged
3 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 30, 2026
…lement (#1097) (RE-263) (#1119) ## Summary `Pset_BuildingCommon.NumberOfStoreys` is now written only where every storey rvt-rs exports contains an element, where Revit's exporters before IFC 26.1 (storeys that contain an element) and since (every storey) give the same number. Elsewhere it is left out, and the census's count-apart for it (#1098) is removed. The maintainer's decision, 2026-10-29: strict, as for every other value. ## Motivation #1097, RE-263. A `.rvt` does not say which exporter will export it, so where the two rules disagree any number rvt-rs writes is wrong for one of them. #1098 had kept IFC4's count and relabelled the disagreement in the scorer instead of narrowing the value. ## Changes - `src/ifc/step_writer.rs`: the writer's containment rules (elements in spaces, aggregate parts, folded body pieces) become functions it calls, and `every_storey_holds_an_element` uses the same rules; the building set drops `NumberOfStoreys` where it is false. - `src/ifc/mod.rs`: the diagnostics' `Pset_` value count follows (`tests/parameter_diagnostics.rs`). - `tools/re/psets_vs_ifc.py`: #1098's count-apart removed. - `tests/spatial_property_sets.rs`: RE1's building set is expected without `NumberOfStoreys` where a storey of Revit's export holds no element. - `research/witness/...core-interior*/observations/rvt-rs.json`: `IFCPROPERTYSINGLEVALUE` 29,082 to 29,081 (after #1120), copied from this PR's CI artifact; both verdicts replay PASS, verdict files unchanged. - RE-263 §5 and §6, `changelog.d/changed/number-of-storeys-unambiguous.md`, `changelog.d/research/number-of-storeys.md`. ## Testing Measure [40985981272](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40985981272), against main at b31c3f4, every model and scorer: | `NumberOfStoreys` over 30 models | before | after | |---|---:|---:| | equal | 7 | 1 | | different | 23 | 0 | | missing | 0 | 29 | Kept on R2025 `01_Walls` only. The BIM4LCA office loses its two equal values: Revit's export contains an element in all 10 storeys, rvt-rs's in fewer, so rvt-rs cannot rule out the older exporter's count. Every other census value and every other scorer output (1,198 files) is unchanged. Unit tests: none (banned). ## Audit-honesty checklist - [x] RE-263 and the changelog state the rule and what it loses - [x] No private paths, emojis or jargon ## Legal and contribution hygiene - [x] Apache-2.0; revit-ifc read and cited only (RE-263 §2) ## Breaking changes None. ## Related issues Refs #1097, #1016.
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
Closes #1097. Revit's exporter writes
Pset_BuildingCommon.NumberOfStoreysby two rules: up to IFC 26.0 the number of storeys that contain an element, from IFC 26.1 the number of storeys (revit-ifcNumberOfStoreysCalculator, changed in the "IFC 26.1 for Revit 2026" commit ef15008e2e). rvt-rs writes the number of storeys, IFC4's definition. The W7 census now counts the older value apart instead of as different.Changes
tools/re/psets_vs_ifc.py: reads the reference export's exporter version from itsFILE_NAMEoriginating system, its storeys and the storeys some element is contained in; countsNumberOfStoreysapart, on its own line, where the exporter is older than 26.1, not every storey contains an element, and Revit's value is the number that do. An export naming no exporter is scored as before.reports/element-framing/RE-263-number-of-storeys.md: the measured table (24 of 24 named pre-26.1 exports, plus BIMcollab, follow the older rule; 5 of 5 from 26.1 the newer).modelo_bim's header names Revit 26.2 (IFC 26.1.0.23).changelog.d/research/number-of-storeys.md.Testing
Unit tests are banned in this repository: do not add them.
python3 tools/ci/api-doc-ids.pyandpython3 tools/release/changelog.py checkpass.No export changes.
Legal and contribution hygiene