Skip to content

feat(ifc): write a stair's flight set values from its flights (W7) (#1186) (RE-287) - #1201

Merged
DrunkOnJava merged 3 commits into
mainfrom
w7/stair-container-sets
Oct 30, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
w7/stair-container-sets

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

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, 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 (feat(ifc)!: write type objects' FireRating and LoadBearing, and stair types' dimensions, in their common sets (#1185) (RE-286) #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

  • README / docs reflect the current state after this PR
  • Changelog fragment changelog.d/added/stair-flight-set.md
  • Limitations documented here, in RE-287 and in the code
  • 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 22:41
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Owner review: Pset_StairCommon.TreadLengthAtInnerSide on a stair is the tread depth, written by default because IFC4 gives the stair that set. The Pset_StairFlightCommon values Revit's export puts on an IfcStair are written only with --revit-set-placement, because IFC4 does not apply that set to a stair (the maintainer's 2026-10-25 set-placement decision). stair_flight_additions fails closed: a stair with a flight that has no set gets nothing, counts are summed only where every flight holds them, and a length is written only where all flights agree within 1e-9. Measure 41137371839: +111 equal on each office file and +7 or +8 on the five R2025 stair models, none different, parameter_value_count moving by exactly the values written, every other model byte-identical. The stated gap (a stair type's minimum inside tread width, unset on every measured model) is in RE-287. Armed.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 22:44
# Conflicts:
#	docs/rvt-moat-break-reconnaissance.md
@DrunkOnJava
DrunkOnJava merged commit 13fc635 into main Oct 30, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the w7/stair-container-sets branch October 30, 2026 22:53
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