Skip to content

fix(ifc): a turned wall that is a prism less its openings gets its side areas, read against each opening's own rectangle (#1046) - #2043

Merged
DrunkOnJava merged 2 commits into
mainfrom
fix/1046-turned-wall-openings
Nov 15, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
fix/1046-turned-wall-openings

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

A wall turned off the model's axes can now get GrossSideArea, NetSideArea, GrossVolume and Height from its saved mesh, by the rule #1741 added for a wall that is a vertical prism less its openings. That rule compared the wall's faces with the openings' world boxes. Those boxes are exact in the wall's frame only when the wall lies along or across a model axis, so every other wall was refused. The openings are now the corners of their rectangles, read in the wall's own frame.

Motivation

#1046's last comment lists "walls turned off the model's axes" among the walls still without the set, "where a world box is not the opening's own extent".

Changes

  • src/ifc/mesh_wall_quantities.rs:
    • OpeningBox: plan corners and heights, with in_frame.
    • jambs_explain and prism_less_openings take &[OpeningBox] and drop the frame.square() gate.
    • Removed: WallFrame::square, AXIS_TOLERANCE and box_corners.
    • Tests: the existing ones go through an on_axes helper. One test is added for the failure the world box had: a 30° wall where a face 0.3 ft past the opening lies inside the box and outside the opening.
  • src/ifc/saved_meshes.rs: wall_frame_and_openings keeps the four corners instead of reducing them to a world box. An opening must still turn with its wall (OPENING_TURN_TOLERANCE).
  • changelog.d/fixed/1046-turned-wall-openings.md.

Testing

Measure 43682470522: full, 3ff86d94 (every src change) against its merge base d3e70f10, with nordic, r2025, samples and holdout. Rows registered before it was read:

  1. Held. Every export with no turned wall reached is byte-identical: 119 of 120 ifc.sha256, and 102 of 102 diagnostics.json.
  2. Held. The one export that moves is the held-out Revit 2025 teste_export_2025 (counts only). A turned wall there gains its GrossSideArea, NetSideArea, GrossVolume and Height, each equal to Revit's. That file's quantities go from 19 to 23 equal, different stays 0, and no value appears that Revit does not write. No open model has a turned wall the rule reaches.
  3. Held. same-project gates pass on 3ff86d94 (check run).

de378aff after the measured head is the changelog fragment only (the run's figures).

The pure-helper tests ran in fast CI (cargo test --profile ci --lib), with the added turned-opening test. rustfmt --check and changelog.py check pass.

Audit-honesty checklist

  • Changelog fragment; the figures go into it from the run
  • No emojis, private paths or PII

Legal and contribution hygiene

  • Apache-2.0; no Autodesk source (revit-ifc is cited, not copied); no fixtures

Breaking changes

None.

https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut

…de areas, read against each opening's own rectangle (#1046)

jambs_explain and prism_less_openings compared a wall's faces with the
world boxes of its openings, which are each opening's extent in the
wall's frame only on a wall along or across a model axis, so they
refused every other wall. The openings are now passed as the corners
of their rectangles (OpeningBox) and read in the wall's frame, exact at
any turn where the opening turns with the wall (OPENING_TURN_TOLERANCE,
as before).

Claude-Session: https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 15, 2026 06:22
@DrunkOnJava
DrunkOnJava merged commit 74bf77c into main Nov 15, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1046-turned-wall-openings branch November 15, 2026 06:33
DrunkOnJava added a commit that referenced this pull request Nov 15, 2026
# Conflicts:
#	changelog.d/fixed/1046-turned-wall-openings.md
#	src/ifc/saved_meshes.rs
DrunkOnJava added a commit that referenced this pull request Nov 15, 2026
…hing filling it gets its side areas (#1046) (#2045)

## Summary

A wall whose saved mesh is a vertical prism less its openings now counts
the openings rvt-rs cuts through it with nothing filling them
(`WallCutOpening`), as well as its doors' and windows'. Such a wall can
then get `GrossSideArea`, `NetSideArea`, `GrossVolume` and `Height` from
its mesh.

Builds on #2043's `OpeningBox` (merged); main is merged in at
`8cc7d472`, so the diff is this change alone.

## Motivation

#1046's last comment lists, among the walls still without the set,
"walls whose extra faces come from something other than a door's or a
window's rectangle: a profile opening, a wall opening nothing fills, a
face-hosted cut, a floor's void". This takes the wall opening nothing
fills, when it is a rectangle through the wall:
- a rectangular wall opening;
- a door's opening in a second wall;
- a curtain wall's cut.

The other three stay out.

## Changes

- `src/ifc/saved_meshes.rs`, in `wall_frame_and_openings`: each
`WallCutOpening` with `recess: false` whose outline is a rectangle
(`outline_rectangle`: four distinct corners at the ends of its two
ranges) becomes an `OpeningBox`. It is placed along its own axis, turned
`axis_turn_radians` from its wall's placement, with its cut's thickness
about its plane, and must turn with its wall (`OPENING_TURN_TOLERANCE`).
- A recess stops inside the wall, so its back face is no jamb: left out.
- An outline that is not a rectangle makes faces no box explains: left
out.
- `changelog.d/fixed/1046-unfilled-wall-openings.md`.

## Testing

Measure
[43682970477](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43682970477):
full, `9c5b7e6e` (every `src` change of this PR) against #2043's head
`3ff86d94`, with `nordic`, `r2025`, `samples` and `holdout`. Rows
registered before it was read:
1. **Held.** Each wall that gains the set reads equal to Revit's on all
four values. `different` does not rise, and no value appears that Revit
does not write. `Qto_WallBaseQuantities` equal values, before to after:

   | file | equal | different | Revit does not write |
   |---|---|---|---|
   | concrete housing as built | 4,132 to 4,139 (+7) | 0 | 1 |
   | concrete housing at permit | 4,086 to 4,093 (+7) | 0 | 0 |
   | timber housing as built | 4,571 to 4,592 (+21) | 0 | 2 |
   | timber housing at permit | 4,493 to 4,514 (+21) | 0 | 2 |
   | office as built | 37,567 to 37,749 (+182) | 1 | 0 |
   | office at permit | 37,942 to 38,099 (+157) | 1 | 0 |
   | timber office as built | 31,752 to 31,933 (+181) | 1 | 3 |
   | timber office at permit | 31,602 to 31,771 (+169) | 1 | 3 |

That is 745 more equal over two projects. `different` and "Revit does
not write" are unchanged on every file.
2. **Held.** Every other export is byte-identical: 111 of 120
`ifc.sha256` and 102 of 102 `diagnostics.json`. The ninth export that
moves is Snowdon Towers Architectural, which has no Revit export in
Measure. Run
[43686206074](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43686206074)
kept both sides' IFC. Its walls gain 19 values: 6 each of
`GrossSideArea`, `NetSideArea` and `GrossVolume`, and 1 `Height`, over
1,078 walls. They are counted apart, since no Revit export can check
them: Revit's local IFC4 export of Snowdon writes no base quantities at
all.
3. **Held.** `same-project gates` pass on `9c5b7e6e` ([check
run](https://github.com/DrunkOnJava/rvt-rs/runs/132726628695)).

After the measured head, `8cc7d472` merges main (#2043 landed; this PR's
`src` diff is unchanged) and `1a332637` is the changelog fragment's
figures.

## Audit-honesty checklist

- [x] Changelog fragment; the figures go into it from the run
- [x] No emojis, private paths or PII

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk source; no fixtures

## 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