Skip to content

feat(ifc): a spiral stair run with treads and no risers is drawn as its treads, arcs and all (#357) - #966

Merged
DrunkOnJava merged 7 commits into
mainfrom
feat/357-spiral-runs
Oct 25, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
feat/357-spiral-runs

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

A spiral stair run with treads and no risers is now drawn as its treads, written as Revit writes them: one IfcExtrudedAreaSolid per tread, over an IfcIndexedPolyCurve with two arcs about the spiral's centre and two lines. On the BIM4LCA office the spiral flight 3057703 has Revit's volume (4.540283 ft³ against 4.540287) and height, where it was a 1,307 ft³ box. Part of #357.

Motivation

#357: spiral runs were left to their box. The run's native records hold the spiral, and Revit's export of it is exact arcs, which a chord approximation could not match on the scorers' vertex test.

Changes

  • src/native_stairs.rs: native_spiral_runs reads each spiral run's centre (StairsTreadInfo.m_origin), radii and riser-line angles (m_bndBox), comparing angles modulo a turn, and its type, sharing one extraction pass with native_runs.
  • src/partition_schema_mvp.rs: attach_spiral_run_bodies (Revit 2024, NATIVE_SPIRAL_RUN_REVIT_VERSIONS) for a run whose type has treads, no risers and is not monolithic; the nosing edge is the line parallel to the next riser line at the type's nosing length (measured: 10.0 mm from the centre in Revit's profile), drawn only on a mirrored run climbing clockwise, as measured. SPIRAL_RUN_* fields, spiral_run_body_from_fields.
  • src/ifc/entities.rs, step_writer.rs, body_geometry.rs, scene_graph.rs: ProfileDef::IndexedPolyCurve (IfcCartesianPointList2D, IfcLineIndex, IfcArcIndex) and SolidShape::Compound (several items in one body representation); GLB and viewer meshes tessellate the arcs.
  • src/ifc/export_content.rs: spiral_run_solid, BodySource native_spiral_run_treads.
  • tools/re/stair_bodies_vs_ifc.py: names the farthest vertex of a body that differs.
  • reports/element-framing/RE-217-stair-runs-2025.md §11, docs/status.md, docs/support-matrix.json (element-record-stair-treads), README.md, changelog.d/added/spiral-runs.md.

Testing

Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.

  • tools/check-local.sh: CI.
  • Verified end to end on real Revit files. Measure 40172394814, this change against main, default models plus -f nordic=true -f r2025=true, stair_bodies_vs_ifc on both BIM4LCA office files (CC BY-SA 4.0):
    • run 3057703: volume 1,307.12 → 4.540283 ft³ (Revit 4.540287); height 236.5503 to 248.3907 ft, Revit's; every vertex of Revit's body within 0.00075 ft of rvt-rs's surface;
    • the vertex test still reads it as differing: Revit's mesh has 12 more points (444 to 432), the farthest on the outer circle at a riser line, one nosing length (0.0328 ft) from rvt-rs's nearest vertex and on rvt-rs's surface;
    • only the two office files' IFC changes, and no other scorer's output; schema counts 17 more positioned swept solids (18 treads where there was one box).
  • Revit's own form, from research branch re/357-spiral-runs (Measure 40171074325): the arcs share the tread's m_origin (radii 1108.969 and 79.066 mm), each arc's middle point is its angular midpoint, one line is radial and the other 10.0 mm from the centre.
  • Witness: Core Interior's export is unchanged.
  • Not drawn: model 17's spiral run, which is monolithic (a 912-vertex face set in Revit's export); a spiral with a nosing that is not mirrored and clockwise (unmeasured).

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • A user-visible change has its entry as a fragment under changelog.d/
  • Resolved limitation updated (support matrix, status, README)
  • Limitations documented (RE-217 §11, support matrix, README): monolithic spirals, the other orientation with a nosing
  • Commit messages describe what changed and why
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files
  • Finding recorded as RE-217's addendum; the probe examples/probe_357_spiral_runs.rs is on re/357-spiral-runs

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content. Clean-room declaration: the members are read from the file's own schema (Formats/Latest) by native_document; Revit's tread profile is read from Revit's own IFC export; no Autodesk SDK source, disassembly or NDA material was used.
  • No fixtures

Breaking changes

None for stable users. ProfileDef and SolidShape gain variants (both #[non_exhaustive]); native_spiral_runs and the SPIRAL_RUN_* items are new in the research surface.

Screenshots or output samples

3057703: differs, Revit 444 vertices, farthest 0.0328 ft, from rvt-rs's surface at most 0.000746 ft, volume rvt-rs 4.540283 ft3, Revit 4.540287 ft3, z rvt-rs 236.5503 to 248.3907, Revit 236.5503 to 248.3907

Related issues

Refs #357

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 25, 2026 08:01
@DrunkOnJava
DrunkOnJava merged commit ce2dac7 into main Oct 25, 2026
27 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/357-spiral-runs branch October 25, 2026 08:06
DrunkOnJava added a commit that referenced this pull request Oct 25, 2026
…ipes, door sizes and slab outlines (#981)

## Summary

The supported profile and the 1.0 criteria caught up with what 0.8.0 has
landed so far: stairs (riserless and spiral flights, landings,
predefined types, the office's numbers), Revit 2024 pipes, door and
window sizes from the record box (RE-218), and the office's slab
outlines. The 1.0 criteria named the closed 0.6.x milestone as where the
geometry residuals live; they now name 0.8.0 and the W6 census. The
copies fragment's slab count is corrected to what `main` measures.

## Motivation

`docs/supported-profile.md` is the per-row statement 1.0 is judged by.
Its stairs row still said spiral and riserless flights are boxes (drawn
since #959 and #966), its pipes row said Revit 2025 only (Revit 2024
since #954), and its doors row did not have RE-218.

## Changes

- `docs/supported-profile.md`: the floors, pipes, stairs and doors rows.
- `docs/release-1.0-criteria.md`: the W6 row and the closing paragraph
name the 0.8.0 milestone and `tools/re/box_bodies_vs_ifc.py`.
- `changelog.d/fixed/current-sketch-copies.md`: 62 of 63 office slab
outlines on each file with #975 and #978 both on `main` (the fragment's
61 was measured before #975 joined it).

## Testing

Unit tests are banned in this repository: do not add them. Show the
change working end to end on real files instead.

- [ ] `tools/check-local.sh`: CI.
- [x] Every number is from a Measure run on `main` or the PR that landed
it: slab outlines from Measure
[40187355859](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40187355859)'s
base (`main` 3a3b50a, `plan_profiles_vs_ifc`: 62 of 63 on each office
file), pipes from #954, stairs from RE-214 and RE-217, door sizes from
RE-218 and #972. `python3 tools/release/changelog.py check` passes.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A user-visible change has its entry as a fragment under
`changelog.d/`: docs only, no new entry
- [x] Resolved limitation updated (support matrix, status)
- [x] Limitation documented: unchanged
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0 (see
`CONTRIBUTING.md`)
- [x] This PR contains no Autodesk proprietary source, decompiled
internals, or NDA'd SDK content (see `CLEANROOM.md`)
- [x] Any new test fixtures use synthetic values: none added

## Breaking changes

None.
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