Repository navigation
feat(ifc): draw family instances from the meshes Revit saved for display, opt-in (#255) (#227) (RE-78) - #420
Conversation
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_b60270da-b3df-4c97-9707-38246518cd9c) |
2cdf7cc to
9dc507e
Compare
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_da7d28dd-58c6-424b-b923-85fe504e8ad6) |
|
Brought up to date with
As offered on #255, this stays a draft until rosejn is happy for it to be merged this way. Nothing else in the project waits on it. |
9dc507e to
4fff698
Compare
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_00050529-d689-4c5c-a1fb-170b9e6fb0ea) |
rosejn's reader for Revit's own object graph and the graphics a file saves for display, extracted from #255 (32b806c): the schema registry, the document and element graph, parameters, extensible storage, and the saved mesh and material decoders the saved scene needs. Changes made on extraction: - the unit-test modules are not included (the repository adds no unit tests; this work is measured end to end instead); - the built-in extensible-storage catalog is disabled, as its provenance is not recorded; - missing element flags and empty boundary edges return errors instead of panicking, and NaN-safe sorting replaces partial_cmp().unwrap(); - let-chains are rewritten for the 1.85 MSRV, and earcut is held below 0.4.10, whose is_multiple_of needs Rust 1.87.
…ut in the fuzz workspace
4fff698 to
fd8d995
Compare
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_01eeec2d-c6bd-41fa-9818-870c2ef30da9) |
… 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.
Summary
Opt-in
--saved-meshesforrvt-ifcandrvt-gltf: every body that is only its element record's bounding box is replaced by the mesh Revit saved for the element's display, read by rosejn's native saved-graphics reader from #255. The first commit is theirs, extracted with their authorship; the second integrates it. rosejn confirmed on #255 (2026-09-28) that it can be merged as it stands. Rebased onto main (5f5f89d) on 2026-09-30.Motivation
Doors, windows, furniture and fixtures were boxes (#227: every Core Interior door 2.92 ft too deep). #255 decodes the graphics Revit saves per element, which are the family's real shape.
Changes
22096f0(author rosejn): the native document, element, parameter and saved-graphics modules the saved scene needs, from feat(parser): add native model attributes and geometry extraction #255 (32b806c). Changes on extraction: unit-test modules not included (repository policy); the built-in extensible-storage catalog disabled (provenance not recorded); malformed-input panics returned as errors; let-chains rewritten for MSRV 1.85;earcutheld below 0.4.10, whoseis_multiple_ofneeds Rust 1.87.src/ifc/saved_meshes.rs: replaces record-box bodies (no resolved profile) with the saved mesh in the element's own placement. Aggregate wholes (stairs, curtain walls) keep their parts; a Tag shared by several entities is left alone.SolidShape::TriangulatedFaceSet, written as oneIfcCartesianPointList3Dplus oneIfcTriangulatedFaceSet(Snowdon: 111 MB, against 456 MB asIfcFacetedBrep). glTF and plan output mesh it throughbody_geometry.rvt-ifc/rvt-gltf --saved-meshes; when the reader declines a file (Revit 2025: "native record framing is unvalidated") the export goes ahead with its boxes and says so. Diagnostics recount body sources.tools/re/saved_meshes_vs_ifc.py,reports/element-framing/RE-78-saved-graphics-meshes.md, README, supported profile, support matrix (saved-graphics-meshes, experimental), CHANGELOG.Testing
Per element world box against Revit's own IFC export (IfcOpenShell 0.8.5):
Snowdon residuals (in the report): windows 66 of 68 (Revit's export draws parts the Fine-detail mesh does not), light fixtures 0.58 ft taller, 30 members 13.33 ft low.
After the rebase (2026-09-30), on GitHub's runners: every required check, the MSRV 1.85 job, IfcOpenShell validation, corpus tier 2 and the wheel build pass, and Measure run 36717043673 (this branch against main) exports byte-identical IFC for Core Interior, Einhoven and the four RE1 models, with every scorer output unchanged. The Snowdon row is the measurement from before the rebase (that oracle is local-only).
-D warnings, rustdoc-D warnings,cargo test --workspace --all-targets --all-featurescargo test --profile ci --no-fail-fast --test '*'cargo +1.85.0 check --profile ci --all-targetsifc_schema_arity.pyon the Snowdon saved-mesh IFC (156,768 instances); GLB on Core: 16,188 to 47,000 trianglesAudit-honesty checklist
experimental: 37 s and 5.6 GB peak on Snowdon; Revit 2024 onlyLegal and contribution hygiene
Breaking changes
None. Off by default.
Related issues
Refs #255, #227. Credit: rosejn.