Skip to content

feat(elements): draw stair runs ending with a tread and monolithic runs from the run's End with Riser setting (#357) (RE-92) - #464

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/stair-runs-ending-with-tread
Sep 28, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/stair-runs-ending-with-tread

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Reads a stair run's "End with Riser" setting and draws the runs RE-52 left as boxes: runs ending with a tread, and monolithic runs (RE-92, #357). A run's element data holds the StairsRun fields in schema order:

f64 × 7   bottom elevation, top elevation, extend below base, extend below tread base,
          run width, left and right stringer width
u32       top riser index
u8 × 3    centre mark visible, begin with riser, end with riser

The record is taken where its bottom elevation and width equal the run's sketch (RE-52).

Motivation

RE-52 drew 34 of Snowdon Towers' 43 flights. Three runs had one riser line more than risers and kept their box, and so did the monolithic runs. "End with Riser" is 0 on exactly those three runs.

Results

Snowdon Towers' 43 stair runs main this PR
drawn as their steps 34 38
every drawn vertex on Revit's mesh, and every Revit vertex on or in the drawn run 30 33
the same except the nosing's lower front edge (Revit's nosing profile) 3 4
the same except the first riser below a landing (RE-52 §4) 1 1
  • 1563804, with upright risers, ends with a tread. Its last tread runs to the last riser line.
  • 2234674, 2061630 and 1647253 are monolithic. Each is drawn as one body with one riser fewer than riser lines. The underside lies the type's structural depth below the inner corners, square to the pitch, and the floor cuts it off. On the "Solid Base" type (2 ft deep) the body closes straight down to the floor.
  • All three equal Revit's mesh exactly.

Evidence limit. Snowdon is the only local file with stairs. Monolithic runs are measured on two types; runs ending with a tread on three runs. A slanted run ending with a tread is not measured and is not drawn.

Changes

  • src/partition_stairs.rs:
    • RunEnds, run_ends_at, scan_run_ends;
    • monolithic_side_profile;
    • run_side_profile takes the end setting;
    • the run-data walk is shared (scan_run_data).
  • src/partition_schema_mvp.rs: attach_stair_run_bodies accepts one riser line more than risers on a run ending with a tread.
  • examples/probe_re92_run_ends.rs, tools/re/stair_runs_vs_ifc.py, and reports/element-framing/RE-92-stair-run-ends.md.
  • README, status, support matrix, supported profile, recon addendum, RE-52 §5 note, CHANGELOG.

Testing

Unit tests are banned in this repository; none were added. The existing RE-52 tests take the new argument.

  • Gates: fmt, clippy -D warnings, rustdoc -D warnings, cargo +1.85.0 check, fuzz workspace check (--locked), and tools/ci/verify-real-files.sh --profile ci with both corpora.
  • End to end against Revit's own Snowdon Towers IFC4 with stair_runs_vs_ifc.py, as in the table.
  • rvt-rs's own IFC of the four new runs, meshed by IfcOpenShell, equals the drawn profiles.
  • Snowdon Towers: only those four IfcStairFlight bodies change.
  • Snowdon structural, Core Interior, the four RE1 models, Einhoven and the MIT house (2024, 2025): byte-identical to main's apart from the timestamp. No witness observation changes.

Legal and contribution hygiene

  • Apache-2.0. Byte observations, schema field names from Formats/Latest, and comparisons with Revit's exported IFC; no Autodesk code.

Breaking changes

partition_stairs::run_side_profile takes a fourth argument, the run's end setting (Option<bool>).

Related issues

Refs #357.


Note

Medium Risk
Changes stair extrusion geometry and adds binary parsing of StairsRun flags; scope is limited to Revit 2024 stair runs but alters IFC bodies for affected flights.

Overview
Stair flight geometry now respects Revit’s “End with Riser” flag and can render monolithic runs as a single cast body, so four more Snowdon Towers flights export as stepped geometry instead of bounding boxes (34 → 38 drawn).

The reader locates the StairsRun record in run element data (elevations, width, begin/end-with-riser flags) and matches it to the plan sketch. Runs that end with a tread are allowed one extra riser line vs riser count; run_side_profile extends the top tread to that line. Monolithic types with slanted risers use new monolithic_side_profile (structural depth below the pitch, floor cut-off). attach_stair_run_bodies wires in scan_run_ends; partition scanning is refactored via shared scan_run_data. A probe (probe_re92_run_ends) and IFC scorer (stair_runs_vs_ifc.py) document validation; docs/README matrices are updated.

Breaking: partition_stairs::run_side_profile gains a fourth argument end_with_riser: Option<bool>.

Reviewed by Cursor Bugbot for commit ae9ad78. Configure here.

…ns from the run's End with Riser setting (#357) (RE-92)
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 28, 2026 05:57
@cursor

cursor Bot commented Sep 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_52a7b372-3c96-4179-a236-56431a5e9a60)

@DrunkOnJava
DrunkOnJava merged commit 061c619 into main Sep 28, 2026
20 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/stair-runs-ending-with-tread branch September 28, 2026 06:00
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