Repository navigation
feat(elements): read each room's outline from its stored solid (#90) (RE-101) - #473
Merged
Merged
Conversation
…(RE-101) A room's partition holds the room's solid as planar faces after u64 id + 04 90 08 00. The vertical faces that reach the floor give plan edges that close into the outline, read from the exported record's partition and kept only where they span its box. Core Interior 116/116 rooms at Revit's area and outline (76 before); RE1 Architecture 11/11; Snowdon Towers 45/54 at its VIM's area (10 before). rvt-schedule's room schedule gains an area column.
Bugbot couldn't run - usage limit reachedBugbot 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_b8ba1e69-7c40-4533-ae2a-d7b00513049f) |
DrunkOnJava
enabled auto-merge (squash)
September 28, 2026 10:05
This was referenced Sep 28, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Sep 28, 2026
…RE-102) (#474) ## Summary Revit 2023 rooms take their outline too (RE-102). Revit 2023 stores a room's solid as 2024 and 2025 do (RE-101, #473), with two differences: - four `ff` bytes sit between the room's ElementId and the solid's tag; - its faces are 170 bytes apart where 2024's are 174. ```text u64 room id · ff ff ff ff · 04 90 08 00 · … ``` The face fields sit at the same offsets. The same guard applies: the outline's extent must equal the room record's box within 0.001 ft. ## Results | `Exemplo_data` (Revit 2023) against Revit's IFC4, 9 rooms | main | this PR | |---|---:|---:| | area within 0.1% | 6 | 9 | | outline within 0.01 ft | 6 | 9 | - **The three rooms that change** (349975, 349984, 350436) are not rectangles. Main's 6 of 9 are the six rectangular rooms. - **Pairing:** Revit 2023 rooms don't carry Revit's GlobalId in rvt-rs's export. `plan_profiles_vs_ifc.py --match centroid` pairs each room by top-surface centroid, and all 9 pair at 0.000 ft. ## Changes - src/partition_room_boundaries.rs: `solid_headers` / `solid_start` accept both header forms; 2023 is added to the supported releases. - src/partition_schema_mvp.rs: the 2023 path calls `attach_room_outlines`. - examples/probe_re101_room_solids.rs runs the full recovery, so it sees 2023 rooms. - tools/re/plan_profiles_vs_ifc.py: `--match centroid`. - reports/element-framing/RE-102-room-solids-2023.md, README, supported profile, support matrix, CHANGELOG. ## Testing Unit tests are banned in this repository; none were added. - [x] fmt, clippy -D warnings, rustdoc -D warnings, `cargo +1.85.0 check`. - [x] End to end against Revit's own Exemplo_data IFC4 (local only, no licence, sha256 in the report), as in the table. - [x] Byte-identical to #473's output apart from the timestamp on every other local file: - Core Interior, the four RE1 models; - Snowdon Towers architectural and structural; - Einhoven, modelo_bim, Projeto1, teste_export_2025; - the MIT house (2024, 2025). So no witness observation changes. ## Legal and contribution hygiene - [x] Apache-2.0. Byte observations and comparisons with Revit's exported IFC; no Autodesk code. ## Breaking changes None. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes binary parsing and IFC geometry for Revit 2023 rooms only; scope is narrow and other fixtures are claimed byte-identical, but partition layout assumptions could mis-read solids on unmeasured 2023 files. > > **Overview** > **Revit 2023 rooms now export with real plan outlines (RE-102)**, extending RE-101’s partition solid parsing to the 2023 record layout. On 2023, the room ElementId is followed by four `0xff` bytes before the same `04 90 08 00` solid tag; face records use the same field offsets but sit 170 bytes apart instead of 174. > > `partition_room_boundaries` adds `solid_start` / `solid_headers` so discovery accepts both header shapes, and `ROOM_SOLID_SUPPORTED_REVIT_VERSIONS` includes **2023**. The Revit 2023 recovery path in `partition_schema_mvp` now calls **`attach_room_outlines`** so `IfcSpace` bodies use solid-derived outlines when they close on the record box (same 0.001 ft guard as 2024/2025). > > On **Exemplo_data** (9 rooms), area and outline agreement with Revit’s IFC4 export goes from **6/9 to 9/9**; other local exports stay byte-identical apart from timestamps. **`plan_profiles_vs_ifc.py`** gains **`--match centroid`** to pair spaces when rvt-rs does not emit Revit’s GlobalId (used for 2023 validation). Docs, changelog, support matrix, probe example, and RE-102 report are updated accordingly. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 79dfa2b. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
DrunkOnJava
added a commit
that referenced
this pull request
Nov 5, 2026
…main, the plates and rooms being outlines before the option landed (#1492) The count of 158 (132 doors, 6 windows, 20 shading devices) was measured on 2026-09-27. RE-95 (#467) closed the 20 plates' outlines and RE-101 (#473) the rooms' on 2026-09-28; saved_meshes::attach replaces only a body whose profile is not resolved, as it did at 7386177, the first commit on main with --saved-meshes. RE-78 now says so under its first table, and its result line no longer names the shading devices.
8 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 6, 2026
… the 20 plates and 116 rooms were outlines before the option landed (#1492) (#1508) ## Summary RE-78 counted 158 saved-mesh bodies on Core Interior (132 doors, 6 windows, 20 shading devices); `mesh_bodies_vs_ifc` and `rvt-ifc --saved-meshes` count 138. Nothing changed on `main`: the 158 was measured on 2026-09-27, when the 20 plates and the 116 rooms were record boxes. RE-95 (#467, 6e0dfaa) closed the plates' sketch outlines and RE-101 (#473, 68a44c0) gave the rooms their stored-solid outlines on 2026-09-28, and `saved_meshes::attach` replaces only a body whose `ProfileResolved` is false, as it did at 7386177, the first commit on `main` with `--saved-meshes`. No export changes and no body that measured exact was lost. ## Motivation #1492: the pages were corrected to 138 of 138 in #1484 without saying why the 20 stopped being scored. ## Changes - `reports/element-framing/RE-78-saved-graphics-meshes.md`: the result line stops naming the shading devices, the Core Interior shading-device row says it is from before RE-95, and a dated note under the first table gives the commits and the rule. The Snowdon rows are said to be from the same earlier tree, local only and not re-run. - `tools/re/shading_bodies_vs_ifc.py`: `mesh_bodies_vs_ifc` with every `IfcShadingDevice` selected whatever its `BodySource`, and a count of the `BodySource` and `ProfileResolved` of the plates before its table. Run by name through `-f scorers=` (as `slab_bodies_vs_ifc` is); not in the standing scorer list. - `changelog.d/research/1492-shading-plates-not-saved-meshes.md`. ## Testing Unit tests are banned in this repository; none added. - [x] Commit found by reading, not inferred from dates: `git merge-base --is-ancestor 6e0dfaa 7386177` and `... 68a44c0 7386177` both hold, `git show 7386177:src/ifc/saved_meshes.rs` has the `|| profile_resolved` skip (line 75), and PR #420's own body says its Core Interior row (158) is from before its rebase onto `main`. The Measure run that body cites (36717043673) exported IFC byte-identical to `main`'s, so it did not draw the meshes and did not re-measure the 158. - [x] Measure run 41850769925 (`--saved-meshes`, `e024f03c`): `rvt-ifc` prints `138 of 138 bounding-box bodies drawn from their saved graphics`, and `mesh_bodies_vs_ifc` and `saved_meshes_vs_ifc` score 132 doors and 6 windows, no shading device. - [x] The new scorer, run on Revit's small Core Interior IFC against itself (one shading device): selects it and scores ratio 1.0000. That checks the selection, not rvt-rs. - [x] Measure run 42133202790 (filtered: `core-interior`, `-f ifc_flags=--saved-meshes`, scorers `plan_profiles_vs_ifc mesh_bodies_vs_ifc saved_meshes_vs_ifc shading_bodies_vs_ifc`; code `daf36102`, scorers from `3fb0d241`; success), read back: - The 20 plates are `BodySource` `partition_element_record_bbox` with `ProfileResolved` true (the record-box source stays on a body whose outline is resolved). - Shape against Revit's body of the same Tag (`shading_bodies_vs_ifc`): volume within 0.01% on 20 of 20, every vertex within 0.001 ft both ways on 20 of 20, Revit's vertices on rvt-rs's surface on 20 of 20; the largest distance 1.539e-06 ft (10 `Floor:Structural Slab`, 10 `Floor:Arch Topping Slab - 2"`). - Plan outline (`plan_profiles_vs_ifc`): area within 0.1%, vertices and outline within 0.01 ft, 20 of 20 (and 80 of 80 `IfcSlab`). - `mesh_bodies_vs_ifc` and `saved_meshes_vs_ifc` score 138 bodies (132 doors, 6 windows), no plate and no room; `rvt-ifc` prints `138 of 138 bounding-box bodies drawn from their saved graphics`. - Not measured: the plates' saved meshes against Revit's (the option leaves the plates alone, so no run draws them), and the rooms' shape (Revit's export holds no spaces to score them against). ## Audit-honesty checklist - [x] The docs say what was and was not measured; the plates' shape figure is labelled not yet measured on this head - [x] A fragment under `changelog.d/research/` - [x] No emojis, private paths or PII ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk source; no new fixtures ## Breaking changes None. No `src/` change, no export change. ## Related issues Closes #1492.
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
Rooms take their real outline (RE-101, #90). RE-29 had found that no partition holds a room's polygon as a run of vertices, and concluded that the boundary is computed, not stored. The vertices are indeed not stored, but the room's solid is. Its planar faces follow a header naming the room:
The vertical faces that reach the room's floor give plan edges that close into the outline, with a loop of their own around each column or shaft. The solid is read from the partition of the room record rvt-rs exports; Core Interior keeps two or three copies of each, and they can disagree. An outline is kept only where its extent equals that record's box within 0.001 ft. Otherwise the room keeps its box.
Results
plan_profiles_vs_ifc.pygains that outline measure: Revit splits edges wherever the bounding element changes, so a same-shaped room can have more vertices.rvt-schedule --schedule roomsgains anarea_ft2/area_m2column, filled only for rooms whose outline was read. On Core Interior all 116 are within 0.1% of Revit's.Changes
room_outline,solid_faces,face_atandRoomFace::plan_edge. It joins wall ends within 1e-4 ft (RE1 room 355008 has a 3e-5 ft step).attach_room_outlines.ProfileSource.Testing
Unit tests are banned in this repository; none were added.
tests/rvt_schedule_cli.rs's Core Interior end-to-end run now also requires every room to have an area.cargo +1.85.0 check, fuzz workspace check (--locked), andtools/ci/verify-real-files.sh --profile ciwith both corpora.ifc_schema_arity.py --witness-agreementpasses.Legal and contribution hygiene
Breaking changes
The room schedule gains a column before
body_source.Note
Medium Risk
Changes exported
IfcSpacegeometry and room CSV shape for many models; logic is fail-closed to bbox when solids disagree or do not close, but Core Interior witness hashes and schedule columns are breaking for consumers.Overview
RE-101 (#90) replaces room bounding-box bodies with plan outlines read from each room’s partition solid (planar faces after a room-id header). Vertical wall faces that reach the floor are stitched into closed loops (voids for columns/shafts); outlines are kept only when they match the record box within 0.001 ft, otherwise the room still exports as a box.
IFC / schedules: Resolved rooms emit arbitrary closed profiles (witness counts shift: more
IFCARBITRARYCLOSEDPROFILEDEF, fewer rectangles).ProfileSourcecan bepartition_room_solid_faces.rvt-schedule --schedule roomsaddsarea_ft2/area_m2, filled only when the outline was read.Validation: New
partition_room_boundariesmodule andprobe_re101_room_solidsexample;plan_profiles_vs_ifc.pyadds outline distance (Shapely) and keysIfcSpaceby GlobalId; newroom_areas_vs_vim.pyfor Snowdon vs VIM. Docs, support matrix, and CHANGELOG reflect measured gains (e.g. Core Interior 116/116 area vs 76 before).Reviewed by Cursor Bugbot for commit b62193f. Configure here.