Skip to content

research(elements): a probe, a scorer and RE-463 read what Revit writes for a multistory stair and what the file says about it: 3 stairs twice, 53 entities, the copy fills the one uncovered Level span (#1977) - #1991

Merged
DrunkOnJava merged 7 commits into
mainfrom
research/1977-multistory-stairs
Nov 14, 2026

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

A probe, a scorer and report RE-463 for #1977: Revit's export writes each of Snowdon Towers architectural's three multistory stairs twice (53 entities more than rvt-rs writes), the copy is the stair shifted up one storey, and the file's own sets of stairs leave exactly one Level span uncovered per group, which is where Revit writes the copy. No export changes; the supported profile now states the gap. Refs #1977, which stays open for the change.

Motivation

RE-65 and RE-68 measured names and storeys against any copy of a multistory stair and said rvt-rs writes each stair once; nothing tracked the copies. #1977 asks what a copy is and where the file says how many there are.

Changes

  • probes/examples/probe_1977_multistory_stairs.rs (new): each MultistoryStairs record's standard stair, reference Level, pair set with the classes of its members, and each set's stair with its base and top Level.
  • tools/re/multistory_copies_vs_ifc.py (new): counts, by class, the entities Revit writes for a multistory stair beyond rvt-rs's, and for a copy both write, its name, storey, whole and shift. Counts only.
  • reports/element-framing/RE-463-multistory-stair-copies.md, and a sentence in the Stairs row of docs/supported-profile.md.

Testing

Measure probe runs 43551707746, 43552665332 and 43553309916, exit 0 on every model; the comparison with Revit's export is local (Snowdon Towers' export is local only), on the kept export of Measure 43546540315.

  • Revit's export holds 106 entities on the three stairs against rvt-rs's 53: 3 IfcStair, 6 IfcStairFlight, 30 IfcMember, 3 IfcSlab and 11 IfcRailing more. The 30 stringer copies have the original's extents and volume and sit exactly 4.064 m above it (30 of 30).

  • The file's three MultistoryStairs records list their sets (a stair, a landing, 2 runs and 10 supports each); each group has one Level span no set's stair covers, L4 to L5, the height of the L3 to L4 stair, and Revit writes that stair a second time on L4: 3 of 3.

  • A search of 10,068 key shapes per pair from revit-ifc's GUIDUtil over 66 pairs reproduces no copy's GlobalId; the report says so and does not claim a rule.

  • tools/check-local.sh: not run locally (no local builds); rustfmt --check passes on the probe, tools/release/changelog.py check, tools/ci/api-doc-ids.py and tools/ci/measured_numbers.py pass, and CI runs the rest.

  • Verified end to end on real Revit files: the Measures and the local comparison above, with the probe and scorer that reproduce them.

  • IFC exporter: nothing is exported differently.

  • Performance: N/A, a probe, a scorer and a report.

Audit-honesty checklist

  • The report says what is not known: the rule for a copy's GlobalId, whether the uncovered-span rule is Revit's beyond three groups of one building, and whether rac_advanced's five single-set groups are repeated.
  • The supported profile states the gap (rvt-rs writes a multistory stair once, where Revit writes it once per storey); no changelog fragment, since nothing user-visible changes.
  • No private paths, emails or internal jargon in committed files.

Legal and contribution hygiene

  • Apache-2.0. revit-ifc's GUIDUtil is read as source 5 of CLEANROOM.md for what Revit writes: the wording of its hash keys is used to search, no code is copied.
  • No new fixtures; the Snowdon Towers files and Revit's export of them stay local.

Breaking changes

None.

Related issues

Refs #1977.

