Skip to content

feat(ifc): a wall that is a prism less its openings gets its side areas, gross volume and height (#1046) - #1741

Merged
DrunkOnJava merged 8 commits into
mainfrom
pilot/13-wall-side-area-gate
Nov 12, 2026
Merged

DrunkOnJava merged 8 commits into
mainfrom
pilot/13-wall-side-area-gate

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

A wall whose saved mesh has more than four vertical faces gets Qto_WallBaseQuantities.GrossSideArea, NetSideArea, GrossVolume and Height where the mesh is a vertical prism less the openings rvt-rs cuts in it. Today such a wall gets NetVolume alone (MAX_VERTICAL_FACES, RE-388, RE-399). The wall takes the four quantities only when all of these hold:

  • it has at least one opening rvt-rs cuts (a door's or a window's rectangle);
  • every vertical face beyond the four of a prism lies within one opening's box: it is a jamb;
  • every horizontal face strictly between the mesh's lowest and highest point is the top or the bottom of an opening that spans it along the wall and across it;
  • the mesh has no sloped face, the wall runs along the model's axes, and its base is not attached (no JoinToRoofGStep with m_baseOrTop 0 in a record that was read).

A wall of at most four vertical faces keeps today's rule, and a wall with no opening keeps the four-face gate. No value changes: the walls that qualify gain the four quantities, 320 to 348 values per BIM4LCA office file and 40 to 152 per housing file, and nothing else in any export moves.

Motivation

#1046: Revit's export gives most walls the full quantity set and some NetVolume alone, and the four-face gate left out every wall with a door or a window in it. On Revit's own bodies of the BIM4LCA office, walls that are a prism less their openings with no base join carry the full set 170 of 170, and those with a base join 0 of 5.

The first version of this change had no opening condition. Its run (43073639246) read about 1,860 more quantities equal and none different, and wrote values Revit omits on two concrete-housing walls and the held-out house. Both housing walls have no opening: their extra faces come from something else, and nothing read tells them from the 36 plain prisms Revit does give the set (base attachment, end-join face count and side alignment were each refuted by a counter-example, recorded on #1046). So the rule is narrowed to walls where an opening explains every extra face, and what it leaves out is listed under Testing.

Changes

  • src/ifc/mesh_wall_quantities.rs: wall_mesh_quantities takes the wall's frame, the world boxes of the openings cut in it and whether its base is attached. Two pure predicates decide the new case: prism_less_openings (the horizontal faces) and jambs_explain (the vertical faces beyond four); largest_side_areas is side_areas without the face-count gate. Five failure-first tests of the predicates: a sloped face, a face no opening reaches, an opening that does not span the face or end at its height, a wall with no opening, and a face outside every opening.
  • src/ifc/saved_meshes.rs: wall_frame_and_openings collects each wall's turn and the world box of every element it hosts, as the writer emits the opening.
  • src/research/native_wall_cuts.rs: walls_with_no_base_join names only walls whose record was read and holds no base join, so a failed read never counts as no base join.
  • docs/supported-profile.md, docs/evidence.md, docs/release-1.0-criteria.md state the widened gate; a changelog fragment is added.

Testing

Two unfiltered Measure runs with the held-out pairs; rows registered before each read, and both reads are on #1636. The first (43102116319, 672caa6a against b647c60b) predates #1769, which re-meshes trimmed faces. The second (43115751418, 3392ff19 against main at 3abb42f0, kept exports) is the landing evidence, and every figure of the first repeats in it.

  • None different on any model. On each of the 17 files whose Revit export writes base quantities, no wall gains a quantity that Revit's export of the same wall leaves off: "rvt-rs quantities Revit does not write" is unchanged on every one (the concrete housing as built stays at 7, the held-out house at 0).
  • Each of the four names gains, read equal: +80 on the office as built (GrossSideArea 299 to 379 of 579), +87 at permit, +78 and +80 on the timber office (Height +75 at permit), +38 and +36 on the concrete housing, +11 and +10 on the timber housing, +4 on the held-out house, +2 on each of the four held-out pairs and +3 on each of the four held-out office pairs. 1,771 quantities over 17 files.
  • same-project gates: pass. The advisory semantic check reads pass on the second run.
  • 37 of 126 exports move, the same in both runs.

Counted apart, 1,880 values where no Revit export can say whether Revit writes them. They are the same rule on files with no oracle, not errors and not checked:

  • 292 on three models: Core Interior 71 walls (its reference export is a slimmed file with no property set and no IfcElementQuantity on any of its 360 walls), RE1 Architecture 1 wall (Revit's export writes property sets and no IfcElementQuantity on any element: base quantities were off in its setup, RE-242) and Einhoven 1 wall (Measure holds no Revit export of it). None is a wall where a Revit export leaves the set off while writing others.
  • 1,588 on 17 Autodesk sample saves of 2024 to 2027, read by element from the second run's kept exports: nothing that exists on main is changed or removed, and only the four names on IfcWall are added (21 walls on each rac_advanced save, 2 on each rac_basic, 30 on each rme_advanced and rme_basic, about 65 on Snowdon Towers Architectural).

Core Interior's witness observations are refreshed in a commit of their own, taken from the second run's files; both verdicts replay PASS and are unchanged.

What it leaves out: walls with no opening and more than four vertical faces (the two housing walls among them); walls whose extra faces come from a profile opening, a wall opening nothing fills, a face-hosted cut or a floor's void; walls turned off the model's axes; walls with an attached base (26 and 27 on the office, which Revit does give the set).

  • Built, linted and tested by CI on this head; nothing was built on a workstation.

First drafted by an automated worker from the analysis on #1046; the narrowing, the measurement and this description are the maintainer session's.

Part of #1046.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Measured in full with the held-out pairs (run 43073639246, head 2ac77996 against b647c60b; both same-project gates pass). It does not go forward as it is: it gains a great deal with nothing different, but it writes side quantities on at least two walls where Revit's export writes none.

Model Quantities equal, before after different values Revit does not write
Office as built 36,321 36,651 (+330) 9 to 9 0 to 0
Office at permit 36,680 37,038 (+358) 9 to 9 0 to 0
Timber office as built 30,696 31,017 (+321) 10 to 10 3 to 3
Timber office at permit 30,291 30,614 (+323) 28 to 28 3 to 3
Concrete housing as built 3,838 3,991 (+153) 0 to 0 7 to 11
Concrete housing at permit 3,792 3,942 (+150) 4 to 4 0 to 0
Timber housing as built 4,465 4,509 (+44) 0 to 0 2 to 2
Timber housing at permit 4,420 4,460 (+40) 0 to 0 2 to 2
Held-out house (AA single dwelling) 312 332 (+20) 0 to 0 0 to 12
Held-out pairs 2024 to 2027 99, 101, 101, 86 +8 each 1 to 1 0 to 0
Held-out office pairs 2024 to 2027 83, 83, 83, 69 +12 each 3 to 3 0 to 0
  • On the office as built the gain is GrossSideArea and GrossVolume +80 each, Height and NetSideArea +85 each, of 579 walls; no wall quantity is different on any model.
  • The values Revit does not write: on the concrete housing as built, Height and NetSideArea on walls 1968204 and 1972068, where Revit's Qto_WallBaseQuantities holds Length, NetVolume and Width only; on the held-out house, 12 values whose walls the run does not name (only its counts are uploaded).
  • Core Interior gains about 300 wall quantities that no Revit value scores (its export writes no base quantities), so both witness observations would need a refresh.
  • The advisory semantic diff reads fail on a difference the description does not state.

So the rule "a prism less its openings, base not attached" is right on every wall it reaches in the eight BIM4LCA office and timber files and wrong on two housing walls and some of the held-out house's. Next on #1046: read the records of 1968204 and 1972068 beside housing walls of the same shape that have the full set. This draft stays a draft until a rule that leaves those out is measured.

…ea-gate

# Conflicts:
#	docs/evidence.md
#	docs/release-1.0-criteria.md
#	docs/supported-profile.md
@DrunkOnJava DrunkOnJava changed the title feat(ifc): give a wall of a prism less its openings its side areas (#1046) feat(ifc): a wall that is a prism less its openings gets its side areas, gross volume and height (#1046) Nov 11, 2026
…ea-gate

# Conflicts:
#	docs/release-1.0-criteria.md
#	docs/supported-profile.md
…antities 71 walls gain (#1046)

Taken from Measure 43115751418's witness files for 3392ff1 (byte-identical to what CI writes): IfcQuantityArea 1099 to 1241, IfcQuantityLength 1369 to 1440, IfcQuantityVolume 1107 to 1178 on both artifacts. tools/ci/witness-verdict.py replays PASS with three matches on each, and both verdict files are unchanged. No src change.
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 11, 2026 23:28
…steps (#1046)

walls_with_no_base_join made its own extract_graphs call over the walls' native records, a second pass over the file on every export that draws walls from their saved meshes, while the cut steps of the same walls are read from the same records. One walk now gives both, memoised on the file's handle beside the steps, so the saved-mesh pass asks for no record the openings already read. The set it returns is unchanged: a wall whose record was read as a wall's and holds no JoinToRoofGStep that may join the base.
…asure read (#1046)

The entry said the rule was measured on Revit's own bodies of one project and not yet on the saved mesh. Measure 43115751418 has read it: 1,771 values equal over 17 files with a Revit export that writes base quantities, none different and none Revit omits, and 1,880 more written where no Revit export can check them.
…ea-gate

# Conflicts:
#	docs/evidence.md
#	docs/release-1.0-criteria.md
#	docs/supported-profile.md
@DrunkOnJava
DrunkOnJava merged commit 80cd04a into main Nov 12, 2026
36 checks passed
@DrunkOnJava
DrunkOnJava deleted the pilot/13-wall-side-area-gate branch November 12, 2026 02:35
DrunkOnJava added a commit that referenced this pull request Nov 13, 2026
… height, not as tall as its start plus its top (#1046) (#1939)

## Summary

`wall_frame_and_openings` (#1046, since #1741) builds the boxes of the
openings a wall's saved-mesh quantities set aside. It read an opening's
`z_range_feet` as `[start, start + height]` and then put the box's top
at `start` plus that, so a door or window whose opening starts above its
placement (RE-93) had a box too tall by its start. The box is now the
opening the writer cuts: from its start, as high as it is
(`step_writer::opening_solid_position` reads `z_range_feet` the same
way).

## Motivation

Found by the batch 9 export audit (a DeepSeek checker's lead, re-read
against the code by Claude): `src/ifc/saved_meshes.rs:1418-1443`. A box
too tall can claim faces of the wall above a window as the opening's,
which can move that wall's `Qto_WallBaseQuantities` side areas.

## Changes

- `src/ifc/saved_meshes.rs`: `[start, height]` is taken as stored.
- `changelog.d/fixed/opening-box-height.md`.

## Testing

The unfiltered Measure against `main` (every model and scorer, with the
samples for the same-project gates) is in this PR's comments. It says
which exports move and whether each moved `Qto_WallBaseQuantities` value
is closer to Revit's.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A user-visible change has its entry as a fragment under
`changelog.d/fixed/`
DrunkOnJava added a commit that referenced this pull request Nov 15, 2026
…de areas, read against each opening's own rectangle (#1046) (#2043)

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

`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

- [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 (revit-ifc is cited, not copied);
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