Repository navigation
feat(ifc): a multistory stair is written once for each storey its group repeats it on, as Revit's export writes it (#1977) (RE-463) - #1995
Merged
Conversation
…up repeats it on, as Revit's export writes it (#1977) (RE-463) The sets of a MultistoryStairs group say which Levels each stair spans. A span between two consecutive Levels of the sets' stairs that no set covers gets the copy of the stair that ends where it begins, when the span is as high as that stair: the stair and its parts shifted up, in the storey of the span, named with :2 but for railings, flights NOTDEFINED, no type object, and the writer's own GlobalIds for entities that share a Tag (#1840).
…search module list
…nals' type object, as Revit's export has them, and the scorer skips a stair with no body (#1977) (RE-463)
…ng out gets no note, so its diagnostics stay as they were (#1977) (RE-463)
…e still holds the partitions' inflated copies, and the read keeps no record index, so the pass no longer inflates the file again after the saved-graphics pass (#1977) (RE-463)
…ultistory stair of Revit 2024 is written on each storey its group repeats it on, with the rows' results and the first version's timing (#1977) (RE-463)
DrunkOnJava
marked this pull request as ready for review
November 14, 2026 07:16
…iling with no record set to carry its mark is refused as not movable, not written with a type object Revit gives it none (#1977) (RE-463)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
MultistoryStairsrecord 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'GlobalIds 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'Tags, no type object on the stair, its flights and its landing, flightsNOTDEFINED, andGlobalIds of their own (comment on #1977).Changes
src/research/native_multistory_stairs.rs(new):multistory_groupsreads eachMultistoryStairsrecord'sElementIdIndexPairSet(sets of 14 indexes) and the base and top Level of eachStairsElement, 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):readandattach.readtakes the groups and the Levels;attachwrites 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,:2appended to every name but a railing's, flightsNOTDEFINED. 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:readruns before the saved-graphics pass, while the handle still holds the partitions' inflated copies;attachruns after the body passes and before the base quantities are left out. A newExportNotesays how many copies, only for a file where something was copied or left out.src/ifc/step_writer.rs:type_objectsgives no type object to the copy of a stair, a flight, a landing or a railing (an element carryingMultistoryCopyOf); 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'sPredefinedTypeand whether it has a type object, and skips a stair that has no body.Tag, so the writer's rule for entities sharing aTag(A layered floor's parts take new GlobalIds on every save of a Revit 2027 model (#1829) #1840) gives it aGlobalIdderived from the original's: not Revit's, and the copy says so with theMultistoryCopyOfproperty 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 (Snowdon Towers and the other 2024 samples, exports kept), 43568156861 (timed) and 43568180058 (unfiltered, scored); the scoring against Revit's export of Snowdon Towers (local only) istools/re/multistory_copies_vs_ifc.pyand a by-GlobalIdcomparison with main's export (run 43565624655).IfcStair, 6IfcStairFlight, 30IfcMember, 3IfcSlab, 11IfcRailing), 0 after in every class; rvt-rs's beyond Revit's: 0 in every class.PredefinedType(the 11 railings carry none where Revit writesNOTDEFINED, as their 62 originals do, PredefinedType: Revit's export writes one that rvt-rs leaves none or NOTDEFINED on, on walls, railings, ramps, roofs, proxies, light fixtures, pipe segments and stairs (42 models with a Revit export) #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.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,401GlobalIds are distinct.92326d1a): 119 of 120 exports and 101 of 102diagnostics.jsonfiles are byte-identical, and the one that differs in each is Snowdon Towers architectural. The scorers' lines move only in that file'sschema.txt, by the copies: 53 more objects (6,262 to 6,315), 79 more property sets, 30 moreIfcMemberand 3 moreIfcSlabwith aPredefinedType, and 9 more swept solids with a position of their own. The other four Snowdon files andrac_advanced(five groups of one set each) are byte-identical. The row said 146 models; the run compares 120 exports.rac_advanced2024 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_advanced1.05 and 1.35 (run 43566139741).tools/check-local.sh: no local builds;rustfmt --checkpasses on every file touched, CI runs the rest.Audit-honesty checklist
docs/supported-profile.mdsay 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.MultistoryStairsnote), not guessed.Legal and contribution hygiene
Breaking changes
None. A new
ExportNotevariant (the enum is non-exhaustive), a newOptionsfield 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.