Skip to content

ci(measure): the held-out summary keeps the mesh-body, box-body and saved-mesh counts per IFC class - #1340

Merged
DrunkOnJava merged 1 commit into
mainfrom
ci/holdout-mesh-counts
Nov 4, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
ci/holdout-mesh-counts

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

The held-out summary (tools/ci/scrub-holdout-results.sh) keeps the totals and the per-IFC-class rows of mesh_bodies_vs_ifc, box_bodies_vs_ifc and saved_meshes_vs_ifc, as counts.

Motivation

A rule that writes new bodies runs against the held-out models before it lands (the Measure holdout step), and a body drawn from a saved mesh is scored by those three scorers. The summary kept none of them, so a change that moved eight held-out exports (#1338, RE-329: ifc.sha256 changed on rvt-holdout 2024 to 2027 and rvt-holdout-office 2024 to 2027) left no count of how many bodies went from box to mesh or whether they were right under the vertex test ("ref on ours"): every held-out counts.txt was byte-identical before and after.

Changes

  • tools/ci/scrub-holdout-results.sh: three more loops, each keeping only lines that are numbers beside an IFC class name, prefixed mesh bodies:, box bodies: and saved meshes::
    • mesh_bodies_vs_ifc.txt: the saved_graphics_mesh bodies scored: N; in Revit's export M line, the IfcX: N bodies, every Kth scored note, and the class rows (n, volume within 1% and 0.01%, within 0.01 ft and 0.001 ft, "ref on ours", median volume ratio).
    • box_bodies_vs_ifc.txt: the record-box bodies: N; fill = ... line, the class rows and the total.
    • saved_meshes_vs_ifc.txt: the class rows and the total.
  • The rows under a class, which name a family and type, and every per-element line (ElementId, name, distance) do not match and are dropped. The header comment says so.

Testing

Unit tests are banned in this repository; none added. The regexes on a real scorer output, here r2025-12 (a model with a licence to redistribute, Measure 41791824472), through the same grep -E and sed the script runs. The files hold, among others, the lines Window-Fixed:24" x 36" (a family and type row) and 12560 IfcWindow ... (an element line); neither survives:

mesh bodies: saved_graphics_mesh bodies scored: 4; in Revit's export 4
mesh bodies: IfcWindow                         3       3        3        3        3           3  1.0000
mesh bodies: IfcDoor                           1       1        0        1        0           0  1.0002
box bodies: record-box bodies: 9; fill = Revit's body volume / its bounding box
box bodies: IfcBuildingElementProxy            9       0       0       0       9       0       0    0.144
box bodies: total                              9       0       0       0       9       0       0
saved meshes: IfcWindow                        3         3       0       0      0       0
saved meshes: IfcDoor                          1         1       0       0      0       0
saved meshes: total                            4         4       0       0      0       0
mesh bodies: saved_graphics_mesh bodies scored: N; in Revit's export N
mesh bodies: IfcWindow N N N N N N N.N        (and the other IFC classes)
box bodies: record-box bodies: N; fill = Revit's body volume / its bounding box
box bodies: IfcSlab N N N N N N N N.N         (and the other IFC classes; nan for one class)
box bodies: total N N N N N N N
saved meshes: IfcWindow N N N N N N           (and the other IFC classes)
saved meshes: total N N N N N N
  • The score cache never saw these outputs. In that run's score-cache-*.log, on the head side and on the base side, all 54 held-out steps (18 models by mesh_bodies_vs_ifc, box_bodies_vs_ifc and saved_meshes_vs_ifc) read not cached holdout-...: held out now or once, only counts of it leave the runner, and the summary reads 0 hits, 0 misses (0 kept), 54 not cached and held out (holdout-*, bimcollab-*, spent-*): 0 found and removed. The code: tools/ci/measure-cache.py returns before a lookup (line 433) and a store (line 465) for any holdout-*, bimcollab-* or spent-* directory whatever the step, and prunes such directories from the cache.

Audit-honesty checklist

  • Counts only: numbers beside an IFC class name. No ElementId, name, family, type or coordinate leaves the runner, as for the other summaries (Griffin, 2026-10-26 and 2026-10-29).
  • No user-visible change; no changelog fragment.
  • No emojis, no private paths.

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0.
  • No Autodesk proprietary source, decompiled internals, or NDA'd SDK content; no fixtures.

Breaking changes

None. Existing counts.txt lines are unchanged; the new ones are prefixed.

…e saved-mesh and record-box scores, as counts (RE-329)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 07:50
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 4, 2026 07:51
@DrunkOnJava
DrunkOnJava merged commit 9a57172 into main Nov 4, 2026
54 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/holdout-mesh-counts branch November 4, 2026 07:58
DrunkOnJava added a commit that referenced this pull request Nov 4, 2026
…whole, and a census counts what keeps a saved mesh from decoding whole (#1144) (#1247) (RE-329) (#1338)

## Summary

Refs #1144 #1247.

A plane face that Revit split into regions, which tile it exactly, is
drawn whole, and `probe_re329_saved_graphics_census` counts, face by
face, what keeps a saved mesh from decoding whole. Report:
`reports/element-framing/RE-329-saved-graphics-census-face-regions.md`.

## Motivation

#1144 asks for cone faces, spline-profile surfaces and cylinder trims.
Cone faces landed in RE-311 (#1280), cylinder trims in RE-304 and the
spline profiles and trimmed parametric faces were measured and left off
`main` (RE-311, RE-302, RE-305). This starts from a census of what is
still left: it meshes every face of every element that keeps its box
(the graphics walk stops a `Geometry` at its first failing face, so the
existing diagnostics name one failure per carrier), and reads each
face's surface, profile curve and trim from the graph. Counts only, and
it runs on a private file (#1247's reporter).

The only cause that keeps a door or window of the four corpora as a box
is `face regions need subdivision`: three `IfcWindow` bodies in each of
Revit 2025 models 12 to 17. The probe `probe_re329_face_regions` shows a
face with regions holds exactly two region faces, each a plane on the
parent's plane, which tile its outline.

## Changes

- `src/research/native_saved_mesh.rs`: a plane face with regions is
drawn whole where the parent has one loop and every region is a plane
face on the same plane (origin and vectors within 1e-9), listed once,
with one loop and no regions of its own, and the regions tile the
parent: every region vertex inside or within 1e-7 UV units of the
parent's outline, the area each region shares with the parent equals its
own, no two regions share area and their areas add up to the parent's
(each within 1e-7 of the parent's area). Shared areas are measured on
triangulations (earcut, each triangle pair clipped), not by bounding box
or centroid, so a region in a notch of a non-convex parent, a region
listed twice and two overlapping tiles are refused; the work is bounded.
Any other face with regions keeps `face regions need subdivision` and
its element its box. Cylinder and parametric faces refuse regions as
before. No file here holds a case the refusals fire on; the unit tests
of `regions_tile` do.
- `probes/examples/probe_re329_saved_graphics_census.rs`,
`probe_re329_wall_mounted_faces.rs`, `probe_re329_face_regions.rs`: the
census, the 30 office fittings face by face (for
`toilet_faces_vs_ifc.py`), and what a face with regions holds.
- `.github/workflows/ci.yml` and `CONTRIBUTING.md`: `cargo test --lib`
in the Linux test job, and the CONTRIBUTING line that said no such test
existed yet.
-
`reports/element-framing/RE-329-saved-graphics-census-face-regions.md`,
a dated addendum in `docs/format-reconnaissance.md`, the #1144 row of
`docs/contribution-map.md`, and changelog fragments
(`fixed/1144-face-regions.md`,
`research/1144-saved-graphics-census.md`).

RE-305's cylinder-holes reader is not in this change. Re-measured on
today's `main` it draws the office's 30 `Stay_Wall_Mounted_:VAR-1`
fittings at 1.1102 to 1.1105 of Revit's volume with no surface Revit
lacks (2.3% more area; no face off Revit's surface). Under "Revit's
vertices within 0.001 ft" they fail on 72 of Revit's 1,083 vertices, all
nearest surfaces of revolution: 26 in the junction pattern of RE-302's
open item (0.0019 to 0.0051 ft) and 46 at 0.0011 to 0.0023 ft on three
other faces, for which the report shows no cause. Tracing
curved-to-curved edges could close the 26; whether the 46 close too is
not known.

## Testing

Unit tests are banned in this repository, with one exception (the
maintainer, 2026-11-04): a pure helper with no I/O may have a few fast
tests of its failure modes. `regions_tile`, the tiling geometry of a
face's regions, is one (a function of 2D rings); it has nine tests, six
refusals and three passes, and this change adds `cargo test --lib` to
CI's Linux test job and updates CONTRIBUTING.md. The graph reading
around it and everything else is measured end to end, on GitHub's
runners (no local build).

- [ ] `tools/check-local.sh` passes: CI runs it on this PR; not run
locally.
- [x] Verified end to end on real Revit files, against Revit's own
export:
- Census, Measure
[41786625424](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41786625424)
(office as built and at permit, Core Interior, RE1, 24 Revit 2025
models).
- Face-regions reader, Measure
[41790592582](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41790592582)
at fe9be56 against `main`: the 18 windows of r2025-12 to r2025-17 are
exact (3 of 3 in every file, volume ratio 1.0000, Revit's vertices
within 1.8e-6 ft of the mesh and the mesh's of Revit's); saved-mesh
bodies scored 1 → 4 in each file; no other line of those files'
`mesh_bodies_vs_ifc` or `schema` output moves besides the swept solids
with a Position falling by 3; the census lists regions as a cause in no
file.
- RE-305 re-measure
[41787545512](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41787545512)
and the fittings face by face
[41788644583](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41788644583);
what a face with regions holds
[41789549785](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41789549785).
Reproduce commands name commits in the report (those of the scratch
branch are archived at `refs/archive/2026-11-04/re329-evidence`).
- [x] This touches the IFC exporter, so the whole Measure ran on it,
unfiltered, with every sample year and the held-out models:
[41791824472](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41791824472)
(9c16f22 against `main`, `-f nordic=true -f r2025=true -f samples=true
-f holdout=true`, every scorer). `ifc.sha256` moves on 15 of 111 exports
and no other:
- Revit 2025 models 12 to 17 (6): the 18 windows above, exact against
Revit's export; `box_bodies_vs_ifc` loses their 3 boxes per file (fill
0.170), `saved_meshes_vs_ifc` scores them within 0.01 ft.
- Autodesk's Snowdon Towers architectural sample (no Revit export,
counted, not scored): 42 windows from box to mesh, 130 → 172 of 172 door
and window bodies drawn; the census (run
[41793980360](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41793980360))
has all 42 in `IfcWindow` with `face regions need subdivision` as the
only cause.
- Eight held-out models, counts only (run
[41793911979](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41793911979),
with the scrub of #1340): the first measurement of this rule on these
pairs. `rvt-holdout` 2024 to 2027: 12 windows each from box to mesh, 12
of 12 on every column including "ref on ours" (median volume ratio
1.0000); `rvt-holdout-office` 2024 to 2027: 10 each, 10 of 10. 88 of 88
right; no door or other class moves; the other ten held-out models and
their counts are unchanged. They stay held out.
- The stricter tiling check (1c6f05e, run
[41792431082](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41792431082))
and the pure core with its tests (63a2caa, run
[41793017480](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41793017480))
give an `ifc.sha256` equal to 41791824472's on all 111 models. Commits
since 63a2caa change documents only.
- [ ] Performance change: N/A.

## Audit-honesty checklist

- [x] Docs reflect the current state: the report, an addendum in
`docs/format-reconnaissance.md` and the #1144 row of
`docs/contribution-map.md`.
- [x] A user-visible change has its fragment under `changelog.d/`.
- [x] Limitations: faces with regions on other surfaces, or with holes
or non-tiling regions, stay refused; the report's section 4 lists what
is not claimed (that regions explain #1247's boxed doors and windows is
for the reporter's census to say; the 42 Snowdon windows are unscored).
- [x] No emojis, no private paths in committed files.
- [x] Reverse-engineering finding: reproducible probes under
`probes/examples/` and a dated addendum to
`docs/format-reconnaissance.md` are included.

## 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: the findings are byte observations of public sample models
(puzzbobb's Apache-2.0 Revit 2025 models, the BIM4LCA office under CC
BY-SA 4.0, RE1 and Core Interior under MIT) and Revit's own IFC exports
of them.
- [x] No fixtures added.

## Breaking changes

None. In the default export the bodies of 15 exports change, windows
only, from their record box to their saved mesh: three in each of Revit
2025 models 12 to 17, 42 in Snowdon Towers architectural and 88 in eight
held-out models. Nothing else in the 111 models changes.

## Screenshots or output samples

The 18 windows (Measure 41790592582, `mesh_bodies_vs_ifc`), one line
each:

```
IfcWindow  3  3  3  3  3  3  1.0000   Window-Fixed:24" x 36"
12560 IfcWindow: volume ratio 1.0000, Revit's vertices to rvt-rs's surface 1.832e-06 ft, rvt-rs's to Revit's 1.832e-06 ft
```
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