Skip to content

fix(ifc): a ceiling in pieces takes the area of the piece Revit's export names, the first part of its saved mesh's first face (#1209) (RE-486) - #2063

Merged
DrunkOnJava merged 7 commits into
mainfrom
fix/1209-ceiling-first-piece
Nov 15, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
fix/1209-ceiling-first-piece

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

A ceiling in pieces that holds no Qto_CoveringBaseQuantities.GrossArea now takes the area of the piece Revit's export names. That piece is the part of its saved mesh's first face (the first primitive, which is the top face) that holds the face's first triangle. This extends RE-480's one-piece rule (#2056) to ceilings whose face is in several pieces. RE-465 leaves those out where a ceiling's two lowest sketch lines lie on two different pieces. On the four BIM4LCA office files, 16 ceilings gain a value, 5 of them cut, and all 16 equal Revit's. Report: RE-486. Rows: #1209 (comment 6894478486), registered before the run.

Motivation

#1209. revit-ifc 24.2's BodyExporter.ExportBody (CLEANROOM.md source 5, Exporter/BodyExporter.cs at e5caa9b81d; cited, not copied) sets the body's ScaledArea from each extrusion as it creates it. GrossAreaCalculator reads that value, so a ceiling in pieces gets the area of the piece created last.

  • Revit's export. Of the 78 ceilings in pieces on the four BIM4LCA office files (73 uncut, 5 cut), every one has the GrossArea of the piece whose IfcExtrudedAreaSolid has the highest STEP id. That is also the last item listed. The largest piece is right on only 45. Source: tools/re/ceiling_piece_order_vs_ifc.py, Measure 43713821158. A layered ceiling lists one item per piece per layer, and the order of the pieces can differ between layers.
  • The saved mesh. It stores the slab as one face per primitive, with the pieces as connected parts of each face. The first face's first part is Revit's piece on 78 of 78, the 5 cut ones included. Source: probe_1209_ceiling_mesh_order, Measure 43714434788.

Changes

  • src/ifc/saved_meshes.rs:
    • first_piece_face_area. It applies when the first primitive is one horizontal face in more than one part, and a face facing the other way holds a part of the same area to 0.1%. It is tried where one_piece_face_area gives none, and only when the mesh decodes with no diagnostic (partial_refusal).
    • coverings_without_area selects ceilings by ElementId. rvt-rs writes a ceiling sketched in pieces as one covering per piece, all with the ceiling's ElementId (Plan profiles: slabs sketched as several separate loops need one solid per piece #331). So a ceiling is listed only where none of its coverings holds GrossArea, and the area goes on its own covering, the first one written. The first version of this PR took a ceiling only where its ElementId named exactly one covering, so it wrote nothing (Measure 43715338673; the cause is in RE-486, section 3).
    • horizontal_triangles takes the per-triangle normal test out of one_piece_face_area, unchanged. part_roots takes the union-find out of pieces, unchanged.
  • reports/element-framing/RE-486-ceiling-pieces-first-face-gross-area.md, changelog.d/fixed/1209-ceiling-pieces-gross-area.md, and the RE-486 row in docs/one-project-rules.md. The W7: coverings' GrossArea: the BIM4LCA housing's 10 roof vents of several parts, where Revit's value is one solid's (RE-484), and the ceiling written as IfcSlab (#2074) #1209 row in docs/contribution-map.md and the W7 line in docs/release-1.0-criteria.md now include RE-486.
  • docs/one-project-rules.md's counts table had drifted from its rows, and now matches them. The office said 47 for 48 rows (49 with RE-486), BIM-Speed Vitoria said 5 for 4, and RE-477's Vitoria spent Revit 2018 project had no line.

Testing

Full run. Measure 43733137320 ran b000d8ab against its merge base 156e2b25, with nordic, r2025, samples and holdout, on 120 exports. All five rows on #1209 are met:

  • The office. Qto_CoveringBaseQuantities.GrossArea equal goes from 86, 71, 84 and 70 to 90, 75, 88 and 74, with 0 different and 0 missing. Each file's totals move by these 4 alone. The MCP answers find one more equal quantity on each file.
  • Everything else. 115 of 120 exports are byte-identical: the housing, the Revit 2025 models, Core Interior, RE1, every held-out export and every sample save but one.
  • Snowdon. One ceiling of Autodesk's 2024 Snowdon Towers Architectural sample gains a GrossArea, and no Revit export in CI checks it. Revit's own local export of that file has no base quantities. Against its body (both exports kept by Measure 43735582243), our area equals the profile of the piece Revit's export creates last, to 8e-9 relative. That piece is also the largest of the three, so this ceiling cannot tell the two rules apart.
  • Diagnostics. They move in exported.total_entities alone: +4 on each office file and +1 on Snowdon.
  • Gates. same-project gates passes.

The filtered run 43721768570 gave the same office counts. After b000d8ab the branch holds the report and fragment (b755d546) and a clean --no-ff merge of main (2a2fb064: the 0.25.0 release, #2070 and #2071; no src/ change), so the proof is --carry-proof 43733137320.

Audit-honesty checklist

Legal and contribution hygiene

  • Apache-2.0. revit-ifc was read and cited only (CLEANROOM.md source 5). No Autodesk SDK source or internals were used.

Breaking changes

None.

https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut

…covering, the first, where none of its coverings holds GrossArea (#1209) (RE-486)

rvt-rs writes a ceiling sketched in pieces as one IfcCovering per piece,
all with its ElementId (#331). The ceilings RE-486 is for are all such:
on the four BIM4LCA office files each of the 16 maps to 2 to 9 coverings,
so the pass's single-covering match never reached them and Measure
43715338673 moved nothing. A diagnostic build (research/1209-first-piece-why,
Measure 43721003786) shows the rule itself reads all 16: no decoder
diagnostic, every triangle of the first face level and facing one way, and
an opposite part of the same area to about 1e-15.

The ceilings are now taken per ElementId, only where none of the element's
coverings holds GrossArea, and the area goes on the first, the element's
own covering, written before its pieces. The doc comment's counts are
corrected: 78 ceilings in pieces (73 uncut, 5 cut), the largest piece
Revit's on 45.

Claude-Session: https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut
…d mesh's first top-face part, 16 of 16 equal on the office; the one-project counts match their rows (#1209)

The report, the changelog fragment, the RE-486 row of
docs/one-project-rules.md, the #1209 row of docs/contribution-map.md and
the W7 line of docs/release-1.0-criteria.md. Sections 4 and 5 give the
filtered office Measure 43721768570; rows 2 to 4 wait on the unfiltered
run.

The one-project counts table had drifted from the rows under it: the
office row said 47 for 48 rows (49 with RE-486), BIM-Speed Vitoria 5 for
4, and RE-477's Vitoria spent Revit 2018 project had no line.

Claude-Session: https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut
…, and the one Snowdon sample ceiling the rule reaches has the area of the piece Revit's export creates last (#1209)

Sections 4 and 5 from Measure 43733137320 (b000d8a against 156e2b2,
120 exports): the office's 16 values, nothing else moving but one
ceiling of the 2024 Snowdon sample, which is read against Revit's local
export's body (Measure 43735582243 kept both exports). The changelog
fragment names that ceiling.

Claude-Session: https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 15, 2026 16:36
DrunkOnJava added a commit that referenced this pull request Nov 15, 2026
…s, and the hand-written rows of #1209, #1603, #1695 and #2053 stay as they are on main

The regeneration for the 0.26.0 milestone replaced hand-updated rows with issue
titles that had gone stale. #1698 and #1584 are retitled, since the office's 8
tube beams are Revit's since RE-470, and the control joins are read and an
ordinary wall's Length is written where its curve is not cut back (RE-364
sections 11 and 12), and the map takes those titles. The other rows keep their
text from main, so #2063's edit of the #1209 row does not conflict.

Claude-Session: https://claude.ai/code/session_01TFTgj3B39AgPT5E6mwwWTQ
@DrunkOnJava
DrunkOnJava merged commit 28bda12 into main Nov 15, 2026
37 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1209-ceiling-first-piece branch November 15, 2026 17:16
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