Repository navigation
fix(saved-graphics): a plane face split into tiling regions is drawn whole, and a census counts what keeps a saved mesh from decoding whole (#1144) (#1247) (RE-329) - #1338
Merged
Conversation
8 tasks done
…the whole Measure (#1144) (RE-329)
DrunkOnJava
marked this pull request as ready for review
November 4, 2026 07:51
DrunkOnJava
enabled auto-merge (squash)
November 4, 2026 07:51
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
…aved-mesh counts per IFC class (#1340) ## 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 ``` - [x] `bash -n tools/ci/scrub-holdout-results.sh`. - [x] End to end on the held-out models: Measure [41793911979](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41793911979) (`--ref ci/holdout-mesh-counts`, code ref 63a2caa of #1338, base `main`, `holdout=true`, `models="holdout-*"`, the three scorers; it succeeded). All 18 held-out `counts.txt` files, on both sides, gain `mesh bodies:`, `box bodies:` and `saved meshes:` lines, and the held-out lines of the other summaries are untouched. Collapsing every digit of every such line to `N` leaves only these shapes, so no family, type, element or name can be in them: ``` 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 ``` - [x] 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 - [x] 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). - [x] No user-visible change; no changelog fragment. - [x] No emojis, no private paths. ## 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; no fixtures. ## Breaking changes None. Existing `counts.txt` lines are unchanged; the new ones are prefixed.
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #1144 #1247.
A plane face that Revit split into regions, which tile it exactly, is drawn whole, and
probe_re329_saved_graphics_censuscounts, 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 aGeometryat 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: threeIfcWindowbodies in each of Revit 2025 models 12 to 17. The probeprobe_re329_face_regionsshows 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 keepsface regions need subdivisionand 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 ofregions_tiledo.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 (fortoilet_faces_vs_ifc.py), and what a face with regions holds..github/workflows/ci.ymlandCONTRIBUTING.md:cargo test --libin 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 indocs/format-reconnaissance.md, the feat(saved-graphics): mesh cone faces, spline-profile surfaces and cylinder faces with non-rectangular trims #1144 row ofdocs/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
mainit draws the office's 30Stay_Wall_Mounted_:VAR-1fittings 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 addscargo test --libto 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.shpasses: CI runs it on this PR; not run locally.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_ifcorschemaoutput moves besides the swept solids with a Position falling by 3; the census lists regions as a cause in no file.refs/archive/2026-11-04/re329-evidence).main,-f nordic=true -f r2025=true -f samples=true -f holdout=true, every scorer).ifc.sha256moves on 15 of 111 exports and no other:box_bodies_vs_ifcloses their 3 boxes per file (fill 0.170),saved_meshes_vs_ifcscores them within 0.01 ft.IfcWindowwithface regions need subdivisionas the only cause.rvt-holdout2024 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-office2024 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.ifc.sha256equal to 41791824472's on all 111 models. Commits since 63a2caa change documents only.Audit-honesty checklist
docs/format-reconnaissance.mdand the feat(saved-graphics): mesh cone faces, spline-profile surfaces and cylinder faces with non-rectangular trims #1144 row ofdocs/contribution-map.md.changelog.d/.probes/examples/and a dated addendum todocs/format-reconnaissance.mdare included.Legal and contribution hygiene
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: