Skip to content

fix(elements): a stair run is called spiral only where its treads lie about one centre, as a spiral run's do (#2046) - #2100

Merged
DrunkOnJava merged 3 commits into
mainfrom
fix/2046-spiral-flights
Nov 19, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
fix/2046-spiral-flights

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

A stair run is now called spiral only where its treads lie about one centre, as a spiral run's do. Before, rvt-rs wrote SPIRAL for a flight, and SPIRAL_STAIR for its stair, wherever every tread of the run gives m_runType 2. On a reporter's Revit 2027 model with no spiral run, Revit's export does not call three such runs spiral: their flights' types are USERDEFINED with an ElementType of NOTDEFINED (#2046).

Motivation

HWT-25's count on #2046, CHL, 18 flights paired by GlobalId: Revit's export and rvt-rs 0.25.0 both write STRAIGHT on the types of the same 9 flights. On the other 9, Revit writes USERDEFINED with an ElementType of NOTDEFINED, and rvt-rs writes NOTDEFINED on 6 and SPIRAL on 3. The model has no spiral stair; the 3 are one flight in each of its three three-flight stairs.

Revit's exporter takes a flight's value from the run's own style (revit-ifc, StairsExporter.GetValidatedStairFlightType, CLEANROOM.md source 5): the style's name matched against IfcStairFlightTypeEnum, so Straight, Spiral and Winder give their values, and any other style, such as a sketched run, gives NOTDEFINED. To Revit, then, the three runs are not spiral runs, and their treads' m_runType 2 does not tell them from one. The rule rested on two spiral runs (RE-217 §10): R2025 model 17's and the BIM4LCA office's run 3057703.

Changes

  • src/research/native_stairs.rs: native_run_shapes gives a run whose treads all give 2 only where spiral accepts its treads, in riser order (one centre, one pair of radii spanning the run's width, each tread beside and above the one before, all climbing the same way round), the test the 2024 spiral treads are drawn with (Stair flights not yet drawn: monolithic spiral runs, riserless runs with a nosing, and nosing profiles #357). Otherwise the run has no shape, so its flight and its stair keep NOTDEFINED.
  • changelog.d/fixed/2046-spiral-flight-type.md.
  • reports/element-framing/RE-217-stair-runs-2025.md: §13, the narrowing and its Measure.

Testing

Unit tests are banned in this repository. Rows registered before any run is read. Measure of 5e36af9f against main (69ac3a26): nordic, r2025, samples, holdout, every scorer.

  1. The measured spirals keep their values. In predefined_types_vs_ifc, the BIM4LCA office as built and at permit keep 35 of 35 flights with Revit's PredefinedType (34 STRAIGHT, 1 SPIRAL, run 3057703) and their flight types' values, and R2025 models 13 to 17 keep 5 of 5 (model 17's SPIRAL). If model 17 loses SPIRAL, the spiral test does not hold on its Revit 2025 treads, and that is read before anything else.
  2. No stair loses Revit's type. No stair PredefinedType count in predefined_types_vs_ifc falls.
  3. Nothing else moves. No other scorer line moves. Any export that changes is on a model with a run whose treads all give 2 and fail the spiral test; each such run is listed with its flight's value before and after. If no export changes, the narrowing fired on no open model, and the Measure shows only that the two measured spirals are kept.
  4. The same-project gates pass.
  5. As they come: which exports move, by model, the held-out ones included.

What it cannot show. No open model has a run like CHL's three, so the Measure can only show that the measured spirals are kept. Whether the three are now NOTDEFINED is HWT-25's count to make, with a build of 5e36af9f.

Results: read against the rows: rows 1 to 5 hold, row 3 in its empty case.

Not changed. Revit writes USERDEFINED with an ElementType of NOTDEFINED on the types of the 6 flights where rvt-rs writes NOTDEFINED. That is one export's reading, not measured on an open model, and is reported on #2046.

Audit-honesty checklist

  • Changelog fragment.
  • RE-217 §13 records it, with the Measure (c1a19148, which changes src/ by a comment alone).
  • Self-approved: this is the maintainer's own pull request, with no second reader running. Before approving, the whole change was re-read against 69ac3a26: the narrowing in native_run_shapes and its comments, the changelog fragment and RE-217 §13. The same-project verdict on 5e36af9f is carried to c1a19148 by Measure 44601082079 and to 3dd2038e by Measure 44602563602: comment and docs changes only, every export byte-identical.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk proprietary source, decompiled internals or NDA content (CLEANROOM.md). revit-ifc is read and cited, not copied.
  • No new fixtures. The reporter's model is confidential and is not read here.

Breaking changes

None.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Measure read against the rows (44589336915, 5e36af9f against 69ac3a26: nordic, r2025, samples, holdout, every scorer).

All 120 exports and all 102 diagnostics.json are byte-identical to main's, and no scorer line moves.

  1. Holds. predefined_types_vs_ifc on the head: the BIM4LCA office as built and at permit, IfcStairFlight: 35 in both; same 35 (Revit's 34 STRAIGHT, 1 SPIRAL), and its flight types SPIRAL 1 and STRAIGHT 1 as Revit's; R2025 model 17, IfcStairFlight: 1 in both; same 1 (SPIRAL). So the office's run 3057703 and model 17's run, saved by Revit 2025, both pass the spiral test.
  2. Holds. No stair count moves: the office keeps IfcStair: 16 in both; same 16, its SPIRAL_STAIR among them, and model 17 its SPIRAL_STAIR.
  3. Holds, in its empty case. No export changes, so the narrowing fired on no open model, and this Measure shows only that the two measured spirals are kept.
  4. Holds. same-project gates: pass, 15 samples held to their earlier saves.
  5. As they come: no export moves, the held-out ones included.

Whether CHL's three now come out NOTDEFINED is HWT-25's count, with the build of this commit posted on #2046.

…ut one centre, and the comment and fragment say what Revit writes on those flights (#2046)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 19, 2026 19:37
…g on an open model and the reporter's three are not yet measured (#2046)
@DrunkOnJava
DrunkOnJava merged commit 5380c82 into main Nov 19, 2026
37 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/2046-spiral-flights branch November 19, 2026 20:01
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