Skip to content

feat(ifc): write the rectangular wall openings Revit's export has that nothing fills (#1165) (RE-321) - #1305

Merged
DrunkOnJava merged 12 commits into
mainfrom
re/1165-unfilled-openings
Nov 4, 2026
Merged

DrunkOnJava merged 12 commits into
mainfrom
re/1165-unfilled-openings

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Writes the openings Revit's IFC4 export of the BIM4LCA office has for rectangular wall openings and that no door or window fills: 30 of 30 as built and 24 of 24 at building permit, each voiding the wall Revit's export voids, tagged with the opening's ElementId, named for the wall, with Revit's box (within 0.003 ft), GlobalId, Pset_OpeningElementCommon.Reference and Pset_EnvironmentalImpactIndicators.Reference (the wall's type name) and Qto_OpeningElementBaseQuantities Width, Height and Depth, all equal to Revit's. Fire hose cabinets and curtain-wall cuts are measured and left out (each also writes openings Revit's export lacks, or a wrong box, with nothing read to tell them apart); RE-321 holds the rules and every number.

Motivation

Revit's export holds 224 openings as built (220 at permit) that nothing fills; rvt-rs wrote 27 of them. Their bodies void walls (W6) and their properties are Revit's (W7). This is Refs #1165, not Closes: a door's further cut in a second wall (39 as built), a door's cut in itself (4), a wall's own profile (2), the fire hose cabinets (39, exact, with 1 opening Revit's export lacks as built and 2 at permit) and the curtain-wall cuts (70, box exact on 52) are left, with the evidence, in RE-321 sections 4 and 5.

Changes

  • src/research/native_wall_cuts.rs: the steps of a wall's native record that name a cutting element, in the record's order (Revit's numbering of the wall's openings), and a rectangular opening's saved corners.
  • src/ifc/wall_cut_openings.rs, IfcEntity::WallCutOpening (new last variant of the non-exhaustive enum) and its writer in step_writer.rs; the GlobalId is revit-ifc's OpeningUtil hash of the opening's number, the wall's GlobalId and the opening record's.
  • tools/re/unfilled_openings_vs_ifc.py (new scorer, run by Measure on every model; one generic line counts apart an opening rvt-rs writes that Revit's export of the file lacks but its export of a sibling file holds, the maintainer's decision of 2026-11-03, as RE-253), probes/examples/probe_re321_unfilled_openings.rs (the census), reports/element-framing/RE-321-unfilled-openings.md, a changelog fragment, the 1.0 criteria figures it moves.

Testing

No unit tests (banned). End to end on real files against Revit's own IFC4 exports; the scorer, probe and commands are in RE-321 section 6.

  • Verified end to end on real Revit files, with the script and probe that reproduce it
  • Measure, unfiltered (-f base=main -f nordic=true -f r2025=true -f samples=true -f holdout=true), this head's merge with main at 0e0582e against main: 41748430211
  • The witness verdicts: Core Interior (63 of 63 unfilled openings, as main), RE1 Architecture, Einhoven, the 23 R2025 models and every held-out model's counts are byte for byte main's; nothing in their witness observations moves
  • tools/check-local.sh passes: CI runs it, nothing is built locally on this checkout
  • Not a performance change

Audit-honesty checklist

  • The docs claim only the rectangular openings
  • Changelog fragment under changelog.d/added/
  • What is left is in RE-321 and above
  • No emojis, private paths or personal email addresses
  • A reverse-engineering finding: probe under probes/examples/ and the report

Legal and contribution hygiene

  • Licensable under Apache-2.0
  • No Autodesk proprietary source, decompiled internals or NDA content. Clean-room declaration: the findings rest on Revit's own IFC4 exports of the public BIM4LCA models, the models' bytes read through rvt-rs, buildingSMART IFC4, and revit-ifc (Source/Revit.IFC.Export/Utility/OpeningUtil.cs, class OpeningUtil, methods CreateOpeningGUID, AddOpeningsToElement and CreateOpening, CLEANROOM.md source 5), read for what its export writes (the opening numbering, the GUID key, the recess test) and described in my own words; none of its code is copied.
  • No new fixtures

Breaking changes

None. IfcEntity is #[non_exhaustive] and the new variant is last.

Screenshots or output samples

Measure 41748430211, head against main, the two office files (the only models whose scorers move):

as built at permit
rectangular openings written / Revit's 30 / 30 24 / 24
box within 0.01 ft, GlobalId, name, type, both References equal 30 24
property values equal, before to after 44,163 to 44,223 44,339 to 44,387
quantities equal, before to after 29,448 to 29,538 29,762 to 29,834
values or quantities missing or different unchanged unchanged
written that Revit's export lacks 17, unchanged 16, unchanged, and 1 counted apart
  • The one counted apart (2793737 in wall 2114950, permit). Its record, its wall's step and the wall's extent are byte for byte the same in the as-built and permit .rvt files, and Revit's export writes it as built and not at permit; no other opening overlaps it. The scorer's rule is generic (an unfilled opening rvt-rs writes that Revit's export of the file lacks but its export of a sibling file holds is counted on its own line); no ElementId is in production code or in any list. The maintainer chose to count it apart.
  • Not mine: the 17 and 16 extras (9 and 8 floor voids, 8 none in IfcWall openings) and the two terrain files' 2 each are in main's export in the same run.
  • The Autodesk samples gain the same openings (Rac Basic +2 and Rac Advanced +1 in each of 2024 to 2027, Snowdon Towers Architectural +9). Revit's own IFC4 export of Snowdon's architectural file holds all 9 (by Tag and host, Measure 41754617363 against that export, local only); the others have no export in reach: NOT MEASURED.

Related issues

Refs #1165. Left: a door's further cut in a second wall, a door's cut in itself, a wall's own profile, and the cabinets and curtain-wall cuts (measured, withheld).

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 02:04
@DrunkOnJava
DrunkOnJava merged commit cc085b4 into main Nov 4, 2026
35 of 36 checks passed
@DrunkOnJava
DrunkOnJava deleted the re/1165-unfilled-openings branch November 4, 2026 02:05
DrunkOnJava added a commit that referenced this pull request Nov 4, 2026
…d one whose corners do not lie in the wall's plane is left out (#1165) (RE-321) (#1310)

## Summary

Follow-up to #1305 from its second read, which came back after #1305 had
landed. #1305's openings took only walls drawn as one extrusion, so in a
wall #1304 (RE-320) draws stepped, which #1305's Measure run predates, a
rectangular wall opening was left out without a word. A stepped wall
keeps its whole prism as `extrusion`, and an opening voids every piece
of its body (#1304's review checked this with IfcOpenShell), so
`host_of` now accepts a wall whose `BodyHeightSource` is
`wall_top_stepped_at_covering_floor`. An opening whose corners spread
across the wall by more than 0.02 ft is now left out, which also fails
closed on a wall whose axis was not read. The contribution map no longer
says curtain-wall cuts and fire hose cabinets are written: #1305
withholds them.

## Changes

- `src/ifc/wall_cut_openings.rs`: `is_stepped`; `host_of` accepts
stepped walls; the plane-spread check.
- `docs/contribution-map.md`: the #1165 row.
- `changelog.d/fixed/1165-stepped-wall-openings.md`.

## Testing

Unfiltered Measure on this head against `main` (cited below once in):
the office's rectangular openings must stay 30 of 30 as built and 24 of
24 at permit, extras unchanged, every other model byte-identical.

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk proprietary content.

## Related issues

Refs #1165.
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Automated Claude Code review (the maintainer's review agent, read after merge; it read the code and run 41748430211): two blocking items, fixed in #1310. The 30 and 24 office openings were measured before the stepped wall tops (#1304) landed. A stepped wall has a solid shape, so an opening in one would have been dropped without a word: the openings pass now accepts a stepped wall, and #1310 measured both files again. The contribution map also said fire hose cabinets and curtain-wall cuts are written, which this PR withholds; it now lists them as remaining. Also in #1310, an opening is written only when its two corners lie in its wall's plane. That also refuses a wall whose axis was not read, where the plane check would otherwise run against the wall's wider box.

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