Repository navigation
feat(saved-graphics): cone faces are meshed, and RE-311 explains why saved pipe fittings measure 1.2 times Revit's volume (#1144) (RE-311) - #1280
Merged
Conversation
…es, faces and surfaces, to tell a finer mesh from a wrong one (#1144) (RE-311)
… its own centre and counts the bodies whose Revit vertices lie on the mesh, and a per-face scorer for a saved fitting (#1144) (RE-311)
…on about its apex, so the fittings with a conical face keep their saved mesh (#1144) (RE-311)
…es Revit's volume, with the cone and spline readers and the status, matrix and changelog entries (#1144) (RE-311)
…d on the office, RE1, the Revit 2025 models and the 2024 samples, with default exports byte-identical, and the spline readers as left off main (#1144) (RE-311)
…is measured, and RE-311's fitting figures are scoped to the elbows and transitions they hold for (#1144) (RE-311)
DrunkOnJava
marked this pull request as ready for review
November 3, 2026 15:23
DrunkOnJava
enabled auto-merge (squash)
November 3, 2026 15:23
Owner
Author
|
Automated Claude Code review (the maintainer's review agent; it read the code and run 41651021342): one blocking item, fixed in 4786ffc. The evidence page and support matrix said all 54 RE1 Plumbing fittings had every Revit vertex on the mesh; that holds for the 30 elbows and 8 transitions, and the figures are now scoped to them. A cone face below its apex is refused until one is measured. |
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
…rees the office's toilets at 1.006 of Revit's volume, and what is left is Revit's faceting, so the readers stay off main (#1247) (RE-302) (#1321) ## Summary A second attempt at #1247's RE-302 readers, recorded as a measured negative like the first (#1264): the report gains section 6, the toilet-faces probe and its scorer land, and the readers stay on `re/1247-per-cell-clip` (reader code at b5d5546, tip d5d26fb). No reader change on `main`. ## Motivation The first attempt left two mechanisms open: the office's triangles grew 3.7 times, and the 43 freed toilets were 1.027 to 1.047 of Revit's volume with "extra surface in two of four shells". Negative results bind future work, so what the second attempt measured is recorded. ## Changes - `reports/element-framing/RE-302-ellipse-profiles-and-trimmed-parametric-faces.md`: Result and the first attempt's two conclusions corrected in place; section 6: - clipping each trimmed loop to the grid cells it covers (Sutherland–Hodgman, a fan or an earcut per piece, the pieces' corners shared): the office goes from 2,097,501 to 1,191,138 triangles (568,885 on `main`) and from 181.8 to 104.6 MB, so IfcOpenShell validates it again; three grid variants measured (1,354,151 / 110.4 MB, 1,187,075 / 104.4 MB, 1,191,138 / 104.6 MB); - the 43 toilets are within 1% of Revit's volume (1.0059 to 1.0060, constant across instances), their area 0.5% above Revit's: the extra surface was not there; - per face against Revit's mesh: the 0.022 ft is Revit's faceting of four surfaces of revolution (Revit's vertices there are on our surface); 66 of Revit's 808 vertices lie 0.003 to 0.005 ft off ours where two of our faces meet, which this run cannot assign to Revit or to our boundary; - what a next attempt needs. - `probes/examples/probe_re302_toilet_faces.rs`: every decoded face of a few toilets, in document feet (run it at d5d26fb). - `tools/re/toilet_faces_vs_ifc.py`: scores each face against Revit's mesh of the toilet, places Revit's off-surface vertices and measures Revit's sag. - `docs/format-reconnaissance.md`: the RE-302 addendum updated. ## Testing No reader change. Measured on GitHub's runners (section 5 names each command by commit): - Measure 41765801884 (per-cell clip with every trim vertex a knot, 301c209, against `main` at 8b8f1fe), 41765805196 (406e4b5) and 41766414367 (b5d5546, the branch's): the office pair, `--saved-meshes`, `mesh_bodies_vs_ifc` and `schema`. - Probe runs 41766357243 (5380e8b) and 41767705968 (d5d26fb): the toilet faces against Revit's export of the office (development data, not held out). - Not measured: Core Interior, RE1, the Revit 2025 models and the 2024 samples with the second attempt, since its readers do not land (stated in the report). - `tools/ci/api-doc-ids.py` passes with 300 reports. The report states one decision for the maintainers: whether the toilets are kept on "ref on ours" as RE1's elbows were (#1280). They fail it (0 of 43), so it does not arise until the 66 vertices are settled. ## Audit-honesty checklist - [x] No capability claim changes; the report states what is not claimed - [x] No user-visible change, so no changelog fragment (as RE-303 and the first RE-302 report) - [x] A reproducible probe under `probes/examples/` and a dated addendum to `docs/format-reconnaissance.md` - [x] No emojis, private paths or internal jargon ## Legal and contribution hygiene - [x] Apache-2.0 - [x] Contributor declaration (`CLEANROOM.md`): the findings come from public byte observations of the saved graphics of the BIM4LCA office, scored against Revit's own IFC export of the same file. No Autodesk SDK source, decompiled internals, leaked or NDA material was used. - [x] No fixtures added ## Breaking changes None. ## Related issues Refs #1247, #255.
10 of 12 tasks
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 ```
This was referenced Nov 4, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
…#1247) (RE-302) (#1363) ## Summary Report only. RE-302 section 7, "Per-cell clipping, on main": the second attempt's per-cell clip of a trimmed loop (RE-302 section 6) merged with `main` at ac7884e and measured on every model the lane covers, a negative. The readers stay on the draft #1361. No code changes. ## Motivation #1247. RE-302 section 6's "What a next attempt needs (3)" asked for the second attempt to be measured on Core Interior, RE1, the Revit 2025 models and the 2024 samples before any landing, and for a default-export byte-identity run. This records both on `main`. ## Changes - `reports/element-framing/RE-302-ellipse-profiles-and-trimmed-parametric-faces.md`: header (runs, result), section 4 ("Not claimed": the second attempt's unmeasured files, and the 14 windows' readers), section 6 (the next-attempt note says what section 7 did), and the new section 7. - `changelog.d/research/re302-per-cell-clipping.md`. ## Testing N/A: docs only, no code. The figures are Measure runs on GitHub's runners, named in the report: - 41849309128, `--saved-meshes`, 19 pairs against `main`: the office back under the schema step's limit (1,191,138 triangles, 104.6 MB, against 2,097,501 and 181.8 MB at f4d82ed and 568,885 and 82.2 MB on `main`); the toilets 0 of 43 on 0.01 ft and "ref on ours". - 41849313875, default export, 111 pairs: 110 identical, one differs (a held-out house). - 41852625343, that house, counts only: only `IfcWindow` moves, 2 to 16 scored, all within the #1280 bar. The commits the report's reproduce commands name (20da463, 88688aa) are on #1361's branch. - [x] No code, no emojis, no private paths, no PII; the held-out model appears by counts only. ## Audit-honesty checklist - [x] No capability claim: the readers are not on `main`, and the report says why (the toilets fail the 0.01 ft and "ref on ours" bars, and the default export would move a held-out model). - [x] A research fragment, `changelog.d/research/re302-per-cell-clipping.md`. ## Breaking changes None. ## Related issues Refs #1247 (the readers: draft #1361).
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
Saved meshes read
ConeSurffaces, which draws the 8PIPE-Transition - Weldedfittings of RE1 Plumbing that kept their box, and RE-311 explains why every saved pipe fitting measures 1.1 to 1.3 times Revit's volume while within 0.01 ft of it: Revit's export is the coarse one. Spline profile curves were read and measured too; they are left off this PR (see below).Decided (Griffin, 2026-11-03): the fittings keep their meshes, judged by "ref on ours" rather than Revit's volume. The lane's bar was Revit's volume within 1% and every vertex within 0.01 ft both ways. The elbows (30 of RE1 Plumbing's 54 fittings) are 1.17 to 1.32 of Revit's volume and up to 0.023 ft from its surface, so by that bar they would keep their box. They are not a wrong body: Revit's export of an elbow is a polyhedron of 6, 8 or 10 sides round the pipe and two segments along the 90° bend, with every vertex on the true surface, 16 to 25% short of the torus
π r² R π/2, which rvt-rs's mesh reaches to within 1 to 2% (table in the report). No mesh truer than the export can pass a volume bar set by the export. What tells a mesh of the same surface from a mesh of another one is the new "ref on ours" column ofmesh_bodies_vs_ifc.py(every Revit vertex within 0.001 ft of the mesh): elbows 30 of 30, transitions 8 of 8, none of the 10 tees (Revit's saddle vertices are 0.006 to 0.007 ft off) or the closet bends. The tees measure 1.14 and the closet bends 1.11 to 1.17 once volume is taken about the body's centre; their 1.44 to 1.47 and 0.28 to 2.59 (one negative) were the scorer taking a mesh with cracks between faces about the file's origin. Nothing drawn changes. A literal bar would have sent the 54 back to their box, which is further from Revit's body (#1144 measured 0.028 to 0.099 ft for the boxes) than the mesh (0.0003 to 0.035 ft).Motivation
#1144, #96 (pipe fittings). RE-304 left the fittings' volume as RE-78's open question and the closet bends' negative volumes unexplained.
Changes
src/research/native_parametric_surface.rs,native_parametric_mesh.rs,native_saved_mesh.rs:ParametricSurface::ConeSurf(apex + v (cos α · z + sin α (cos u · x + sin u · y)),valong the generator, radiusv sin α, read fromm_center,m_halfAngle, the basis andm_Envelope, checked against the cone/plane shared edge's(u, v)and(x, y)); the grid needs only the angular chord bound; a plane sharing an edge with a cone is refined on the cone's grid. No existing surface's arithmetic changes.tools/re/mesh_bodies_vs_ifc.py: volume about the body's own centre (a mesh with cracks between faces changes with its distance from the origin); the "ref on ours" column.tools/re/fitting_faces_vs_ifc.pyandprobes/examples/probe_re311_fitting_faces.rs: each face of a saved fitting against Revit's body.reports/element-framing/RE-311-fitting-faceting-cones-splines.md,docs/support-matrix.json,docs/evidence.md,docs/contribution-map.md,docs/rvt-moat-break-reconnaissance.md, twochangelog.dfragments.Testing
Unit tests are banned in this repository: none added. Measured end to end on Revit's own exports (RE1 Plumbing, Mechanical, Architecture, Electrical: Revit 2025, MIT,
magnetar-io/revit-test-datasetsandDrshelden/IFC-ECS; the BIM4LCA office, CC BY-SA 4.0; Core Interior; Einhoven; Autodesk's 2024 samples).tools/check-local.shpasses: left to CI (no local builds here).--saved-meshes, this change againstmain(41642258924): 52 → 60 bodies scored, the 8 newPIPE-Transition - Weldedall within 0.01 ft of Revit's body, every Revit vertex within 0.001 ft of the mesh (62 of 62, 14 of 14), 60 to 76 triangles against Revit's 120 or 24, volume 1.08 to 1.10 of Revit's; every cone and plane triangle wound as the nearest Revit triangle. Unfiltered, nordic + r2025 + 2024 samples (41651021342): no other body scored against Revit's export changes (office 11,079 and 11,196, Core Interior 138, RE1 Architecture 53, Electrical 47, Mechanical 68, all 23 Revit 2025 models). Autodesk's 2024 samples draw 471 more bodies, counted, not scored (no Revit export).ifc.sha256base against head, identical on all 42 models and the scorer diff empty. No door or window moves.probe_re311_fitting_faceswith scorerfitting_faces_vs_ifc, and the two unfiltered runs).Audit-honesty checklist
changelog.d/changed/1144-cone-faces.mdandchangelog.d/research/1144-fitting-faceting.md.SurfRevwith a nonrectangular trim, RE-302/RE-305); the two RE1 Electrical panels feat(saved-graphics): mesh cone faces, spline-profile surfaces and cylinder faces with non-rectangular trims #1144 names keep theirs.probes/examples/and an addendum todocs/rvt-moat-break-reconnaissance.md.Not in this PR
Spline profile curves (
GNurbSpline,GHermiteSpline) were read at 64b2cff (archived asrefs/archive/2026-11-03/re311-spline-profiles). 608 of 702 ruled faces and 260 more revolved faces decode, but no body scored against Revit's export changes (the BAS and fire alarm panels keep 83 and 44 faces that fail for trims RE-302 and RE-305 measured), and the only bodies gained are 4 on Autodesk's samples, unscored. Left offmainlike those readers were.Legal and contribution hygiene
Breaking changes
None.
ParametricSurfaceis a research type (unstable-research).After review
vrange is not wholly above its apex is refused, so its element keeps its box: onlyvfrom 0.81 to 0.93 is measured.docs/evidence.mdanddocs/support-matrix.jsonscope 1.08 to 1.32 to the 30 elbows and 8 transitions. The 10 tees and 4 closet bends are 1.11 to 1.17, with some of Revit's junction vertices 0.006 to 0.02 ft off the mesh.docs/status.md's 0.12.2 note says its 1.44 to 1.47 was the scorer's.docs/format-reconnaissance.md.mesh_bodies_vs_ifc.pydocuments "ref on ours" and the limit of taking volume about the centre.main,--saved-meshes, RE1): only RE1 Plumbing moves, 52 to 60 bodies (the 8 transitions, 8 of 8 within 0.01 ft and every Revit vertex on the mesh), as at 8c1637a.