Skip to content

feat(ifc): a wall's NetVolume, NetSideArea and, where its sides agree, GrossSideArea and GrossVolume come from the mesh Revit saved for it, as Revit's export writes them (#1046) (RE-388) - #1629

Merged
DrunkOnJava merged 6 commits into
mainfrom
feat/wall-mesh-quantities
Nov 10, 2026

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

A wall's NetVolume, NetSideArea and, where its two sides agree, GrossSideArea and GrossVolume come from the mesh Revit saved for it, as Revit's export writes them: the mesh is the wall's solid joined to the walls beside it and cut by what it hosts, which is what revit-ifc takes the quantities from. A wall with five or more vertical faces gets no side area, since Revit's export writes only a volume on 26 of the office's walls that nothing but that count tells apart.

Motivation

#1046 holds the base quantities Revit computes from its joined geometry, and its walls are the largest part of what is missing: the BIM4LCA office's census leaves about 2,500 wall quantities missing as built. The probe probe_1046_wall_mesh_quantities (Measure 42677569083, scorer wall_mesh_quantities_vs_ifc) meshes the saved graphics of every wall and compares with Revit's Qto_WallBaseQuantities: of the office's 581 walls with Revit values as built, the mesh volume is Revit's NetVolume on all 581 (570 within the scorers' 1e-5, 11 small walls within 1e-4, none wrong); with the mesh closed and in one piece, NetSideArea is Revit's on 499 of 499 and GrossSideArea on 499 of 499 (one wall of 1,087 aside at permit, whose sides differ); and all 138 walls of the 23 Revit 2025 models with walls are equal on every quantity. The report is RE-388.

Changes

  • src/ifc/mesh_wall_quantities.rs: wall_mesh_quantities, the volume of the wall's mesh and the areas of its vertical faces, none unless every face is a plane and the faces close into one piece wound one way; a gross area only where the two largest vertical faces face apart and agree on it.
  • src/ifc/saved_meshes.rs: the saved-mesh pass reads the graphics of every wall in the same batches as the boxes it replaces and add_wall_quantities gives each wall that holds a Qto_WallBaseQuantities the four it lacks.
  • tools/re/qtos_vs_ifc.py, tools/ci/scrub-holdout-results.sh: the census counts apart a wall's volume and side areas where the two exports give the wall different types and its record confirms rvt-rs's, as it counts its Width apart (RE-253, W7: a wall's Width differs from Revit's on 1 of 3 walls of a held-out Revit 2025 model #1048; the maintainer chose this on 2026-11-09 through the question tool), and the held-out scrub keeps the count line.
  • research/witness/magnetar-2024-core-interior*/observations/rvt-rs.json: Core Interior's quantity entity counts, refreshed from the Measure and replayed to PASS.
  • changelog.d/added/388-wall-mesh-quantities.md, the report RE-388, and the W7 lines of docs/supported-profile.md, docs/release-1.0-criteria.md and docs/evidence.md.

Testing

Unit tests are banned in this repository except for pure helpers: mesh_wall_quantities is one (no file, process or clock I/O), with eight failing-case-first tests (a missing face, two pieces, a bent face, no faces, a face with a hole, sides that disagree). Everything else is shown end to end:

  • full / CI passed on the final head
  • An unfiltered Measure with every flag and holdout=true, run 42690731323 (commit a68a7562 against main at ae08c1da, 118 exports; the commits after it change only the report and docs). 63 exports move. The office's equal quantities go 31,904 to 32,924 of 39,754 as built (NetVolume 100 to 519 of 607, NetSideArea 100 to 303, GrossSideArea and GrossVolume 100 to 299 of 579) and 32,196 to 33,243 of 40,006 at permit; different stays 1 and the quantities written that Revit's export does not stay 0 on every model with Revit's export. The 26 office walls on which Revit writes only a volume get no area. The 20 Revit 2025 models with walls gain 84 equal quantities, different 0; the held-out counts gain equal values with different unchanged. Only the quantity census, the held-out counts, the MCP answers and Core Interior's witness observations change; decoded.parameter_value_count, every body scorer and the property census are byte-identical. On held-out teste_export_2025 two values were first scored different (a GrossVolume at 0.667 and a NetVolume at 0.8 of Revit's) and are on the one wall whose export names another type than its saved file (W7: a wall's Width differs from Revit's on 1 of 3 walls of a held-out Revit 2025 model #1048); the census counts them apart and different is 0 there. RE-388 section 3.
  • If this touches the IFC exporter: Core Interior's two witness observations are refreshed from that run and tools/ci/witness-verdict.py replays PASS with three matches on each artifact.

Audit-honesty checklist

  • README / docs reflect the current state after this PR: the report, and the W7 lists of the supported profile, the 1.0 criteria and the evidence page.
  • A user-visible change has its entry as a fragment under changelog.d/added/.
  • If a limitation was resolved, the docs are updated: RE-388 section 3 and the three pages above.
  • If a new limitation was introduced, it is documented in the PR body and in-code: a wall with a curved face, a mesh that does not close or two pieces gets none, a wall with five or more vertical faces gets no area, and a gross area is left out where the two sides differ (RE-388 section 4).
  • Commit messages describe what changed and why
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files
  • Reverse-engineering finding: the report RE-388.

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0 (see CONTRIBUTING.md)
  • This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see CLEANROOM.md). Contributor declaration: every fact here comes from byte observations of the saved graphics of the BIM4LCA office's files (CC BY-SA 4.0) and puzzbobb's Revit 2025 models with Revit's own IFC4 exports of them; the quantities' definitions are those RE-270 read in Autodesk's open-source exporter, revit-ifc, cited there, nothing copied.
  • No new test fixtures

Breaking changes

None.

Related issues

Refs #1046 (W7, walls), RE-270, RE-293, RE-387.

@DrunkOnJava
DrunkOnJava force-pushed the feat/wall-mesh-quantities branch from 82ba4c9 to 07cfc97 Compare November 9, 2026 19:12
…, GrossSideArea and GrossVolume come from the mesh Revit saved for it, as Revit's export writes them (#1046) (RE-388)
…ll quantities on the office and the Revit 2025 models (#1046) (RE-388)
…s, as Revit's export writes only a volume of some such walls (#1046) (RE-388)
… in common with the rest, and no more (#1046) (RE-388)
…re the two exports give it different types, and Core Interior's witness observations take the wall quantities (#1046) (RE-388)

A held-out wall whose export shows an unsaved state (RE-253, #1048) gets its Width counted apart; its volume and side areas follow the saved state its mesh holds, so they are counted apart on the same confirmed type difference. Core Interior's rvt-rs witness observations are refreshed from the Measure of the code commit and the verdict replays PASS.
@DrunkOnJava
DrunkOnJava force-pushed the feat/wall-mesh-quantities branch from 1d83c70 to a68a756 Compare November 9, 2026 20:12
…rofile, the 1.0 criteria and the evidence page name the wall quantities it writes (#1046) (RE-388)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 10, 2026 16:41
@DrunkOnJava DrunkOnJava reopened this Nov 10, 2026
@DrunkOnJava
DrunkOnJava merged commit a8a126f into main Nov 10, 2026
98 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/wall-mesh-quantities branch November 10, 2026 17:20
DrunkOnJava pushed a commit to puzzbobb/rvt-rs that referenced this pull request Nov 10, 2026
…ecode ellipses, curved ruled surfaces and repeated ring points (RE-385)

Squashed from puzzbobb's two commits (e0cf3524, 5d12789e) and rebased by the maintainer onto main with DrunkOnJava#1629 and DrunkOnJava#1637; the conflicts were the imports, the stand-in comment and the BodySource test in src/ifc/saved_meshes.rs (a roof's level block and a turned box are both stand-ins, both kept) and the addenda at the end of docs/format-reconnaissance.md (both kept).
DrunkOnJava added a commit that referenced this pull request Nov 10, 2026
…ed code, against main after the wall quantities landed (#1046) (RE-396) (#1638)

## Summary

RE-396's report and the 1.0 criteria's RE-396 sentence quoted the
Measure made before #1637 was rebased onto #1629, which had landed the
wall quantities in between. They now carry the Measure of the rebased
code (run
[42864169952](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42864169952),
`376035fb` against `main` at `a8a126fb`): the office's equal quantities
go 32,924 to 33,181 of 39,754 as built and 33,243 to 33,509 of 40,006 at
permit, `Qto_PlateBaseQuantities.Width` 0 to 257 of 257 and 0 to 266 of
266. Different (1), the quantities written that Revit's export does not
(0) and the 22 exports that move are as the earlier run read.

## Motivation

#1637 merged with the earlier numbers in place because its rebased
Measure was still running; this makes the pages and the report say what
the merged code measured.

## Changes

- `reports/element-framing/RE-396-plate-width.md`,
`docs/release-1.0-criteria.md`: the run, the commits and the equal
counts.

## Testing

Documentation only; `tools/ci/measured_numbers.py` and
`tools/ci/api-doc-ids.py` pass.

- [ ] `full / CI passed` on the final head
- [x] No output changes: no `src/` file moves.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR: the report
and the criteria page.
- [x] A user-visible change has its entry as a fragment: none
(documentation only).
- [x] If a limitation was resolved, the docs are updated: n/a.
- [x] If a new limitation was introduced, it is documented: none.
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files
- [x] Reverse-engineering finding: the report RE-396 (existing).

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0 (see
`CONTRIBUTING.md`)
- [x] This PR contains no Autodesk proprietary source, decompiled
internals, or NDA'd SDK content (see `CLEANROOM.md`). Documentation of
numbers measured in an earlier PR; no new source material.
- [x] No new test fixtures

## Breaking changes

None.

## Related issues

Refs #1046 (W7), RE-396, #1637.
DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
…batch it is meshed in, so the default export no longer holds every wall's graph at once (#1690) (#1691)

## Summary

The saved-mesh pass held every owner's decoded graph from its first read
to its last batch. Since #1629 (RE-388) the owners include every wall,
whose graph is about 1.6 MiB (#1429), so the default export of a Revit
2023 to 2027 file took 1.4 to 4.4 times the peak memory of 0.17.0 (Core
Interior 305 to 647 MiB, Snowdon Towers Architectural 1,072 to 3,964).
The owners that name nothing and that no owner names are now let go
after the first read and read again in one pass whose callback meshes a
buffer of about 20,000 graph objects (about 95 MiB) at a time; the
batches that follow see only owners that name symbols or owners, kept as
before. It is meant to change no body.

## Motivation

Fixes #1690, found by the 0.18.0 release's baseline Measure (run
42949360321): the table, the bisect to a8a126f and the rows registered
before this run are on that issue. #1191 told the maintainer 1% to 17%
more time and up to 59% more peak memory; the measurement at `main` was
1.13 to 2.12 times the time and 1.42 to 4.37 times the memory on the 28
samples of Revit 2023 to 2027.

## Changes

- `src/research/native_saved_scene.rs`,
`extract_in_batches_with_control` only: the first read keeps the
references of every owner and the graph of the owners that name
something; one `extract_graphs` over the owners that name nothing and
that no owner names meshes a buffer of them at `OWNER_OBJECT_BUDGET`
graph objects as it reads (`mesh_buffer`); an owner a batch's owners
name that was not kept is read with that batch (and kept, as named
owners are: they are never dropped, as before, and their graphs are not
counted in the batch).
- `changelog.d/fixed/1690-saved-mesh-owner-memory.md`.
- The first design read each owner again with its batch, one walk per
batch; rvtDevelop's review showed each call walks every partition that
holds a selected id (about 30 more walks on Snowdon), and this is the
streaming design they proposed.

## Testing

No unit tests added. Measured end to end on Measure's models: the
unfiltered run of this head against `main` at 8334726, every flag, with
timing (run 42954375538), judged against the rows registered on #1690;
the full result is there (comment on #1690).

- 0 of 126 exports move against `main` (byte-identical) and no
diagnostics line differs.
- Peak memory: Core Interior 647 to 437 MiB, the office as built 2,051
to 1,432, Snowdon Towers Architectural 3,960 to 2,099; time +1% to +3%;
the 28 samples of Revit 2023 to 2027 0.97 to 1.04 in time and 0.53 to
1.05 in peak. One row missed (Core Interior 437, not 400 or less). The
growth still left against 0.17.0 (1.4 to 4.4 times) is #1694.
- `full / CI passed`, the same-project gates and the semantic diff pass
on 8cf93e9.

- [x] `tools/check-local.sh` passes: not run locally (no local builds
here); CI's full run is green on this head (`rustfmt --check` on the
file passes)
- [x] Verified end to end on real Revit files: Measure run 42954375538,
above
- [x] If this touches the IFC exporter: the witness verdicts replay or
the changed observations are refreshed: no export moves (0 of 126
byte-different)
- [x] If this is a performance change: the run above reports time and
peak against `main` for every file

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR: the
module's own documentation names the new batching
- [x] A user-visible change has its changelog fragment under
`changelog.d/fixed/`
- [x] No emojis, private paths or personal addresses in committed files

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0
- [x] No Autodesk proprietary source, decompiled internals or NDA'd SDK
content
- [x] No new test fixtures

## Breaking changes

None. Peak memory falls and time rises by the further read of the owners
per batch; no output changes if row 1 holds.
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