Repository navigation
feat(ifc)!: write type objects' FireRating and LoadBearing, and stair types' dimensions, in their common sets (#1185) (RE-286) - #1200
Conversation
…ype objects' common sets (#1185) (RE-286)
# Conflicts: # src/research/partition_schema_mvp.rs
…1186) (RE-287) (#1201) ## Summary Write a stair's `Pset_StairCommon.TreadLengthAtInnerSide` and, with `rvt-ifc --revit-set-placement`, the `Pset_StairFlightCommon` Revit's export gives each `IfcStair`: the sums of its flights' risers and treads and their common lengths. Related issues: #1186 (the stair and flight types' part is in #1200; the spiral stair's tread count, 3 values per office file, is not read). ## Motivation Revit's export of the BIM4LCA office writes on each of 14 stairs 8 values rvt-rs omitted (`Pset_StairCommon.TreadLengthAtInnerSide` and seven in `Pset_StairFlightCommon`), and one stair and its dimensions on each R2025 stair model. ## Changes - `stair_property_set` (`src/ifc/export_content.rs`): `TreadLengthAtInnerSide` on a stair, the tread depth, as a flight's. - `stair_flight_additions` (`src/ifc/revit_set_placement.rs`): for each `IfcStair` with flights, `NumberOfRiser` and `NumberOfTreads` summed over its flights, each length as its flights' common value; a property only where every flight holds it and, for a length, all agree. - RE-287 (report), W7 line, supported profile, README, support matrix, changelog fragment, reconnaissance addendum. ## Testing Unit tests are banned in this repository; none added. Verified end to end with Measure on the BIM4LCA office (CC BY-SA 4.0) and puzzbobb's R2025 models (Apache-2.0) against Revit's own IFC4 exports. - Measure run [41137371839](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41137371839), unfiltered against `main` (`-f base=main -f nordic=true -f r2025=true -f ifc_flags=--revit-set-placement`), commit a0ec6e5. - Seven exports change (the two office files and the five stair models 13 to 17); every other model is byte-identical, Core Interior and RE1 included. - Census (`psets_vs_ifc.py`, equal / different / missing): office as built 45,088 / 1 / 436 to 45,199 / 1 / 325, at permit 45,270 / 1 / 433 to 45,381 / 1 / 322 (+111 each, none different); R2025 stair models 107 / 0 / 54 to 115 / 0 / 46 (models 13, 14, 15), 105 / 0 / 48 to 113 / 0 / 40 (16), 103 / 0 / 50 to 110 / 0 / 43 (17). `parameter_value_count` moves by exactly the values written: +111, +111, +8, +8, +8, +8, +7. - Rows: `Pset_StairCommon.TreadLengthAtInnerSide` 0 to 14 of 14 equal; `Pset_StairFlightCommon.RiserHeight`, `TreadLength`, `TreadLengthAtOffset` and `TreadLengthAtInnerSide` 35 to 49 of 49; `NumberOfRiser` 35 to 49 of 52; `NumberOfTreads` 34 to 47 of 52; `NosingLength` 35 to 49 of 54. The remaining misses are the stair and flight types (#1200) and the spiral stair's tread count. ## The gap - The rule is measured, not explained: revit-ifc's calculators give a `Stairs` element its own values (the `Pset_StairCommon` ones), not the flights' sums that the container's flight set holds, and where the exporter fills that set from the runs is not read (RE-287 §3). It is exact on 14 stairs of one to three flights on each office file and on five R2025 stairs. - `TreadLengthAtInnerSide` is the tread depth because no stair type measured sets `STAIRSTYPE_MINIMUM_TREAD_WIDTH_INSIDE_BOUNDARY` (revit-ifc takes that where it is above zero). rvt-rs reads no stair type's value; a stair type that sets one would make the stair's value and the flights' differ from Revit's. - The assembled (spiral) stair's `NumberOfTreads` and its flight's (18) are not read. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] Changelog fragment `changelog.d/added/stair-flight-set.md` - [x] Limitations documented here, in RE-287 and in the code - [x] No emojis, no private paths ## Breaking changes None. ## Screenshots or output samples Office as built: `Pset_StairCommon.TreadLengthAtInnerSide: 14, equal 14, different 0, missing 0` (was equal 0, missing 14); `Pset_StairFlightCommon.RiserHeight: 49, equal 49, different 0, missing 0` (was equal 35, missing 14).
…ffice's export has none of (#1185) (RE-286)
|
Final unfiltered Measure on the merged head: run 41146008303, W7 property census (
|
…with no IsExternal, as measured (#1185) (RE-286)
|
The census comment above describes the earlier version, which wrote type objects' |
|
Automated review (Claude Code review agent, run by the maintainer). Verdict: ready to merge after these changes.
|
# Conflicts: # docs/supported-profile.md # research/witness/magnetar-2024-core-interior-slim/observations/rvt-rs.json # research/witness/magnetar-2024-core-interior/observations/rvt-rs.json
Summary
Give each type object the common property set Revit's IFC4 exports give it: the type's Fire Rating,
LoadBearingfor the structural column and framing categories, and a stair type's and flight type's dimensions. No type object getsIsExternal. The office's (24.0.5) and the R2025 models' (25.0.2) exporters write it, but Revit's newer ones, RE1 Architecture's (26.2) and the held-out models', write none. The maintainer decided on 2026-10-31 to leave it out. Related issues: #1185 (door types'FireRating,ThermalTransmittanceand the family types'Manufacturerstay open) and #1186 (the stair and flight types' part).Motivation
Revit's export of the BIM4LCA office writes 182 values on the type objects rvt-rs writes, and rvt-rs wrote none.
Changes
append_typed_production_elements(src/ifc/export_content.rs) collects, per type and type entity, the common set:FireRatingwhere IFC4's set defines it,LoadBearing, a stair type's zeros and a flight type's nosing. The writer (src/ifc/step_writer.rs) adds it to the type object'sHasPropertySets.IfcModelgains a new public field,type_entity_sets, hencefeat!for the semver gate.revit_set_placement: a stair type's dimensions also go intoPset_StairFlightCommon, only with--revit-set-placement.pset_property_value_countcounts a type object'sPset_values (step_writer::type_object_pset_values).IFCPROPERTYSETre-pinned from 6,508 to 6,510 in both fixtures with a dated note, and the witness observations refreshed. Both verdicts replay to PASS.probe_type_text_parameters, RE-289), the RE-286 and RE-289 reports, the W7 line, the supported profile, the README, the support matrix, a changelog fragment and a reconnaissance addendum.Testing
Unit tests are banned here; none added. Measured end to end against Revit's own exports: the BIM4LCA office (CC BY-SA 4.0), puzzbobb's 24 R2025 models (Apache-2.0), RE1 Architecture (MIT) and the three held-out models. Measure 41180394315 is unfiltered against
main(-f base=main -f nordic=true -f r2025=true -f holdout=true -f ifc_flags=--revit-set-placement, commit 7bbe15a). Its figures, as equal / different / missing / values Revit does not write:mainNothing that differed before differs, and no new value Revit does not write appears on any model.
What is left out
IsExternal(135 of the office's type values as built): Revit's newer exporters write none.FireRating(6, a family type parameter RE-77 does not read), one door type'sThermalTransmittance, the family types'Manufacturer(6, RE-289).Audit-honesty checklist
changelog.d/added/type-object-common-sets.mdBreaking changes
IfcModelgains the public fieldtype_entity_sets, so struct literals must add it (type_entity_sets: Default::default()).TypedProductionAppendgains one too.