Skip to content

fix(ifc): write NumberOfStoreys only where every storey contains an element (#1097) (RE-263) - #1119

Merged
DrunkOnJava merged 7 commits into
mainfrom
fix/storey-count-unambiguous
Oct 30, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
fix/storey-count-unambiguous

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

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: research(ifc): count apart the storey count Revit's exporter before IFC 26.1 writes (#1097) (RE-263) #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 fix(ifc): write Reference only in the sets a Revit export confirms (#1016) (RE-239) #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, 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

  • RE-263 and the changelog state the rule and what it loses
  • No private paths, emojis or jargon

Legal and contribution hygiene

  • Apache-2.0; revit-ifc read and cited only (RE-263 §2)

Breaking changes

None.

Related issues

Refs #1097, #1016.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 01:52
@DrunkOnJava
DrunkOnJava force-pushed the fix/storey-count-unambiguous branch from b6741da to cbf3b64 Compare October 30, 2026 01:53
@DrunkOnJava
DrunkOnJava merged commit 54c730d into main Oct 30, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/storey-count-unambiguous branch October 30, 2026 02:03
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…tput (0.6.1 to 0.10.0)

Taken from this PR's first CI run (synthetic-fixtures artifact, run 41028235014), where both contract checks failed on every platform and nothing else did. What moved since the fixtures were written: the owner-history timestamp is now the fixed one; Pset_BuildingCommon.NumberOfStoreys is gone from the project fixture, as only one of its three storeys contains elements (#1119); and entity numbering and content follow the writer's changes since 0.6.1 and 0.2.0. docs/viewer-demos.json's size hints follow the files.
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.

1 participant