Skip to content

feat(ifc)!: write Pset_BuildingStoreyCommon.Reference on a storey from its Level's type (W7) (RE-275) - #1171

Merged
DrunkOnJava merged 14 commits into
mainfrom
w7/storey-properties
Oct 30, 2026
Merged

DrunkOnJava merged 14 commits into
mainfrom
w7/storey-properties

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

rvt-rs writes Pset_BuildingStoreyCommon.Reference on each storey, the name of its Level's type. 10 of 10 storeys of the BIM4LCA office are Revit's value as built and at building permit, and 90 of 90 on puzzbobb's R2025 models; the building's own Reference is left out (below).

Motivation

W7: Revit's IFC4 export writes Pset_BuildingStoreyCommon.Reference on each storey and on the building (11 values on the office: Korkomerkintä on the 10 storeys, Project Information on the building), and rvt-rs wrote none (Measure run 41104131261).

revit-ifc's ReferenceCalculator (CLEANROOM.md source 5; read and cited, no code copied) gives an element's type's name, or the element's own name where it has no type. A Level's native record names its type in m_attrId, and the LevelAttributes record that id names holds the name in SymbolInfo.m_name: Korkomerkintä on all 10 office Levels, as built and at permit, and Level 1 on each of the R2025 models' (RE-275). It is the read RE-240 already makes for a pipe's, wall sweep's and ramp's type, with Level added to its kinds.

