Skip to content

fix(partitions): stop inventing rooms and floors; they come from element records only - #308

Merged
DrunkOnJava merged 1 commit into
mainfrom
fix/record-releases-no-heuristic-rooms-floors
Sep 23, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
fix/record-releases-no-heuristic-rooms-floors

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

The partition MVP no longer invents rooms and floors. Its name-only rooms (space-like display strings) and plan-loop floors (closed runs of f64 pairs that miss the ArcWall centrelines) matched nothing in Revit's own exports, so rooms and floors now come from partition element records only.

Motivation

Measured against every Revit export available as an oracle:

file release invented Revit's own export
every family file (phi-ag corpus, 2016 to 2026) all 1 room, "Office Equipment" families hold no rooms
RE1 Electrical / Mechanical / Plumbing (Drshelden/IFC-ECS, MIT) 2025 13/4/21 slabs, 23/25/23 spaces named after space-type strings ("Banking Activity Area - Office", "Classroom Furniture") no IfcSlab, no IfcSpace
Exemplo_data (local, no licence) 2023 14 plan loops, 1 room "Office Equipment" 1 slab, 9 real rooms ("COZINHA", "SUITE 2", …); no loop within 10% of the slab's plan area
modelo_bim (local, no licence) 2023 3 plan loops, "Office Equipment" 9 slab entities, 0 rooms; no loop within 10% of any slab's plan area
Snowdon Towers Architectural / Structural (local) 2024 37 / 15 name-only rooms, incl. a view name ("Enlarged Residential Lobby Plan") —
Einhoven (magnetar, MIT) 2023 13 plan-loop slabs, 14 rooms, all Revit space-type entries ("Lobby - Religious Buildings", "Sorting Area - Post Office") no paired export

Most plan loops are triangles: scan_closed_plan_loops accepts four f64 pairs whose last point returns to the first. RE-25 had already found no plan loop with the bounds of any Core Interior plate. Not one true positive turned up on any file with a reference.

Changes

  • src/partition_schema_mvp.rs: rooms_from_names, floors_from_partition_plan_loops and their helpers are removed, along with PartitionSchemaMvp::floors and is_strict_room_name. Record-backed slabs and rooms are untouched.
  • examples/probe_level_elementid_recovery.rs: H5 (ElemTable ids near the plan-loop floors) is retired along with its input.
  • tests/rooms_floors_from_records_only.rs (new): no Room or Floor on any of the 11 family releases. tests/iter_elements_typed.rs: Einhoven must yield none.
  • viewer/tests/viewer-regression.spec.ts: Einhoven now reports no unsupported_geometry_missing_level (only the invented rooms had one), and its schedule has a single IFCWALL group. Multi-type grouping stays covered by schedule_groups_by_ifc_type_biggest_first.
  • README, docs/status.md, docs/compatibility.md, ROADMAP.md, docs/support-matrix.json, CHANGELOG (Fixed + Removed).

After the change:

file exports
2024_Core_Interior unchanged: 360 walls, 132 doors, 6 windows, 256 columns, 80 slabs + 20 shading devices, 116 rooms
RE1 Architecture (2025) unchanged: 7 walls, 2 slabs, 11 rooms
Einhoven (2023) 24 ArcWalls only (was + 13 slabs, 14 spaces)
family files, RE1 MEP, ribeiro 2023/2025 no building elements (was invented slabs/spaces)

Testing

  • tools/check-local.sh --corpus (fmt, clippy, rustdoc, workspace tests with the family and project corpora): 328 test binaries green
  • Viewer: wasm rebuilt from this branch, typecheck, build, and npm run test:browser against Einhoven: 14 passed
  • No let-chains added (MSRV 1.85)

Audit-honesty checklist

  • Docs no longer claim Room or Floor plan-loop recovery
  • No emojis, private paths, or PII. The unlicensed oracles (ribeiro, Snowdon) were measured locally and are not committed.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk proprietary material

Breaking changes

PartitionSchemaMvp::floors and partition_schema_mvp::is_strict_room_name are removed (CHANGELOG, Removed). Floors are in PartitionSchemaMvp::slabs.

Related issues

Refs #86, #94, #95.


Note

Medium Risk
Behavior change for exports and iter_elements on files without decodable room/slab records (2023, families, MEP samples); public API removal of PartitionSchemaMvp::floors and is_strict_room_name.

Overview
Stops inventing rooms and floors in the partition MVP. Name-only rooms from partition strings and ArcWall-excluded plan-loop floors are removed; rooms and slabs/floors now come only from partition element records (OST_Rooms, OST_Floors / OST_BuildingPad).

PartitionSchemaMvp::floors, is_strict_room_name, and the plan-loop scan (~300 lines in partition_schema_mvp.rs) are deleted. recover_partition_schema_mvp no longer calls rooms_from_names or floors_from_partition_plan_loops; record-backed paths are unchanged. 2023 projects like Einhoven export ArcWalls only (no fake slabs/spaces); family files export no Room/Floor on any release.

Docs (README, status, compatibility, ROADMAP, support-matrix, CHANGELOG) drop claims about Room/Floor plan-loop recovery. New tests/rooms_floors_from_records_only.rs gates all 11 family releases; iter_elements_typed and viewer regression tests expect zero invented floors/rooms on 2023 Einhoven.

Reviewed by Cursor Bugbot for commit b2f12ac. Configure here.

…ent records only

The partition MVP filled in name-only rooms (space-like display strings)
and plan-loop floors (closed runs of f64 pairs that miss the ArcWall
centrelines). Neither matched anything in Revit's own exports:

- every family file, on every release, gained a room named "Office
  Equipment";
- the Revit 2025 RE1 Electrical, Mechanical and Plumbing models
  (Drshelden/IFC-ECS, MIT) exported 38 slabs and 71 spaces named after
  space-type strings, while Revit's exports of them hold none;
- on two Revit 2023 projects with paired exports the name-only path found
  none of the 9 real rooms of one and invented "Office Equipment" in both,
  and none of the 17 plan loops (mostly triangles) comes within 10% of the
  plan area of any exported slab;
- Snowdon Towers gained 37 and 15 name-only rooms, one of them a view name,
  and RE-25 had already found no plan loop with the bounds of any Core
  Interior plate.

Rooms and floors now come from element records only. Record-backed
walls, doors, windows, columns, slabs and rooms are unchanged (Core
Interior and RE1 Architecture export exactly as before); a 2023 file
exports its ArcWalls without invented floors or rooms, and a family file
exports no building elements.

PartitionSchemaMvp::floors and is_strict_room_name are removed; the
RE-20 probe's H5 hypothesis, which read the plan-loop floors, is retired.
tests/rooms_floors_from_records_only.rs checks all 11 family releases.
@cursor

cursor Bot commented Sep 23, 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_5c6f973c-c8ec-4538-8eb5-52abf9116ba8)

@DrunkOnJava
DrunkOnJava merged commit 968d528 into main Sep 23, 2026
23 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/record-releases-no-heuristic-rooms-floors branch September 23, 2026 01:42
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