Skip to content

research(ifc): count apart the storey count Revit's exporter before IFC 26.1 writes (#1097) (RE-263) - #1098

Merged
DrunkOnJava merged 4 commits into
mainfrom
research/re263-number-of-storeys
Oct 29, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
research/re263-number-of-storeys

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Closes #1097. Revit's exporter writes Pset_BuildingCommon.NumberOfStoreys by two rules: up to IFC 26.0 the number of storeys that contain an element, from IFC 26.1 the number of storeys (revit-ifc NumberOfStoreysCalculator, 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 its FILE_NAME originating system, its storeys and the storeys some element is contained in; counts NumberOfStoreys apart, 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).
  • RE-253: its artefacts line said both held-out ribeiro exports were Revit 25.4's; 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.

  • Verified on real files: Measure run 40948455973 (main ed337dd with this branch's census, r2025 and nordic): the RE-263 line counts the property apart on 21 R2025 models (the 20 that differ, and 00_Blank, which main does not yet give its storey, fix(elements): write the storey of a project with one Level #1086) and nowhere else. RE1's four and the office's two stay equal; 01_Walls stays scored.
  • python3 tools/ci/api-doc-ids.py and python3 tools/release/changelog.py check pass.

No export changes.

Legal and contribution hygiene

  • revit-ifc (CLEANROOM.md source 5) read and cited by file, class and commit; nothing copied. Held-out models: counts only.

…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
DrunkOnJava enabled auto-merge (squash) October 29, 2026 21:08
@DrunkOnJava
DrunkOnJava merged commit 6a6c723 into main Oct 29, 2026
27 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/re263-number-of-storeys branch October 29, 2026 21:31
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.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NumberOfStoreys: Revit's exporter before IFC 26.1 counts only storeys that hold an element

1 participant