Skip to content

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
DrunkOnJava merged 5 commits into
mainfrom
fix/1988-ramp-railings
Nov 14, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
fix/1988-ramp-railings

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

A railing whose record names a ramp (BaseRailing.m_stairsId naming a Ramp), names no component of it and has no level of its own (m_assocLevelId unset) is aggregated under that ramp on Revit 2024, as Revit's export aggregates it. Closes #1988. Measure 43585759293 (90817e75 against main, unfiltered, 126 models) moves 7 exports, the six BIM4LCA housing files and the Snowdon Towers sample:

  • IfcRailing aggregates: 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.
  • Entities: +1 on each housing file, the IfcRelAggregates of 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).
  • Snowdon Towers (local export, matched by hand): 80 railing entities are aggregated in both exports (76 under stairs, 4 under the two ramps), the 69 distinct ElementIds each under the same whole; the other 62 are plain in both.
  • Ramp rows of 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.
  • A ramp keeps its saved mesh: the saved-mesh pass skips the wholes drawn by their parts (stairs, curtain walls) and no longer skips a ramp. Without that the ramp turned into a box (box bodies 58 to 59, saved meshes 853 to 852, Measure 43582910387).
  • Unchanged: the office files (the 8 railings that name its ramps carry a level and stay plain), the R2025 models and the other samples.

Motivation

#1988: on the BIM4LCA housing Revit aggregates 2 railings per file under their ramp, an IfcRamp whose parts are an IfcRampFlight and 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) and RAMP_RAILING_REVIT_VERSIONS (2024).
  • src/research/partition_schema_mvp/stairs.rs: attach_railing_lengths takes 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.
  • RE-467, the probe 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.

  1. Holds. Aggregates: no railing that only rvt-rs aggregates on any of the 42 models with a Revit export, and the 6 that only Revit aggregates on a held-out Revit 2018 model, a release the rule leaves alone, are unchanged. The office and R2025 exports are identical to main's (119 of 126 ifc.sha256, 95 of 102 diagnostics.json).
  2. Holds. Box bodies, saved meshes and every scorer line other than the two above are identical to main's.
  3. Not shown. Why Revit makes the housing's ramp a container and the office's four a plain 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). The IfcRampFlight is 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 --check passes; CI runs the rest.

Audit-honesty checklist

  • The Summary states each change the run showed, with its count.
  • A changelog fragment.
  • No private paths or emojis.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk source (the rule is Revit's measured export; revit-ifc's RailingExporter and RampExporter are cited for what Revit writes, not quoted); no fixtures.

Breaking changes

None.

Related issues

Closes #1988. Follow-up: #2007.

…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.
… record, for the ramps whose railings Revit aggregates and the ones it leaves plain (#1988)
…le, and the rules resting on one project list RE-390 as repaired (#1988) (RE-467)
@DrunkOnJava DrunkOnJava changed the title feat(elements): a railing that names a ramp and has no level of its own is aggregated under the ramp on Revit 2024, as in Revit's export (#1988) 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) Nov 14, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 14, 2026 11:05
@DrunkOnJava
DrunkOnJava merged commit f23c538 into main Nov 14, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1988-ramp-railings branch November 14, 2026 11:21
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.

Stair railings: 2 per BIM4LCA housing file are aggregated under their stair by Revit and not by rvt-rs (RE-390)

1 participant