Skip to content

feat(elements): place elements whose record names no Level on Revit's storey (#369) (RE-68) - #383

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/storey-remainder
Sep 24, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/storey-remainder

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Elements whose record names no Level now reach the storey Revit's own export gives them (RE-68, #369). On Snowdon Towers the elements on no storey fall from 102 to 5, and none is placed on a wrong storey.

Three rules, applied to record-backed elements still without a Level after RE-59 and RE-60:

  1. A stair or ramp whose base sits exactly at one Level takes it. A multistory stair names three Levels, so RE-59 declined it. With a Level, its railings follow it through RE-60's rule (11 railings).
  2. An element takes the Level of the one element of its own class its record names. The 16 nested parts of a lobby chandelier follow the chandelier.
  3. Slab edges, light fixtures, wall sweeps, generic models, hardscape and stairs take the Level their base elevation gives, within a fail-closed band (elevation_band_level):
    • the Level just above the base when the base is at most 0.25 ft below it;
    • the Level at or below the base when the next Level up is at least 0.5 ft above;
    • no Level in between.
      Revit puts the elements whose base is 0.013 to 0.233 ft below a Level on that Level, and keeps the nearest other one (0.333 ft below) on the Level below. The measured gap is only 0.1 ft wide, so the uncertain part of the band stays closed.
Snowdon Towers, any copy Revit writes before after
on Revit's storey 5,847 5,944
on no storey 102 5
on a different storey 2 2
  • What stays unplaced.
    • 4 plumbing fixtures. They follow the Level object they name in Revit's export, and nothing separates their objects from the light fixtures' ones, which name the wrong Level.
    • 1 slab edge in the band's closed part.
  • Revit writes multistory copies. A multistory stair and its railings appear once per storey under one Tag. tools/re/storeys_vs_ifc.py --any-copy (new) counts any copy's storey. Without it, 42 of Curtain-panel and mullion parents that differ from Revit's, and nested curtain walls #370's "different storey" elements are copies of these stairs, and with it only 2 remain: curtain panel 1593696 and railing 1646280.
  • Nothing else moves. The 13 other local files export byte-identical IFC. On Snowdon, a per-element comparison finds only:
    • the 97 newly placed elements;
    • 3 stairs and 2 stringers that gain a Level on the storey they already had.

Changes

  • src/partition_schema_mvp.rs: resolve_base_at_level, resolve_remaining_levels, ELEVATION_PLACED_CLASSES and record_base_feet.
  • src/element_record_level_refs.rs: elevation_band_level, the band constants and three Level-bind source values.
  • tools/re/storeys_vs_ifc.py: --any-copy.
  • examples/probe_re68_remaining_levels.rs; reports/element-framing/RE-68-remaining-storeys.md.
  • Support-matrix row, status, CHANGELOG.

Testing

End to end, against real files. No tests were added.

  • rvt-ifc on Snowdon, scored with storeys_vs_ifc.py --any-copy, plus a per-element semantic diff against main.
  • All 13 other local files compared byte for byte.
  • The probe on Snowdon.
  • fmt, clippy -D warnings, rustdoc -D warnings, the workspace suite, the corpus tests under --profile ci, cargo +1.85.0 check and the fuzz workspace check.

Audit-honesty checklist

  • Every count is measured against Revit's own export.
  • The band's thresholds are measured, with the thin gap reported and its uncertain part left unplaced.
  • RE finding: probe and report.
  • No emojis, private paths or personal data.

Legal and contribution hygiene

  • Apache-2.0
  • Clean-room: byte observations, and Revit's own exports as oracles.
  • Snowdon stays local.

Related issues

Refs #369, #370.


Note

Medium Risk
Changes IFC storey containment for many element categories; behavior is fail-closed and Snowdon-validated, but export spatial structure shifts for real projects.

Overview
RE-68 extends partition-level storey binding for record-backed elements that still have no Level after RE-59/RE-60. The MVP pipeline now runs resolve_base_at_level (stairs/ramps whose base matches a Level elevation exactly, so multistory stairs and following railings get a storey) and resolve_remaining_levels (nested same-class hosts, then elevation-band placement for slab edges, fixtures, sweeps, generic models, hardscape, and stairs).

elevation_band_level in element_record_level_refs implements a fail-closed band (0.25 ft / 0.5 ft tolerances) with three new LevelBindSource values. Measurement tooling adds probe_re68_remaining_levels, an RE-68 report, support-matrix/CHANGELOG updates, and storeys_vs_ifc.py --any-copy so Revit’s duplicate multistory copies under one Tag compare correctly.

On Snowdon Towers, elements with no storey drop from 102 to 5, with 97 newly placed and none on a wrong storey.

Reviewed by Cursor Bugbot for commit af3e7a3. Configure here.

… storey (#369) (RE-68)

A multistory stair takes the Level its base sits exactly at, and its railings
follow it. An element takes the Level of the one element of its own class its
record names, as the parts of a nested light fixture follow the chandelier.
Slab edges, light fixtures, wall sweeps, generic models, hardscape and stairs
take the Level their base elevation gives, within a fail-closed band: the
Level just above within 0.25 ft, the Level at or below from 0.5 ft, and none
in between.

On Snowdon Towers, measured against every copy Revit writes of each element,
the elements on no storey fall from 102 to 5 and none is placed wrongly. The
storey scorer gains --any-copy for the multistory copies.
@cursor

cursor Bot commented Sep 24, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_9e95e850-7c91-4d17-abd4-887fd89e7359)

@DrunkOnJava
DrunkOnJava merged commit 1e1ed0e into main Sep 24, 2026
23 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/storey-remainder branch September 24, 2026 08:32
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