Repository navigation
feat(ifc): a roof drawn as the level block of its sketch outline is drawn from its saved mesh on Revit 2023 to 2027 (#1612) - #1623
Merged
Conversation
…rawn from its saved mesh on Revit 2023 to 2025 too, and the gables of rac_advanced leave the same-project exceptions (#1612) saved_meshes::attach skipped every body whose outline was resolved, so a roof whose sketch outline the readers recover (Revit 2025 and earlier) stayed the outline extruded over its record box's full height, a level block, while the 2026 and 2027 saves of the same project drew it from its saved mesh: three 15 degree gables of rac_advanced and the two roofs of the same kind of rac_basic. A roof with a resolved outline is now a candidate for its mesh like any body that would be a box, and keeps its block where the mesh does not decode whole (RE-224). A resolved outline stays the body of every other class: a floor's plan and a ceiling's are the shape. What describes a body no longer the block or the box goes with it: ProfileSource, ProfileVertexCount, ProfileVoidCount and SlabShapeRefusal are dropped from a body replaced by its mesh, and ProfileResolved reads false. ROOFS_NOT_THE_2025_BODY loses 165755, 167036 and 167158 (the list only shrinks), and the docs say what a roof is on 2023 to 2027.
…saved meshes out (#1612) The roofs whose sketch outline the readers recover (rac_advanced's 142430, 165755, 167036 and 167158 on every save, rac_basic's 724430) are drawn from their saved meshes now and are no outline, so the gate that counts outlines compared one to four fewer than its floors: rac_advanced 82 on the 2025 save against 86, 81 on 2026 and 2027 against 82, rac_basic's 2025 save 12 against 13 (Measure run 42670013230, the same-project verdict on 245245d). The floors fall by exactly those. Everything else in that run's gates held: the census pairs 5,526 of 5,527 bodies of the 2026 and 2027 saves of rac_advanced with the 2025 save's, the one difference being 201262 as pinned, so the three gables match the 2025 save's meshes within 3 mm and 0.1%.
…on 11 roofs that #1612 draws from it (#1612) Snowdon Towers Architectural (Revit 2024, local only): of the 10 roofs that move from their level block to their saved mesh, 3 were already equal as blocks and 7 were 40% to 125% above Revit's volume; all 10 are within 0.4% of it now and within 0.01 ft of its box. The roof of the T and U footprints of puzzbobb's Revit 2025 models goes from 37,357 ft3 to Revit's 1,845.6 with every vertex within 4.2e-06 ft. Seven held-out exports move one roof each, counts only, and on three of them two scorers disagree, which the report says. The status page, the supported profile and #1191's fragment stop saying no roof's mesh is scored against a Revit export, and the new fragment states what changes.
DrunkOnJava
marked this pull request as ready for review
November 9, 2026 19:23
2 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 9, 2026
…odies that carry one Tag, so a roof written as slab parts is scored against its parts (#1612) (#1631) ## Summary `saved_meshes_vs_ifc.py` took, for a Tag that several of Revit's bodies carry, the last one's box. Revit writes a roof as an `IfcRoof` without a body plus one or more `IfcSlab` parts that carry the roof's Tag, and the element rvt-rs draws whole is all of them. The box of the Tag is now the union of its bodies. ## Motivation #1623 (the roofs drawn from their saved meshes) left three held-out roofs that `saved_meshes_vs_ifc` put more than 1 ft off while `mesh_bodies_vs_ifc` put every vertex within 0.001 ft. Measure 42688384777 on the held-out models and the office with this scorer: the roof of every held-out 2024, 2026 and 2027 save is within 0.01 ft of Revit's (counts only), the file-wide offset on the office is 0, and its totals are 11,039 of 11,040 within 0.01 ft. So the 1 ft was the pairing of one Tag with one of its parts, not the roof. (The saves' mesh triangles are wound consistently: no interior edge of a body of the office or of Snowdon Towers is wound against its neighbour, so no volume cancels.) ## Changes - `tools/re/saved_meshes_vs_ifc.py`: `world_boxes` unions the boxes of bodies sharing a Tag. ## Testing - [x] Verified end to end on real files: Measure [42688384777](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42688384777) (`--ref ci/saved-meshes-scorer-tag-union`, `nordic` and `holdout`, scorer `saved_meshes_vs_ifc`). A scorer change: no export changes. ## Audit-honesty checklist - [x] N/A: a measuring tool; no user-visible change. ## Breaking changes None. ## Related issues Refs #1612.
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
A roof drawn as the level block of its sketch outline (the outline extruded over the record box's full height) is drawn from its saved mesh on Revit 2023 to 2027 too, where the mesh decodes whole, as a roof whose outline is not recovered already is since #1610. Against Revit's own exports, the 11 roofs that move and that Revit's export holds are now within 0.4% of Revit's volume; 8 of them were a block 40% or more too large. The three gables of
rac_advancedthat the same-project gate excepted leaveROOFS_NOT_THE_2025_BODY.Motivation
#1612.
saved_meshes::attachskipped every body whose outline is resolved. Revit 2024 and 2025 saves have their roofs' outlines recovered, so a roof the slope readers do not draw stayed a block there while the 2026 and 2027 saves of the same project drew it from its mesh. The record box holds the roof's reference surface, not its slope or thickness, so the block is not the roof's shape. The issue asked for a Revit export that holds a roof of this kind; Snowdon Towers (Revit 2024) and puzzbobb's20_T_U_Roof(Revit 2025) are two.Changes
src/ifc/saved_meshes.rs: a body whose outline is resolved is a candidate when it is anIFCROOF; every other class keeps its outline as its body. A body replaced by its mesh losesProfileSource,ProfileVertexCount,ProfileVoidCountandSlabShapeRefusaland readsProfileResolvedfalse. A mesh that does not decode whole keeps its block (RE-224).tools/re/readers_across_saves.py:ROOFS_NOT_THE_2025_BODYwithout 165755, 167036 and 167158 (the list only shrinks).tools/re/bodies_across_saves.py:OUTLINE_LEASTfalls by the roofs that are no outline any more (rac_advanced86 to 82 on 2025 and 82 to 81 on 2026 and 2027,rac_basic13 to 12 on 2025).tools/ci/check_same_project_projects.py,docs/maintaining.md.docs/status.md,docs/supported-profile.md, the changelog fragment and W6: draw family instances from their saved meshes by default (decode the remaining saved-graphics faces) #1191's.Testing
Unit tests are banned and none is added. The change is shown end to end (RE-389 section 3 has every figure):
holdout=true, code245245d2againstmainatcbeba4c7: 15 of 118 exports move, only roofs frompartition_element_record_bboxtosaved_graphics_mesh(rac_advanced2024 and 2025: 4 each, 2026 and 2027: 1 each;rac_basic2024 and 2025: 1 each; Snowdon Towers Architectural: 10;20_T_U_Roof: 1; 7 held-out exports: 1 each). No property or quantity census moves (0 regressions), and no model'sslab_shape_refusalschanges.20_T_U_Roof: the block was 37,357 ft3 against Revit's 1,845.6; the mesh is 1,845.58 ft3 with every vertex of Revit's body within 4.2e-06 ft.tools/re): of the 10 roofs that move, 3 were equal as blocks and 7 were 40% to 125% above Revit's volume; all 10 are within 0.4% of it, with their box within 0.01 ft.saved_meshes_vs_ifc.pywhilemesh_bodies_vs_ifc.pyputs every vertex within 0.001 ft both ways. I could not tell from counts which scorer is right; RE-389 section 4 says what is and is not known.rac_advancedpair 5,526 of 5,527 bodies with the 2025 save's (201262 as pinned), so the three gables now match the 2025 save's meshes within 3 mm and 0.1%. The first run on245245d2failed only on the four outline floors, which the roofs leaving that group fall short of; onb1b01f36the verdict is a pass (Measure 42675593198: 15 samples held to their earlier saves, and the Areas on 4 saves).tools/check-local.sh: no new Rust dependency; fast CI is green onb1b01f36;tools/release/changelog.py check,tools/ci/measured_numbers.pyandtools/ci/api-doc-ids.pypass on the docs.Audit-honesty checklist
rac_advanced's andrac_basic's are held to each other; the PR and RE-389 say so, anddocs/status.mdno longer says no roof's mesh is scored.Legal and contribution hygiene
Breaking changes
A roof on Revit 2023 to 2027 that was a block is a mesh by default;
rvt-ifc --no-saved-mesheskeeps the block.Related issues
Closes #1612. Follow-up: #1630.