Skip to content

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
DrunkOnJava merged 3 commits into
mainfrom
feat/roof-level-block-meshes
Nov 9, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
feat/roof-level-block-meshes

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

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_advanced that the same-project gate excepted leave ROOFS_NOT_THE_2025_BODY.

Motivation

#1612. saved_meshes::attach skipped 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's 20_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 an IFCROOF; every other class keeps its outline as its body. A body replaced by its mesh loses ProfileSource, ProfileVertexCount, ProfileVoidCount and SlabShapeRefusal and reads ProfileResolved false. A mesh that does not decode whole keeps its block (RE-224).
  • tools/re/readers_across_saves.py: ROOFS_NOT_THE_2025_BODY without 165755, 167036 and 167158 (the list only shrinks). tools/re/bodies_across_saves.py: OUTLINE_LEAST falls by the roofs that are no outline any more (rac_advanced 86 to 82 on 2025 and 82 to 81 on 2026 and 2027, rac_basic 13 to 12 on 2025). tools/ci/check_same_project_projects.py, docs/maintaining.md.
  • RE-389, 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):

  • Measure 42670013230, unfiltered with every flag and holdout=true, code 245245d2 against main at cbeba4c7: 15 of 118 exports move, only roofs from partition_element_record_bbox to saved_graphics_mesh (rac_advanced 2024 and 2025: 4 each, 2026 and 2027: 1 each; rac_basic 2024 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's slab_shape_refusals changes.
  • Revit's export, 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.
  • Revit's export, Snowdon Towers Architectural (local only, kept exports of Measure 42675942905 and 42675946767 scored with 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.
  • Held-out (counts only): 4 of the 7 score the roof's box within 0.01 ft of Revit's; the other 3 (one project's three saves) score it more than 1 ft off in saved_meshes_vs_ifc.py while mesh_bodies_vs_ifc.py puts 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.
  • Same-project gates: the 2026 and 2027 saves of rac_advanced pair 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 on 245245d2 failed only on the four outline floors, which the roofs leaving that group fall short of; on b1b01f36 the 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 on b1b01f36; tools/release/changelog.py check, tools/ci/measured_numbers.py and tools/ci/api-doc-ids.py pass on the docs.

Audit-honesty checklist

Legal and contribution hygiene

  • Apache-2.0. No Autodesk proprietary source, decompiled internals or NDA'd content; the Snowdon Towers export is read locally and not committed.

Breaking changes

A roof on Revit 2023 to 2027 that was a block is a mesh by default; rvt-ifc --no-saved-meshes keeps the block.

Related issues

Closes #1612. Follow-up: #1630.

…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 DrunkOnJava changed the title feat(ifc): a roof drawn as the level block of its sketch outline is drawn from its saved mesh on Revit 2023 to 2025 too (#1612) 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) Nov 9, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 9, 2026 19:23
@DrunkOnJava
DrunkOnJava merged commit 66b7186 into main Nov 9, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/roof-level-block-meshes branch November 9, 2026 19:33
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.
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.

Revit 2023 to 2025: roofs drawn as their sketch outline's level block are not drawn from their saved meshes, so one project's saves disagree

1 participant