Repository navigation
feat(elements): a railing that names a ramp and has no level of its own is aggregated under it, as Revit's export aggregates it (#1988) (RE-467) - #2005
Merged
Conversation
…wn is aggregated under the ramp on Revit 2024, as in Revit's export (#1988) Revit's export writes the BIM4LCA housing's ramp 1347699 as an IfcRamp whose parts are an IfcRampFlight and its two railings; rvt-rs wrote the railings as plain elements of their storey. The office's eight railings that name a ramp each carry a level of their own (BaseRailing.m_assocLevelId) and Revit leaves them plain, so a railing with one is not aggregated. A ramp keeps its own body.
…a ramp without any does (#1988) The saved-mesh pass skips every whole of an aggregate, because a stair or a curtain wall is drawn by its parts and its own saved graphics would draw it twice. A ramp with railings under it became such a whole and lost its mesh to its record box (Measure 43582910387: box bodies 58 to 59, saved meshes 853 to 852 on the concrete housing as built). Its railings are parts beside its own body, which Revit's export draws from the same saved mesh, so a ramp is not one of the wholes the pass skips.
DrunkOnJava
marked this pull request as ready for review
November 14, 2026 11:05
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
A railing whose record names a ramp (
BaseRailing.m_stairsIdnaming aRamp), names no component of it and has no level of its own (m_assocLevelIdunset) is aggregated under that ramp on Revit 2024, as Revit's export aggregates it. Closes #1988. Measure 43585759293 (90817e75againstmain, unfiltered, 126 models) moves 7 exports, the six BIM4LCA housing files and the Snowdon Towers sample:IfcRailingaggregates: the 2 railings per housing file that only Revit aggregated (ramp 1347699 and its twins) are under their ramp. "Only Revit aggregates" 2 to 0 on all six files; "same whole" 14 to 16 (concrete), 21 to 23 (timber), 0 to 2 (the terrain files). No railing is aggregated that Revit does not aggregate.IfcRelAggregatesof the ramp and its two railings; the 2 railings leave their storey's contents (1,124 to 1,122 elements on the concrete file as built).mesh_bodies_vs_ifc: the scorer reads a whole through its parts, so Revit's ramp (flight and both railings, 27 shells) is now read against rvt-rs's ramp with its railings: volume ratio 0.4907 to 0.5109 (Revit's flight holds its faces twice) and the farthest vertex 3.248 ft to 0.0066 ft on the concrete file as built. The ramp's own body does not change.Motivation
#1988: on the BIM4LCA housing Revit aggregates 2 railings per file under their ramp, an
IfcRampwhose parts are anIfcRampFlightand those railings, where rvt-rs wrote plain elements of their storey. RE-467 has the records, the rule that fails (a level outside the host's span) and the rule shipped.Changes
src/research/native_stairs.rs:RailingRecords::on_levels(the railings whose record names a level of their own) andRAMP_RAILING_REVIT_VERSIONS(2024).src/research/partition_schema_mvp/stairs.rs:attach_railing_lengthstakes a ramp as the whole of a railing that names it and has no level of its own.src/ifc/saved_meshes.rs: a ramp is not a whole the pass skips.probe_1988_ramp_records,one-project-rules.md(RE-390 listed as repaired), a changelog fragment.Testing
The first run (43582910387, the rule alone) found the ramp turned into a box, which the repair above answers; Measure 43585759293 is the run of the rule and the repair.
main's (119 of 126ifc.sha256, 95 of 102diagnostics.json).main's.IfcRamp: their records hold the same classes. The rule rests on two projects with a ramp whose railings have no level of their own (the housing's 1, Snowdon Towers' 2) and one whose ramps' railings carry a level (the office's 4); the level span fits 74 of 75 railings that name a stair or a ramp on the housing and the office and fails on 1 (RE-467 section 4). TheIfcRampFlightis not written (IfcRampFlight: Revit's export writes one under a ramp it exports as a container, and rvt-rs writes none (RE-467) #2007).tools/check-local.sh: no local builds;rustfmt --checkpasses; CI runs the rest.Audit-honesty checklist
Legal and contribution hygiene
revit-ifc'sRailingExporterandRampExporterare cited for what Revit writes, not quoted); no fixtures.Breaking changes
None.
Related issues
Closes #1988. Follow-up: #2007.