Skip to content

fix(ifc): a ceiling with no GrossArea takes the area of its saved mesh's face where that face is one piece, as Revit's export gives it (#1209) - #2056

Merged
DrunkOnJava merged 3 commits into
mainfrom
fix/1209-cut-ceiling-areas
Nov 15, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
fix/1209-cut-ceiling-areas

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

A ceiling that has no Qto_CoveringBaseQuantities.GrossArea takes the area of its saved mesh's face, where that face is one piece. That covers the ceilings a step cuts, and the uncut ones whose sketch the existing rule does not read. On the BIM4LCA office, 22 cut ceilings now have Revit's GrossArea: 22 of 22 equal, none different, and nothing else that a Revit export checks moves. 15 ceilings of Autodesk's sample projects gain one that no Revit export checks. Report: RE-480. Rows: #1209 (comment 6892736291, registered before the run).

Motivation

A cut ceiling keeps Revit's area of what is left after the cut (RE-297). revit-ifc's GrossAreaCalculator (CLEANROOM.md source 5) takes an override, then the area of the extrusion the body exporter made. From the 26.1 add-in on, it also falls back to the computed area. No saved parameter holds any of these areas; this was re-measured with the area unit read right. On the eight BIM4LCA office and housing files, a one-piece ceiling's saved mesh face equals Revit's GrossArea to 0.1% on all 370 such ceilings, 22 of 22 cut and 348 of 348 uncut (Measure 43701677731). Where the face is in pieces, Revit names one piece and not always the largest, so those ceilings keep none.

Changes

  • src/ifc/saved_meshes.rs:
    • ceilings_without_area selects each IfcCovering whose RevitClass is Ceiling and that holds no GrossArea. The pass reads these ceilings' saved graphics too.
    • one_piece_face_area reads the area. The largest upward and the largest downward horizontal faces must each be one connected piece, of the same area to 0.1%, from a mesh with no decoder diagnostic.
    • add_ceiling_areas writes the area into the ceiling's set, or into a new one. It never replaces a value.
  • reports/element-framing/RE-480-ceiling-saved-face-gross-area.md: the evidence, the run and the rows.
  • docs/release-1.0-criteria.md (the W7 line), docs/contribution-map.md (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), docs/one-project-rules.md (RE-480 rests on the BIM4LCA office), and changelog.d/fixed/1209-cut-ceiling-gross-area.md.

Testing

Measure 43703086686 ran the code commit f6648170 against its merge-base e594a2ba: nordic, r2025, samples and holdout.

  • Office. Qto_CoveringBaseQuantities.GrossArea equal goes 72 → 74, 61 → 71, 67 → 72 and 65 → 70 on the four files: the 22 one-piece cut ceilings. different is 0 → 0 on each.
  • The rest of the census. It moves by those values alone: different stays 1 and "values Revit does not write" stays 0, 0, 3 and 3.
  • What is still missing. 40 values: the 24 roofing coverings of the two as-built files, and 16 ceilings in pieces. The 16 are listed by Tag on the head's kept exports (Measure 43706415189).
  • What moves. 17 of 120 exports: the four office files and 13 sample exports. diagnostics.json moves by exported.total_entities alone.
  • Held-out. The 19 held-out projects' counts are identical on both sides.
  • Samples. One ceiling each on the 2024 to 2027 saves of rac_advanced, rme_advanced and rme_basic, the same value on every save. Snowdon Architectural, which has one save in Measure, gets 3. Each of those equals the lower face of Revit's own body in the local-only Snowdon IFC4 export to 1e-5 (geometry only; that export holds no quantities). 15 values in all, counted on both sides' kept exports (Measure 43706292752).
  • Rows. All five rows registered on 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 are met or reported (RE-480 section 6).

The docs commits after f6648170 (6f638928, a5e711bc) change no code: --carry-proof 43703086686.

Audit-honesty checklist

  • RE-480, the W7 line in docs/release-1.0-criteria.md, the changelog fragment and docs/one-project-rules.md (the cut ceilings rest on the BIM4LCA office). docs/status.md has no covering-quantity line to update.

Legal and contribution hygiene

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

Breaking changes

None.

https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 15, 2026 11:09
@DrunkOnJava
DrunkOnJava merged commit 340c872 into main Nov 15, 2026
36 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1209-cut-ceiling-areas branch November 15, 2026 11:29
DrunkOnJava added a commit that referenced this pull request Nov 15, 2026
… of its saved mesh's face where the mesh is one part with one-piece faces, as Revit's export gives it (#1209) (#2060)

## Summary

A family instance that Revit writes as an `IfcCovering` (`ROOFING`:
ventilation units, snow guards, downpipe casings) with no
`Qto_CoveringBaseQuantities.GrossArea` takes the area of its saved
mesh's face. The mesh must be one connected part, and its largest upward
and downward horizontal faces must each be one piece and agree to 0.1%.
It extends #2056's ceiling rule (RE-480). Rows: #1209 (comment
6893635627, registered before the run).

## Motivation

#1209's roofing coverings. revit-ifc 24.2's `GrossAreaCalculator`
(CLEANROOM.md source 5) gives a family instance the area of the
extrusion its body was exported as. It has no computed-area fallback.

The census (`tools/re/covering_areas_vs_ifc.py`, branch
`research/1209-covering-areas`, Measure 43708847856) paired every
covering by Tag on the BIM4LCA office and housing:
- **With Revit's value.** Of the 72 that are one part with one-piece
agreeing faces, all 72 have that face's area as Revit's `GrossArea`.
- **The vents.** They have 2 to 4 parts and Revit gives them one solid's
area, so the guard refuses them.
- **No value from Revit.** These are the downpipes, 9 per housing file,
and all fail the face test.
- **Which face.** The snow guards (27.5 by 0.13 by 0.53 ft) show that
Revit's value is the horizontal face.

## Changes

-
`reports/element-framing/RE-484-family-instance-covering-gross-area.md`,
`docs/release-1.0-criteria.md`, `docs/contribution-map.md` and
`changelog.d/fixed/1209-roofing-covering-gross-area.md`.
- `src/ifc/saved_meshes.rs`:
- `ceilings_without_area` becomes `coverings_without_area`, taking the
`RevitClass` to select.
- The pass also selects the `FamilyInstance` coverings, requires
`one_part`, and gives them `one_piece_face_area`.
- The areas are collected for both kinds and written by
`add_covering_areas` (formerly `add_ceiling_areas`).

## Testing

Measure
[43709928629](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43709928629)
ran the code commit `049e4593` against its merge-base `340c8727`:
nordic, r2025, samples and holdout.

- **Gained.** `Qto_CoveringBaseQuantities.GrossArea` equal rises by 12,
12, 13, 11, 13 and 11 on the two as-built office files and the four
housing files: 72, all equal. `different` stays 0 on the housing and 1
on the office.
- **Nothing extra.** "Values Revit does not write" is unchanged (1, 0,
2, 2 and 0, 3), and no covering Revit gives no value gains one.
- **Refused.** The 10 vents (2 to 4 parts each, where Revit's value is
one solid's) and the 36 downpipes (faces that do not agree, and no value
from Revit) keep none. These are named and counted in RE-484 section 3.
- **What moves.** 6 of 120 exports: those six files. Every sample of
every release is identical, so the rule writes nothing on a model with
no Revit export.
- **Held-out.** All 65 held-out output files are identical.
- **Diagnostics.** They move by `exported.total_entities` alone, one per
covering given a new set.
- **Gates.** `same-project gates` passes on `049e4593`.
- **Rows.** All five rows on #1209 are met or reported (RE-484 section
6).

The docs commit `c8583cc5` changes no code: `--carry-proof 43709928629`.

## Audit-honesty checklist

- [x] RE-484, the W7 line in `docs/release-1.0-criteria.md`, the #1209
row of `docs/contribution-map.md` and the changelog fragment. The rule
rests on two BIM4LCA buildings, so it is not on
`docs/one-project-rules.md`; RE-484 section 7 says whose families it
rests on.

## Legal and contribution hygiene

- [x] Apache-2.0. revit-ifc read and cited only (CLEANROOM.md source 5).
No Autodesk SDK source or internals.

## Breaking changes

None.

https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut
DrunkOnJava added a commit that referenced this pull request Nov 15, 2026
…ort names, the first part of its saved mesh's first face (#1209) (RE-486) (#2063)

## 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](#1209 (comment))),
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 (#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 #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](https://github.com/DrunkOnJava/rvt-rs/actions/runs/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

- [x] RE-486, the W7 line, the #1209 row, the one-project row and the
changelog fragment. The rule rests on one building, four saves by Revit
2024, and is listed on `docs/one-project-rules.md`.
- [x] Sections 4 and 5 of RE-486 are completed from the unfiltered
Measure.

## Legal and contribution hygiene

- [x] 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
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