Skip to content

feat(ifc)!: write type objects' FireRating and LoadBearing, and stair types' dimensions, in their common sets (#1185) (RE-286) - #1200

Merged
DrunkOnJava merged 23 commits into
mainfrom
w7/type-common-sets
Oct 31, 2026
Merged

DrunkOnJava merged 23 commits into
mainfrom
w7/type-common-sets

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Give each type object the common property set Revit's IFC4 exports give it: the type's Fire Rating, LoadBearing for the structural column and framing categories, and a stair type's and flight type's dimensions. No type object gets IsExternal. 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, ThermalTransmittance and the family types' Manufacturer stay 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: FireRating where 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's HasPropertySets. IfcModel gains a new public field, type_entity_sets, hence feat! for the semver gate.
  • revit_set_placement: a stair type's dimensions also go into Pset_StairFlightCommon, only with --revit-set-placement.
  • pset_property_value_count counts a type object's Pset_ values (step_writer::type_object_pset_values).
  • Core Interior: IFCPROPERTYSET re-pinned from 6,508 to 6,510 in both fixtures with a dated note, and the witness observations refreshed. Both verdicts replay to PASS.
  • A probe (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:

main this change
office as built 45,200 / 1 / 324 / 10 45,234 / 1 / 290 / 10
office at permit 45,382 / 1 / 321 / 14 45,411 / 1 / 292 / 14
24 R2025 models 1,386 / 0 / 544 / 0 1,420 / 0 / 510 / 0
RE1 Architecture 208 / 0 / 52 / 10 209 / 0 / 51 / 10
3 held-out models 512 / 3 / 367 / 13 514 / 3 / 365 / 13

Nothing that differed before differs, and no new value Revit does not write appears on any model.

What is left out

  • Every type object's IsExternal (135 of the office's type values as built): Revit's newer exporters write none.
  • Door types' FireRating (6, a family type parameter RE-77 does not read), one door type's ThermalTransmittance, the family types' Manufacturer (6, RE-289).
  • Railing, ramp and curtain member types.
  • The stair types' zeros are measured on the 24.0.5 and 25.0.2 exports only; no held-out model has a stair type.

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • Changelog fragment changelog.d/added/type-object-common-sets.md
  • Limitations documented here, in RE-286 and in the W7 line
  • No emojis, no private paths

Breaking changes

IfcModel gains the public field type_entity_sets, so struct literals must add it (type_entity_sets: Default::default()). TypedProductionAppend gains one too.

…e entity, holding its Fire Rating (W7) (#1185) (RE-286)
…on, a roof's, else not external (W7) (#1185) (RE-286)
…stair type's and flight type's dimensions (W7) (#1185) (#1186) (RE-286) (RE-287)
…and write a stair type's flight set only with --revit-set-placement (#1185) (#1186) (RE-286) (RE-287)
@DrunkOnJava DrunkOnJava changed the title feat(ifc): write type objects' IsExternal, FireRating and LoadBearing, and stair types' dimensions (W7) (#1185) (#1186) (RE-286) (RE-287) feat(ifc)!: write type objects' IsExternal, FireRating and LoadBearing, and stair types' dimensions (W7) (#1185) (#1186) (RE-286) Oct 30, 2026
# Conflicts:
#	src/research/partition_schema_mvp.rs
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…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).
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review October 30, 2026 23:07
# Conflicts:
#	docs/rvt-moat-break-reconnaissance.md
# Conflicts:
#	research/witness/magnetar-2024-core-interior-slim/observations/rvt-rs.json
#	research/witness/magnetar-2024-core-interior/observations/rvt-rs.json
@DrunkOnJava

DrunkOnJava commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner Author

Final unfiltered Measure on the merged head: run 41146008303, d4bb5229 (-f base=main -f nordic=true -f r2025=true -f ifc_flags=--revit-set-placement). 30fb31c8, the head now, differs from it only in the two Core Interior witness observation files, which Measure does not read.

W7 property census (psets_vs_ifc), main → this PR, as equal / different / missing / rvt-rs values Revit does not write:

Model main this PR
BIM4LCA office as built 45,200 / 1 / 324 / 10 45,361 / 1 / 163 / 10
BIM4LCA office at permit 45,382 / 1 / 321 / 14 45,517 / 1 / 186 / 14
24 R2025 models, together 1,386 / 0 / 544 / 0 1,493 / 0 / 437 / 0
RE1 Architecture 208 / 0 / 52 / 10 209 / 0 / 51 / 18
All 31 censused models 92,798 / 2 / 1,432 / 36 93,202 / 2 / 1,028 / 44
  • 404 more values equal to Revit's, no value differs that did not before, and 23 of the 24 R2025 models gain equal values (00_Blank is unchanged), with nothing they don't write.
  • The only new values Revit doesn't write are RE1 Architecture's 8 type IsExternal values. RE1's export is IFC2X3 by Revit 26.2 and writes none on a type object. That is the gap stated in the PR body and in RE-286, kept visible as the maintainer decided on 2026-10-30.
  • Outputs that moved are psets_vs_ifc, the exports' hashes and schema.txt on the 29 models that changed. In schema.txt the set count grows (office as built: 27,580 sets on 13,025 objects and types → 27,767 on 13,208), and with --revit-set-placement the Pset_StairFlightCommon values that IFC4 does not place on IfcStair go from 16 to 20. That is Revit's own placement, which only that flag writes. IfcOpenShell's WHERE-rule check (rules:) finds nothing on any model. Every other scorer's output is byte-identical.

…t IFC4 defines them in, as its LoadBearing does (#1185) (RE-286)
# Conflicts:
#	docs/release-1.0-criteria.md
…s observations refreshed, with no type IsExternal (#1185) (RE-286)
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
@DrunkOnJava DrunkOnJava changed the title feat(ifc)!: write type objects' IsExternal, FireRating and LoadBearing, and stair types' dimensions (W7) (#1185) (#1186) (RE-286) feat(ifc)!: write type objects' FireRating and LoadBearing, and stair types' dimensions, in their common sets (#1185) (RE-286) Oct 31, 2026
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

The census comment above describes the earlier version, which wrote type objects' IsExternal. The maintainer decided on 2026-10-31 to leave it out, after the held-out run showed Revit's newer exporters omit it. The PR body now has the final unfiltered Measure (41180394315, held-out models included): 34 more equal values on the office as built, 29 at permit and 34 on R2025, with nothing different and no value Revit does not write added on any model.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Automated review (Claude Code review agent, run by the maintainer). Verdict: ready to merge after these changes.

  • Held for a decision, settled: the held-out census showed Revit's newer exporters (26.2, 26.4 and the held-out 2025 export) write no IsExternal on a type object. Writing it added values those exports omit: 8 on the AA house, 3 on teste_export_2025 and 8 on RE1 Architecture. The maintainer decided on 2026-10-31 to leave it out. 7bbe15a7 removes the reader, the field and the writer. A grep finds no remaining use, and the element-level IsExternal path is unchanged.
  • Fixed in 008f918a: a type's FireRating (and IsExternal, while it existed) went into a set that doesn't define it, for example Pset_SpaceCommon. Both are now checked against IFC4's set definitions, as LoadBearing already was.
  • Fixed: the changelog tells struct-literal users to add type_entity_sets: Default::default(), and the stair type zeros' comment says they are measured only.
  • Re-pinned in ddb7567a: Core Interior's IFCPROPERTYSET is 6,510 (was 6,697 while type IsExternal was written). The witness observations come from CI's artifact, and both verdicts replay to PASS.
  • Noted, no change: type_object_pset_values re-implements the writer's type grouping. If the two ever drift, tests/parameter_diagnostics.rs catches it on the corpus models.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 31, 2026 07:51
# 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
@DrunkOnJava
DrunkOnJava merged commit 5465168 into main Oct 31, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the w7/type-common-sets branch October 31, 2026 12:21
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