Where the list of sets whose Reference is written lives (CONFIRMED_REFERENCE_SETS, the maintainer's rule of 2026-10-29): a storey's set is written by the spatial-structure writer, not through that list, so the list is untouched and no other set changes. The value is written only where a measured Revit export writes it equal: the office's and the R2025 models' IFC4 exports.

Changes

  • src/research/native_element_types.rs: Level joins the kinds (m_attrId to LevelAttributes).
  • src/ifc/storey_properties.rs (new): reads each storey's Level type's name.
  • src/ifc/entities.rs, src/ifc/mod.rs, src/ifc/step_writer.rs: IfcModel::storey_properties (by storey index), PropertySet::storey_sets_for, and the writer's use of it; pset_property_value_count counts the new values, so diagnostics.decoded.parameter_value_count keeps equalling the file's Pset_ values.
  • research/witness/magnetar-2024-core-interior*/observations/rvt-rs.json: the Core Interior witness refresh (below).
  • reports/element-framing/RE-275-storey-level-type-and-entrance-level.md, changelog.d/added/storey-reference.md, docs/release-1.0-criteria.md (W7 lists storeys' Reference).

Testing

Measure run 41115264803, unfiltered (-f base=main -f nordic=true -f r2025=true, every scorer), head eaed92a against main 6c4bf6a; the branch has since only merged main and added the witness refresh.

psets_vs_ifc, Pset_BuildingStoreyCommon.Reference before after
office as built 11 values, equal 0, missing 11 equal 10, missing 1 (the building)
office at permit 11 values, equal 0, missing 11 equal 10, missing 1 (the building)
24 R2025 models (114 values) equal 0, missing 114 equal 90 (every storey), missing 24 (the buildings)
RE1 (4 IFC2X3 models) 2 each, counted apart: IFC2X3's Pset_BuildingStoreyCommon has no Reference, so that export cannot write it
Core Interior 15, counted apart: Revit's export of it has no property sets (RE-239 section 5)

None different, and "values Revit does not write" unchanged on every model (10 as built, 14 at permit). diagnostics.decoded.parameter_value_count goes up by the values written (office 44,344 to 44,354 as built, 44,530 to 44,540 at permit; Core Interior 4,109 to 4,124). The office's all-property census: equal 44,067 to 44,077 as built and 44,249 to 44,259 at permit.

Core Interior's witness: its rvt-rs observation moves IFCPROPERTYSINGLEVALUE 29,081 to 29,096 (the 15 storeys) and nothing else. Both observations are Measure's witness-*.json on the head (run 41118646915, filtered to core-interior and witness), which is CI's output byte for byte; tools/ci/witness-verdict.py replays PASS on both with the verdict files unchanged. The IFC set counts the fixtures pin (IFCPROPERTYSET 6,508) do not move: the value goes in the set the storey already has.

  • Verified end to end on real Revit files: the BIM4LCA office (CC BY-SA 4.0), puzzbobb's R2025 models (Apache-2.0), RE1 and Core Interior (MIT) against Revit's own exports, by Measure run 41115264803
  • Revit's IFC4 export is the oracle; nothing is written that it omits on a model whose export measured it, none differs

Left out

The building's Reference (Project Information, on the office and on every R2025 model, in Pset_BuildingCommon, Pset_BuildingStoreyCommon, Pset_BuildingSystemCommon and Pset_BuildingElementProxyCommon) is the name of the project information element in the language of the Revit that exported the file. The .rvt does not store that string (searched as UTF-16 and UTF-8 in every stream of both office files: no UTF-16 hit in either, and the only UTF-8 hits are two RTF help-text lines in the as-built file), so a French or German export would write another and a constant would be wrong. Revit's name-prefix placement of the storey and building sets on the building is --revit-set-placement's (RE-235) in any case.

Breaking changes

IfcModel gains a public field, storey_properties; code that builds an IfcModel with a struct literal adds storey_properties: Default::default(). PropertySet::storey_sets keeps its signature. The title carries ! for the semver check.

Related issues

Refs W7 (docs/release-1.0-criteria.md), RE-240.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Owner review: StoreyProperties reads each Level's type name (m_attrId → LevelAttributes → SymbolInfo.m_name) as Pset_BuildingStoreyCommon.Reference, Revit's on 10 of 10 office storeys and 90 of 90 on the R2025 models (Measure 41115264803); Core Interior's and RE1's are counted apart, their exports having no such set value. The map is keyed by storey index and cleared where apply_element_record_storeys replaces the storey list (0434e37), so a recovered storey never takes a Level's name; byte identity of that fix on 8 models, Measure 41119940606. The ! is the new public IfcModel::storey_properties field (StoreyProperties is #[non_exhaustive]), as body_pieces and opening_cuts were added. Core Interior's witness observations refreshed (IFCPROPERTYSINGLEVALUE +15; verdict replay PASS). Armed.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 20:07
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…mns' Slope, the building's Reference, door openings' values (W7) (RE-277) (#1176)

## Summary

Adds the probe behind the W7 office findings (RE-275, RE-276) and
RE-277, which records three office properties that the `.rvt` does not
decide, so none is written: columns' `Slope`, the building's
`Reference`, and the door openings' `Reference` and `FireExit`. No
export changes.

## Motivation

W7 listed these gaps on the BIM4LCA office (Measure run 41104131261).
The positive ones got their own PRs (pipes' `InvertElevation` #1169,
beams' `Span` #1163, `Slope` #1173 and `Roll` #1174, storeys'
`Reference` #1171 and `EntranceLevel` #1172). The rest were looked for
in the same pass and have no source in the file, which binds future
work, so the evidence is written down:

- **Columns' `Slope`** (73 of 279 columns as built, 101 of 345 at
permit, 0.0 on all): revit-ifc's `SlopeCalculator` reaches a vertical
column only through its last step, the largest top-facing face of the
last object of the element's geometry, so the property exists where
Revit's API returns a solid there. The probe lists each column's native
record. Six columns have a record identical in both files and Revit
gives them the property at permit only; twelve identical columns on one
level split 5 to 7 by whether a join is user-set; no cell of the
attachment-by-join table has the property on every column.
- **The building's `Reference`** (`Project Information`): not stored in
the file as UTF-16 or UTF-8 text but for two RTF help-text lines, so
writing it would guess the exporting session's name for the element.
- **Door openings' `Reference` and `FireExit`** (140 and 31 as built):
on the openings Revit writes where a door cuts a further wall, which
rvt-rs does not write; the door's own filled opening has no set in
Revit's export, as in rvt-rs's (the scorer now says so, #1161).

## Changes

- `probes/examples/probe_w7_office_gaps.rs`: for a model's parameter
definitions, every Level (its native record, saved parameters and the
record of its type), and every structural column, structural framing
element and pipe (decoded fields, saved parameters and native objects'
scalar fields), one JSON line each.
-
`reports/element-framing/RE-277-office-properties-the-file-does-not-decide.md`,
`changelog.d/research/office-properties-not-in-the-file.md`.

## Testing

Unit tests are not added. The probe ran on GitHub's runners on both
office files and the 24 R2025 models: Measure runs 41111710319 (office
as built, an earlier version of the probe), 41113408569 (office and
R2025, this probe). The report's counts are from those outputs joined
with Revit's exports by `Tag`; the commands that reproduce them are in
the report.

- [x] Verified end to end on real Revit files: the BIM4LCA office (CC
BY-SA 4.0) and puzzbobb's R2025 models (Apache-2.0), against Revit's own
exports, by the Measure runs above
- [x] Reverse-engineering finding: a reproducible probe is included, and
the report states its status (negative)

## Breaking changes

None.

## Related issues

Refs W7 (`docs/release-1.0-criteria.md`), #1161, #1169, #1163, #1171,
#1172, #1173, #1174.
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…per line, so pull requests changing different values stop conflicting (#1177)

## Summary

Every W6 or W7 change edits one table cell, a single line of 1,800 and
5,400 characters, so any two open pull requests that add a value
conflict, and each landing put the others in conflict again (#1152,
#1163, #1170 today). This moves the two "value now" cells into sections
below the table, `### W6 measured now` and `### W7 measured now`, with
one sentence or list item per line. Markdown joins the lines of a
paragraph with spaces, so the page reads the same: joined back, each
section is byte-identical to the cell it replaces (checked by script
against `main`). The table's cell now links to its section; the
requirement, bar and status stay in the table.

## Changes

- `docs/release-1.0-criteria.md`: the two cells moved, an HTML comment
in each section saying why the lines break where they do, and one
sentence in "Keeping this page".

## Testing

Docs only. Checked by script that the text of each section, its lines
joined by spaces, equals the cell on `main` (b17d628) exactly, that no
line begins with Markdown list, heading, quote or table syntax, and that
every other line of the page is unchanged. `tools/maintainer/audit.py`
reads the page only for the issue numbers it cites, which are all still
there.

## Audit-honesty checklist

- [x] No status, bar or measured value changes
- [x] Changelog fragment: not needed (layout of a docs page)
- [x] No emojis, no private paths or personal addresses in committed
files

## Related issues

None; open W6 and W7 pull requests (#1166, #1171 to #1175) move their
additions into the new sections when they next merge `main`.
# Conflicts:
#	research/witness/magnetar-2024-core-interior-slim/observations/rvt-rs.json
#	research/witness/magnetar-2024-core-interior/observations/rvt-rs.json
…oreys' Reference values (W7) (RE-275)

IFCPROPERTYSINGLEVALUE 29081 to 29096 (+15) on both edges, nothing else moved. Measure run 41127120923 on cc56be1, replayed with witness-verdict.py: PASS, three witnesses, replay match, verdict files unchanged.
@DrunkOnJava
DrunkOnJava disabled auto-merge October 30, 2026 21:16
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 21:16
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

CI's Corpus health failed on spatial_property_sets::re1_spatial_property_sets_are_revits: RE1's reference exports are IFC2X3, whose Pset_BuildingStoreyCommon has no Reference, and the test compared storey sets property for property. The value is right for IFC4 (Revit's IFC4 exports write it: office 10 of 10, R2025 90 of 90), so the test now leaves IFC4-only properties out of the comparison with IFC2X3 exports (IFC4_ONLY), as psets_vs_ifc.py counts them apart. Merged main (#1175) in the same push. Re-armed.

@DrunkOnJava
DrunkOnJava merged commit 90f3fcd into main Oct 30, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the w7/storey-properties branch October 30, 2026 21:27
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…from its Level's parameter (W7) (RE-275) (#1172)

## Summary

rvt-rs writes `Pset_BuildingStoreyCommon.EntranceLevel` on a storey from
the yes/no parameter its Level holds. 9 of 9 values on the BIM4LCA
office are Revit's, as built and at building permit; no other model
changes. Stacked on #1171 (storeys' `Reference`): its commits come first
in this branch.

## Motivation

W7: Revit's IFC4 export writes `Pset_BuildingStoreyCommon.EntranceLevel`
on 9 of the office's 10 storeys (true on Level_01, false on 8; none on
Sea Level), and rvt-rs wrote none (Measure run 41104131261).

revit-ifc's definition of `Pset_BuildingStoreyCommon` gives
`EntranceLevel` no calculator (CLEANROOM.md source 5; read and cited, no
code copied), so Revit's exporter takes it from a parameter named
`Pset_BuildingStoreyCommon.EntranceLevel`, then `EntranceLevel`, on the
Level. The office declares the first as a shared parameter (id 3364458)
and each Level's native record holds its value: Level_01 yes,
Foundation, Basement, Level_02a_Parking, Level_02, Level_03, Level_04,
Level_05 and Roof no, Sea Level none (RE-275 section 3). rvt-rs writes
the value the Level holds and nothing for a Level that holds none, so a
file whose Levels declare no such parameter, as the R2025 models', gets
none, as their Revit exports have none.

## Changes

- `src/ifc/storey_properties.rs`: also reads each Level's saved
parameters (`native_element_parameters::read`) for those two names, the
Level's own value (`Instance`) only.
- `src/ifc/entities.rs`: `StoreyProperties::entrance_level`, and
`PropertySet::storey_sets_for` writes it after `Reference`
(`StoreyProperties` is `#[non_exhaustive]`, so the field is not a
break).
- `docs/release-1.0-criteria.md` (W7 lists storeys' `EntranceLevel`),
`changelog.d/added/storey-entrance-level.md`; RE-275 describes the
finding for both properties.

## Testing

Measure run 41115402144, unfiltered (`-f base=main -f nordic=true -f
r2025=true`, every scorer), head d80e7c0 against main 6c4bf6a. Against
the run of #1171's head, the only models that differ are the office's
two files:

| `psets_vs_ifc`, `Pset_BuildingStoreyCommon.EntranceLevel` | before |
after |
|---|---|---|
| office as built | 9 values, equal 0, missing 9 | equal 9, missing 0 |
| office at permit | 9 values, equal 0, missing 9 | equal 9, missing 0 |

None different, none written that Revit's export omits ("values Revit
does not write" unchanged: 10 as built, 14 at permit).
`diagnostics.decoded.parameter_value_count` goes up by 9 on each file
over #1171's (44,354 to 44,363 as built, 44,540 to 44,549 at permit).
RE1, Core Interior and the 24 R2025 models are byte-identical to #1171's
outputs, so Core Interior's witness needs nothing beyond #1171's
refresh.

- [x] Verified end to end on real Revit files: the BIM4LCA office (CC
BY-SA 4.0) as built and at building permit, and the R2025 models, RE1
and Core Interior, against Revit's own exports, by Measure run
41115402144
- [x] Revit's IFC4 export is the oracle; nothing is written that it
omits, none differs

## Limits

The value is read from a Level parameter by name. Revit's exporter also
reads one by its localized name in a file saved in another language
(revit-ifc's `PropertySetEntryMap` tries the localized name first): a
file whose Level holds a parameter only under a translated name would
get none here, which fails closed. No measured model has one.

## Breaking changes

None.

## Related issues

Refs W7 (`docs/release-1.0-criteria.md`), #1171.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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