…istory stair, its standard stair, its Levels and the Level it repeats up to, for the copy Revit writes on each storey (#1977)
…cell list of each record and only the scalar fields of Levels and stairs (#1977)
…ultistory stair beyond rvt-rs's, by class, and how a copy written by both sits (#1977)
… with the classes of its members and the Levels of each set's stair, and the supported profile names the gap (#1977)
…tair and what the file says about it: 3 stairs written twice (53 entities, +4.064 m), the copy fills the one Level span no set covers (#1977)
…, as the other scorers do, and guards its main (#1977)
@DrunkOnJava
DrunkOnJava merged commit 92af055 into main Nov 14, 2026
36 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/1977-multistory-stairs branch November 14, 2026 04:16
DrunkOnJava added a commit that referenced this pull request Nov 14, 2026
…up repeats it on, as Revit's export writes it (#1977) (RE-463) (#1995)

## Summary

Revit's export writes each stair of a multistory group once on its own
Level and again, with its parts, on each Level above that the group's
sets leave uncovered. rvt-rs wrote it once (53 entities fewer on Snowdon
Towers architectural, RE-463). The sets of a `MultistoryStairs` record
say which Levels each stair spans; a span between two consecutive Levels
of those stairs that no set covers now gets the copy of the stair that
ends where it begins, when the span is as high as that stair, on Revit
2024. On Snowdon Towers architectural the 53 entities are written, equal
to Revit's in name, storey and type object, and in place within 1 mm; no
other export moves. Refs #1977, which stays open: the rule rests on one
building (no other file has a Revit export of a multistory stair) and
the copies' `GlobalId`s are not Revit's.

## Motivation

#1977 asked what a copy is and where the file says how many there are.
RE-463 (#1991) measured the copy against Revit's export of all three
stairs: a vertical translation of one storey, the stair and each part
but a railing named with `:2`, the originals' `Tag`s, no type object on
the stair, its flights and its landing, flights `NOTDEFINED`, and
`GlobalId`s of their own (comment on #1977).

## Changes

- `src/research/native_multistory_stairs.rs` (new): `multistory_groups`
reads each `MultistoryStairs` record's `ElementIdIndexPairSet` (sets of
14 indexes) and the base and top Level of each `StairsElement`, in one
read of the file's records that keeps no record index on the handle.
- `src/research/native_document.rs`: `Options::index_records` (on by
default): whether a read that finds no record index for its channel
builds one and keeps it. The saved-graphics pass wants it; a reader that
reads a file once turns it off, as the index is 48 bytes for each record
of the file held to the end of the export.
- `src/ifc/multistory_stairs.rs` (new): `read` and `attach`. `read`
takes the groups and the Levels; `attach` writes the copies. Per group
it takes the Levels the sets' stairs start and end on, finds each span
no set covers, and copies the set whose stair ends where the span starts
when the span is as high as that stair (0.01 ft). A copy is the stair
and its aggregated parts (railings included) with their property sets,
shifted up by the Level difference, in the storey of the span, `:2`
appended to every name but a railing's, flights `NOTDEFINED`. Spans the
rule does not reach, a stair repeated a second time and anything the
pass cannot move are counted in the run's note, not copied.
- `src/ifc/export_pipeline.rs`: `read` runs before the saved-graphics
pass, while the handle still holds the partitions' inflated copies;
`attach` runs after the body passes and before the base quantities are
left out. A new `ExportNote` says how many copies, only for a file where
something was copied or left out.
- `src/ifc/step_writer.rs`: `type_objects` gives no type object to the
copy of a stair, a flight, a landing or a railing (an element carrying
`MultistoryCopyOf`); a stringer's copy keeps its original's, as in
Revit's export (30 of 30).
- `tools/re/multistory_copies_vs_ifc.py`: also reads a copy's
`PredefinedType` and whether it has a type object, and skips a stair
that has no body.
- A copy shares its original's `Tag`, so the writer's rule for entities
sharing a `Tag` (#1840) gives it a `GlobalId` derived from the
original's: not Revit's, and the copy says so with the
`MultistoryCopyOf` property of its record set.
- `docs/supported-profile.md`, the RE-463 report (sections 5 to 7) and a
changelog fragment.

## Testing

Rows registered on #1977 (comment of 2026-11-14) and here before any
run; Measure runs of the final code `48cbcd04`:
[43568153235](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43568153235)
(Snowdon Towers and the other 2024 samples, exports kept),
[43568156861](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43568156861)
(timed) and
[43568180058](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43568180058)
(unfiltered, scored); the scoring against Revit's export of Snowdon
Towers (local only) is `tools/re/multistory_copies_vs_ifc.py` and a
by-`GlobalId` comparison with main's export (run 43565624655).

1. **Holds.** Revit's beyond rvt-rs's by class: 53 before (3 `IfcStair`,
6 `IfcStairFlight`, 30 `IfcMember`, 3 `IfcSlab`, 11 `IfcRailing`), 0
after in every class; rvt-rs's beyond Revit's: 0 in every class.
2. **Holds, with the row's wording corrected.** Of the 53 entities of
the 3 copies, 53 of 53 equal Revit's in name, storey and type object; 42
of 53 in `PredefinedType` (the 11 railings carry none where Revit writes
`NOTDEFINED`, as their 62 originals do, #1713); the shift of the 50 with
a body of their own is within 1 mm, 50 of 50. The row said a copy has no
type object: Revit's stringer copies keep theirs (30 of 30), which the
first run showed, and the rule was narrowed.
3. **Holds.** Main's 6,953 products of the Snowdon Towers architectural
export are all in the change's with the same class, name, `Tag`,
`ObjectType`, `PredefinedType`, storey, type object, aggregate whole and
property sets; the change adds exactly the 53 and no other, and the
export's 97,401 `GlobalId`s are distinct.
4. **Holds.** Run 43568180058 (unfiltered, with nordic, r2025, samples
and holdout, against main's merge-base `92326d1a`): 119 of 120 exports
and 101 of 102 `diagnostics.json` files are byte-identical, and the one
that differs in each is Snowdon Towers architectural. The scorers' lines
move only in that file's `schema.txt`, by the copies: 53 more objects
(6,262 to 6,315), 79 more property sets, 30 more `IfcMember` and 3 more
`IfcSlab` with a `PredefinedType`, and 9 more swept solids with a
position of their own. The other four Snowdon files and `rac_advanced`
(five groups of one set each) are byte-identical. The row said 146
models; the run compares 120 exports.
5. **Holds at the final code; the first version failed it.** Snowdon
Towers architectural 29,318 to 29,838 ms (1.02), peak 797 to 797 MiB
(1.00); `rac_advanced` 2024 1.02 and 0.99; no file more than 3% slower.
The one peak flag, Snowdon HVAC (1.06), holds no stair, its export is
byte-identical, and its peak is two-valued from run to run. The first
version read the groups after the saved-graphics pass in two reads that
kept a record index, which inflated the whole file again: Snowdon Towers
architectural 1.05 in time and 1.51 in peak (797 to 1,205 MiB),
`rac_advanced` 1.05 and 1.35 (run
[43566139741](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43566139741)).

- [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes
on every file touched, CI runs the rest.
- [x] Verified end to end on real Revit files: rows 1 to 5, as above.
- [x] IFC exporter: the witness is Core Interior's, which holds no
multistory stair; its verdicts are unchanged by construction and CI
replays them.
- [x] Performance: row 5.

## Audit-honesty checklist

- [x] The report (RE-463 sections 5 to 7) and
`docs/supported-profile.md` say what is written and what is not: the
uncovered-span rule is inferred from three groups of one building, and
nothing in the file states how far a stair repeats.
- [x] A changelog fragment.
- [x] Limitations in code: a span the rule does not reach, a second span
above one stair, a Level that is no storey and a part the pass cannot
move are counted (`MultistoryStairs` note), not guessed.
- [x] No private paths, emails or internal jargon in committed files.

## Legal and contribution hygiene

- [x] Apache-2.0. Revit's export of the Snowdon Towers sample is read as
an oracle (local only, never committed); no Autodesk source.
- [x] No new fixtures.

## Breaking changes

None. A new `ExportNote` variant (the enum is non-exhaustive), a new
`Options` field of a research type, and a new crate-private module; the
export of a file with a multistory group changes as the rows say.

## Related issues

Refs #1977.
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