Skip to content

M4-05: Recover levels and storey assignment #33

Closed

Description

@DrunkOnJava

Created from the roadmap audit in TODO.md.

Source: https://github.com/DrunkOnJava/rvt-rs/blob/main/TODO.md#L603
Tracking commit: 1ec8105

Scope

Labels: priority:P0, type:feature, area:elements, area:ifc

  • Decode Level names/elevations from real project files.
  • Assign elements to storeys via level references.
  • Remove fallback-only Level 1 behavior for files with real levels.

Acceptance criteria:

  • IFC storeys match project levels.
  • Elements are grouped under correct storey.
  • Viewer scene tree groups by actual levels.

Definition of done

  • The TODO acceptance criteria for this section are implemented or explicitly superseded by a linked decision.
  • Tests, fixtures, or documentation are added at the level appropriate to the change risk.
  • User-facing behavior and limitations remain honest in README/docs/viewer messaging.
  • Relevant CI checks pass before the issue is closed.

Activity

  1. added
    area:elements
    area:ifc
    priority:P0
    type:feature
    on Apr 25, 2026
  2. DrunkOnJava commented on Aug 28, 2026

    @DrunkOnJava
    OwnerAuthor

    Triage / v0.2.0+ progress (2026-08-28) — keep open; temper earlier “15/15 done” claims

    Audit against main @ 21aa0e0 (OPS-03 / #99).

    Shipped

    • Level decoder + storeys_from_levels bridge exist (src/elements/level.rs, src/ifc/from_decoded.rs)
    • STEP writer can emit multiple IfcBuildingStorey when IfcModel.building_storeys is populated

    Current production reality (important)

    • RvtDocExporter ArcWall production path still sets building_storeys: Vec::new() (src/ifc/mod.rs), so real-project IFC falls back to the placeholder storey warning path
    • tests/fixtures/project-counts/2024-core-interior.json marks levels as known_gap with decoder_expected: 0 and unsupported_feature: "revit_levels_to_ifc_storeys"
    • Therefore claims that storeys are “15/15 done” on current main are overstated relative to the production exporter

    Remaining vs AC

    Keep open.

  3. DrunkOnJava commented on Aug 29, 2026

    @DrunkOnJava
    OwnerAuthor

    See progress note on #30 (PR #136). Level/storey elevations recover from ArcWall trailers + partition Level-like names on Einhoven; schema-driven Level from partitions remains open — not closing.

  4. DrunkOnJava commented on Aug 29, 2026

    @DrunkOnJava
    OwnerAuthor

    Progress (#140 / partition_schema_mvp):

    • Production iter_elements now yields typed Level DecodedElements from ArcWall base elevations + partition building-storey names (≥4 on Einhoven with recovered elevations; names applied when confident).
    • Material / Room display-name recovers also surface (strict filters).

    Still open vs AC: Level ElementId binding from ElemTable, IFC storey assignment for non-ArcWall elements, viewer scene-tree grouping by recovered levels (IFC path already had elevation-derived storeys from ArcWall). Keeping open.

  5. DrunkOnJava commented on Aug 29, 2026

    @DrunkOnJava
    OwnerAuthor

    Progress from PR #141 (2a463d3):

    Shipped

    • Partition Level recovers now form IFC storeys even when elevation is unresolved (name-only → elevation 0.0, documented).
    • Einhoven: 4 storeys (elevations from ArcWall trailers + names).
    • 2024 Core Interior: 12 storeys from Level-like names (decoder baseline in project-count fixture).
    • Viewer File Status + rvt-inspect show production Level counts and IFC storey totals.

    Still open vs AC

    • ElementId↔Level binding
    • Reliable surveyed elevations on 2024 without ArcWall trailers
    • Viewer scene-tree grouping by recovered levels (counts only for now)

    Keeping open.

  6. DrunkOnJava commented on Aug 29, 2026

    @DrunkOnJava
    OwnerAuthor

    Progress (PR #143)

    Shipped

    • Viewer scene tree groups under recovered IFCBUILDINGSTOREY nodes (name · elev · element count).
    • File Status Spatial lists storey names (Einhoven: Level 1, Elevation 6.562 ft, Elevation 13.123 ft, Roof).
    • Diagnostics JSON adds storey_names; rvt-inspect prints them.
    • Floors/Rooms remain under honest Unassigned · no Level ElementId bind (no invented storey assignment).

    Still open vs AC

    • ElementId↔Level binding for non-ArcWall elements
    • Reliable surveyed elevations on 2024 without ArcWall trailers (name-only → elev unresolved/0)
    • Closing the issue still blocked on Level ElementId bind + element→storey assignment for Floors/Rooms

    Keeping open.

  7. 9 remaining items

  8. DrunkOnJava commented on Sep 19, 2026

    @DrunkOnJava
    OwnerAuthor

    All three acceptance criteria are met.

    IFC storeys match project levels. #218 (RE-24) recovers all 15 Revit Levels on 2024_Core_Interior.rvt with their names and elevations exact, each keyed by its own ElementId, and both project-count manifests gate storey_count at 15 with tolerance 0.

    Elements are grouped under the correct storey. #267 (RE-27) reads the Level that the element record's own reference list names, accepting only an unambiguous single Level, and #278 (RE-29) gave the 116 rooms element records of their own. Containment is 969 of 970 exported elements. The rooms half is scored against Revit's own containment: the ten Levels they bind map one-to-one onto the storeys the export aggregates them into. The single element that stays unbound is a wall whose record names no unique Level, and it is contained in the IfcBuilding rather than filed under an arbitrary storey.

    Viewer scene tree groups by actual levels. The deployed viewer shows the real storey names (Basement 2, Basement 1, Level 1, Mez 1-2, and so on) with their elevations and element counts.

    Fallback-only Level 1 behaviour is gone: #267 also removed the unwrap_or(0) that silently placed every unbound element in the lowest storey.

    Not claimed: the full 969-element containment set has not been scored element by element against Revit's IfcRelContainedInSpatialStructure; that reference comparison is still NOT MEASURED outside the room subset. The RE-20 negative also stands, so this binds by the record's Level reference and by elevation, not by a Level ElementId on Floors and Rooms in the schema-field sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:elementsarea:ifcpriority:P1research-criticaltype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions