Repository navigation
feat(re): the body scorers also measure both files at one equal, fine deflection (#1355) (RE-331) - #1362
Merged
Conversation
DrunkOnJava
marked this pull request as ready for review
November 4, 2026 15:14
…one offset, the measure.yml description is quoted; RE-331 section 4.3 reads the arcs run (#1355)
DrunkOnJava
enabled auto-merge (squash)
November 4, 2026 16:20
10 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
…es in the fine tessellation (#1365) (RE-331) (#1369) ## Summary The body scorers (`mesh_bodies_vs_ifc`, `family_extrusion_bodies_vs_ifc`, `saved_meshes_vs_ifc`) apply the bar the maintainer chose on #1355, "Fine where both draw curves": a body that both files write as true curves is judged in the fine tessellation (#1362), every other body in IfcOpenShell's default one. A saved mesh is triangles on rvt-rs's side and is never in the set, so no saved-mesh, door or window verdict can move. Only the bodies in the set are meshed finely. The rows say which tessellation decided. ## Motivation #1365, the implementation of the decision recorded in RE-331 section 5. The default tessellation cuts the forms one circle takes (two half arcs in Revit 24.0.5's IFC4 export, an `IfcCircleProfileDef` in Revit 26.2's IFC2X3 export) into chords that need not coincide, so the old bar measured two tessellations of one shape for those bodies (RE-327 section 11.2). ## Changes - `tools/re/true_curves.py` (new): reads each file's own representation items (the `Body` representations, mapped items followed, the openings that cut the element and its aggregated parts) and calls a body one of true curves when it has a curve item (an extrusion, tapered ones through their end profile, of a circle, an ellipse, a rounded rectangle, a profile with a fillet or edge radius, or an outline with an arc; a revolution, a swept disk, an advanced B-rep with a curved face, and the like) and no mesh item, and no item, outline or profile of a class it does not know (it fails closed). The rule is in its docstring and in RE-331 section 8.1. - `tools/re/mesh_bodies_vs_ifc.py`: bodies both files write as true curves are meshed again at the fine deflection and scored; their scores replace the default ones in the class table. A line counts them, the class table gains a last column (`decided by fine`) and the `fine` rows of #1362 show them in both tessellations. With none, the output is what it was. - `tools/re/family_extrusion_bodies_vs_ifc.py`: the arc census ends a row `decided by the fine tessellation` where it was. - `tools/re/saved_meshes_vs_ifc.py`: the box of such an element comes from the fine mesh; the table gains a `fine` column when any element is so decided. - `tools/ci/scrub-holdout-results.sh`: keeps the new line and last column for the held-out models, as counts beside an IFC class name. - `docs/supported-profile.md`, `docs/evidence.md`, `docs/status.md`, `docs/release-1.0-criteria.md` (W6): the family-extrusion rows (the 2 replaced arc bodies, the first arc run's 251, of which 187 are decided by the fine tessellation and 64 by the default one) say which tessellation judged them; the saved-mesh figures (supported-profile.md's saved-mesh row, evidence.md's element geometry row, status.md's v0.12.2 line, W6) say they are IfcOpenShell's default tessellation's. - `reports/element-framing/RE-331-scorer-tessellation.md` section 8, `changelog.d/research/1365-fine-bar.md`. No Rust change; `.github/workflows/measure.yml` is not touched. ## Testing Unit tests are banned in this repository: none added. Python only; `tools/check-local.sh` is not affected. - [x] Local, on real files, against the scorers of `main`: `mesh_bodies_vs_ifc` and `saved_meshes_vs_ifc` print byte for byte what `main`'s print on Core Interior's 138 doors and windows and on the saved-mesh doors of the four RE1 models (10 of 10 files). RE1 Architecture's dispenser drawn as arcs against Revit's circle: decided by the fine tessellation (2.3e-6 ft, "ref on ours" holds), and the class table, the census and the box scorer say so; the same arcs against a Revit mesh: decided by the default one, no fine column, line or rows. The detection finds Revit's circle bodies as RE-327 section 11.1 counts them (Architecture 4 of 72, Electrical 16, Mechanical 6, Plumbing 70). - [x] Measure, filtered, with the same code on both sides (RE-331 section 8.4; all green, every scorer step `exit 0`, the longest 298 s): 41871104420 (the new scorers, `f1f80d9e`, the models and flags of the #1362 flag run) against 41871109552 (`--ref main`, main's scorers on the same exports). Of 99 files 97 are byte-identical to main's: every `mesh_bodies_vs_ifc` and `saved_meshes_vs_ifc` file (66 of 66, doors and windows among them) and 31 of 33 family files, so no saved-mesh verdict moves. The 2 others are RE1 Architecture's and Plumbing's family files, where 1 body of each is curve-to-curve (a circle of 0.12 ft or less, drawn as arcs): they hold in both tessellations, and apart from the additions one line of each differs, that body's distances. 41871114299 (the new scorers on `aaa38de8`, which draws every arc): 187 of the 251 bodies are decided by the fine tessellation (the 185 arcs over 0.12 ft the current rule keeps as meshes, and those 2), all 251 hold "ref on ours" and both directions within 0.001 ft, and the dispenser (0.001439 ft by default, 5.6e-06 ft in the fine tessellation) is the one body whose verdict differs from 41854514903's. (`-f base=main` compares exports, not scorers: both sides are scored by the workflow ref's scorers.) - [x] The classification, on hand-made IFC4 entities in memory (scratch, not committed): 13 of 13 as intended, among them a circle with a triangulated opening (not in the set), an L shape with a fillet radius (in), a tapered rectangle-to-circle extrusion (in) and an `IfcOffsetCurve2D` outline (not in: it fails closed). On Revit's exports at hand the sets before and after reading the openings, the filleted and tapered profiles and the unknown outlines are the same (RE1: 4, 16, 6, 70; the office as built and at permit: 228, 204; the terrain files: 19 each; Core Interior: 0), and on rvt-rs's office and RE1 exports (93, 63, 0), so the filtered pair and the arcs run were not repeated. - [x] The unfiltered run, 41875852229 (the new scorers at `0326e39f`, `-f ref=3a6ed928`, default flags), against the `measure-base` side of 41869173374 (main's scorers and code at `3a6ed928`), per model (RE-331 section 8.5): both green, 111 models; 1,669 files (every scorer output and `ifc.sha256`, the held-out `counts.txt` included) compared, 1,669 byte-identical. No saved-mesh, door or window verdict moved, nor any other row. 0 bodies were decided by the fine tessellation on any model: the two body scorers score the 1,239 (and, on held-out models, 129) bodies whose `BodySource` is `saved_graphics_mesh`, which rvt-rs writes as an `IfcTriangulatedFaceSet`, a mesh item. (This text first said the set was empty because the default export writes no family extrusion; it does write bodies with curves, RE1 Plumbing's pipes among them, but they carry other body sources and are not scored by these scorers.) The held-out models' set is empty under the old and the new detection alike. Longest touched step: `saved_meshes_vs_ifc` at permit, 195 s (baseline 120 s, on a shard that was slower on every step). - N/A: the IFC exporter is not touched; no performance change. ## Audit-honesty checklist - [x] The docs say which tessellation judged each figure the diff touches: the family-extrusion rows of supported-profile.md, evidence.md and status.md, and the saved-mesh figures of the same files and W6. - [x] A fragment under `changelog.d/research/`. - [x] No emojis; no private paths; held-out data as counts only. - [x] Not a reverse-engineering finding about the format. - [x] What is not measured is in RE-331 section 8: a class `true_curves.py` does not name is judged in the default tessellation, so a gap in its list leaves a body where it was. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk proprietary source; no fixtures added. ## Breaking changes None. The scorers' output changes only for a body both files write as true curves; #1366 (arcs over 0.12 ft back to true arcs) follows. ## Related issues Closes #1365. Follows #1355 and #1362. Next: #1366.
7 of 8 tasks
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
…tever its radius (#1366) (RE-331) (#1372) ## Summary `rvt-ifc --family-extrusions` draws every circle and arc of a family's extrusions as an arc again, whatever its radius, in Revit's own form (`ProfileDef::IndexedPolyCurve`, `IfcArcIndex` arcs in three points; a span over a half turn is two arcs, so a circle is two half arcs). The rule of #1346 and #1352 that kept an instance's saved mesh for an arc over 0.12 ft in radius is removed. The default export is unchanged (the flag is opt-in): byte-identical to `main`'s on 34 of 34 models. ## Motivation #1366. The rule existed because IfcOpenShell's default tessellation cuts Revit's two forms of a circle (arcs in Revit 24.0.5's IFC4 export, an `IfcCircleProfileDef` in Revit 26.2's IFC2X3 export) into chords that need not coincide (RE-327 section 11.2), and the scorers counted that as a miss. The maintainer decided on #1355 that the fine tessellation judges a body both files write as true curves (RE-331 section 5), and #1365 applies it. ## Changes - `src/ifc/family_extrusions.rs`: `ARC_MAX_RADIUS`, `has_arc_beyond_the_rule` and the check that used them are removed, with `FamilyExtrusionReport::arcs`; the module docs say what is written now. The checks of an instance against its own mesh are as they were. `with_arcs` now counts the replaced instances with an arc written in a profile (an `IfcArcIndex` segment), not those with an arc in the sketch: an arc too flat to survive the writer's rounding comes out as a line. - `src/ifc/export_pipeline.rs`: the `arcs` field of `ExportNote::FamilyExtrusions`, its text and its mapping go; the `with_arcs` text says "written". - `src/bin/rvt_ifc.rs`: the `--family-extrusions` help. - `README.md`, `docs/compatibility.md`, `docs/supported-profile.md`, `docs/evidence.md`, `docs/status.md`, `docs/support-matrix.json`, `docs/release-1.0-criteria.md` (W6): the 0.12 ft caveat is gone and the counts are those measured at `34750454` (below). - `changelog.d/added/327-family-extrusions-flag.md` (the unreleased flag's fragment) describes the final behaviour and the figures; there is no separate fragment, since the rule was never released. `changelog.d/research/1355-scorer-fine-mode.md`: wording that would go stale on merge. - `reports/element-framing/RE-331-scorer-tessellation.md` sections 9 and 9.1; RE-327's Result and section 7 and RE-331 mark the 0.12 ft rule superseded; the scorer comment that cited a constant that never existed. Nothing in `tests/` pins a family-extrusion figure: `tests/fixtures/project-counts` pin the default export, which this does not reach, and the only `tests/` mention of the flag is the value-source table's `NotYet` row. ## Testing Unit tests are banned in this repository: none added. `cargo fmt --all -- --check` passes locally; the build, clippy and rustdoc are CI's. - [x] Measure at `34750454` (RE-331 section 9.1; all green): - 41884073888, the default export, `-f base=main`: `ifc.sha256` identical on **34 of 34** models. - 41884078892, `--saved-meshes --family-extrusions`, `-f base=main`: 335 bodies replaced (main's rule: 66); the body scorer scores 251 and **all 251 hold** "ref on ours", both directions within 0.001 ft and the volume within 0.01%; 187 are decided by the fine tessellation, 64 by the default one; 0 bodies with an arc miss. The 84 others are office `IfcSpace` instances (42 per office file), scored by `space_profiles_vs_ifc` (vertices within 0.01 ft 117 to 159 as built, 115 to 157 at permit). - 41884639625, the unfiltered run, `-f base=main -f ifc_flags=--family-extrusions -f holdout=true -f nordic=true -f r2025=true`, every scorer, 53 models: **6 exports move** (both office files, both terrain files, RE1 Architecture and Electrical), by 269 bodies in all (120, 120, 11, 11, 1, 6), the bodies main's rule kept; in each, `diagnostics.json` differs only in `body_sources` and `schema.txt` only in the count of swept solids (up by the extrusions added); 1,493 of 1,519 scorer, schema and hash files of the 35 models that are not held out are identical, the 26 that differ being those of the 6. **Held-out, counts only: 18 of 18** `ifc.sha256` and **18 of 18** `counts.txt` are main's. Nothing that passed on main fails: the saved-mesh rows that change are the classes that lost bodies to the extrusions, and no remaining column fell by more than the bodies lost. - The IFC is smaller: the office files 77.9 MB against 82.2 MB, the terrain files 0.17 MB against 0.92 MB. - [ ] 41888377096: a filtered run at `0b9a6b5f`, which counts `with_arcs` as written arcs (the commit after `34750454` changes only that and the docs): the `rvt-ifc` notes should show the same `with_arcs` as at `34750454` (120 in each office file, 11 in each terrain file, 2 in Architecture, 6 in Electrical), since the corpus has no flat arc. Dispatched. - N/A: no unit test; the exporter's default path is not touched. ## Audit-honesty checklist - [x] The docs state the counts measured at `34750454`, with the run ids; the first arc run's counts (`aaa38de8`, before the flat-arc rule) are cited as such. - [x] A fragment under `changelog.d/` (the unreleased flag's, extended). - [x] No emojis; no private paths; held-out data as counts only. - [x] Not a reverse-engineering finding about the format. - [x] Not measured, and said so in RE-331 section 9.1: the `with_arcs` count with the written-arcs rule until 41888377096 finishes; the held-out models' family bodies (the unfiltered run does not run `family_extrusion_bodies_vs_ifc`, so only their exports are compared); a flat arc. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk proprietary source; no fixtures added. ## Breaking changes `FamilyExtrusionReport::arcs` and the `arcs` field of `ExportNote::FamilyExtrusions` are removed: they counted the instances the removed rule kept. `rvt::ifc::family_extrusions` has not been in a release (it landed after v0.14.0), and nothing else reads them. BREAKING CHANGE: `rvt::ifc::family_extrusions::FamilyExtrusionReport::arcs` and `ExportNote::FamilyExtrusions { arcs }` are removed together with the 0.12 ft rule they counted. ## Related issues Closes #1366. Follows #1352, #1355, #1362 and #1365.
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
The three body scorers (
mesh_bodies_vs_ifc,saved_meshes_vs_ifc,family_extrusion_bodies_vs_ifc) get a fine mode, off by default: with Measure's newfine_meshinput both IFC files are also meshed at one equal, fine deflection (IfcOpenShellmesher-linear-deflection1e-5 ft,mesher-angular-deflection0.03 rad) and labelledfinerows are printed after the scorer's own output. No default figure and no bar changes in this PR: the default rows of two runs equal the earlier runs ofmain's scorers, 99 of 99 files each. RE-331 holds the proof, the measured tables, the options for the bar and Griffin's decision ("Fine where both draw curves", option 3; #1365 implements it).Motivation
#1355. The scorers measure the agreement of two default tessellations, not of two shapes: the same exact circle is two half arcs in Revit 24.0.5's IFC4 export and an
IfcCircleProfileDefin Revit 26.2's IFC2X3 export, IfcOpenShell cuts them into 28 and 27 chords at 69.85 mm (30 and 29 at 80 mm), and their vertices sit 0.0014 ft apart (RE-327 section 11.2). #1346 therefore keeps the mesh for any arc over 0.12 ft in radius.Changes
tools/re/fine_mesh.py(new): the settings and the switch (RVT_SCORER_FINE_MESH;1ortruein any case turns it on, nothing else does).tools/re/mesh_bodies_vs_ifc.py: the fine pass and its rows (per class: the usual columns, "ref on ours" within 0.0015 and 0.002 ft, both directions within 1e-5 ft, bodies meshed differently, which bodies hold the bar in the default tessellation, the fine one, both or neither). A body whose two meshes are the default ones keeps its default scores.tools/re/saved_meshes_vs_ifc.py: boxes of an even stride of at most 300 elements per class, meshed again, with the same file-wide offset as the default table.tools/re/family_extrusion_bodies_vs_ifc.py: the arc census a second time for the fine scores.tools/re/arc_tessellation_study.py: the fine tables (chords, the two forms of a circle, the dispenser),--write-oursand--deflections. It is a study tool with no switch: it always prints its fine tables after the default ones..github/workflows/measure.yml: thefine_meshinput (its description is quoted: an unquoted, #1355)started a YAML comment and cut the text) andRVT_SCORER_FINE_MESH. Touching it makes Measure run on this PR by itself.tools/ci/scrub-holdout-results.sh: keeps thefinerows of the first and last scorer for the held-out models (numbers beside an IFC class name).reports/element-framing/RE-331-scorer-tessellation.md,changelog.d/research/1355-scorer-fine-mode.md.No Rust change.
Testing
Unit tests are banned in this repository: none added. Python only;
tools/check-local.shis not affected.family_extrusion_bodies_vs_ifc.pyagainst Revit's export: default 0.001439 ft, fine 0.000002 ft.python3 tools/re/arc_tessellation_study.py RE1-Architecture.ifc --write-ours ours.ifc --deflections, thenRVT_SCORER_FINE_MESH=1 python3 tools/re/family_extrusion_bodies_vs_ifc.py ours.ifc RE1-Architecture.ifc.e024f03c: 41850758987 (unfiltered,-f nordic=true -f r2025=true -f holdout=true), 41850764234 (the models of 41843267888,--saved-meshes --family-extrusions) and 41850769925 (the same,--saved-meshes). All green, every scorer stepexit 0, the longest 676 s of 2,400 s. The default rows of the last two equal 41843267888's and 41843276506's, 99 of 99 files in each.aaa38de8, drawing every arc, with the fine scorers; green, every stepexit 0): 251 bodies scored of the 335 it replaces; the other 84 are officeIfcSpaceinstances, whichspace_profiles_vs_ifcscores and this run did not run. 185 of the 251 are arcs over 0.12 ft in radius, the bodies the current rule keeps as meshes (the office files 78 each, the terrain files 11 each, Electrical 6, Architecture 1; with the 84 spaces they are the 269), and the other 66 are the bodies the current rule draws (by count; the artefacts carry no ids). All 185 hold "ref on ours" in the fine tessellation and 184 in the default one; the dispenser is the one that misses by default (0.001439 ft) and the only body whose verdict differs. 187 of the 251 are meshed differently (the 185 and 2 circles of 0.12 ft or less). Every model prints 0 misses in fine.saved_meshes_vs_ifcalone, on the models of 41850769925 and the same code (e024f03c), with the scorer that now removes the default table's offset from the fine boxes too (it took the fine boxes' own median offset in 41850769925). Green; its scorer file equals 41850769925's for all 33 models, line for line, so the box figures of RE-331 section 4.4 are unchanged.What the fine mode measured:
--saved-meshesrun)The 38 are the office's waste-terminal saved meshes (19 in each office file); the largest "ref on ours" of the class is 0.001001 ft (six decimals) against the bar's 0.001, and all hold within 0.0015 ft. The 158 are curved bodies that Revit's coarse default polygon of a circle made miss the both-directions column.
Audit-honesty checklist
changelog.d/research/.Legal and contribution hygiene
Breaking changes
None. No default figure moves. The bar is decided (RE-331 section 5, "Decision"): the fine tessellation decides only where both files write true curves, and saved meshes keep the default bar, so no saved-mesh verdict moves; #1365 implements it.
Related issues
Closes #1355 (the fine figures are published and the decision on the bar is recorded in RE-331 section 5: Griffin chose "Fine where both draw curves" on 2026-11-04). Follow-ups: #1365 (implements that bar in the scorers) and #1366 (draws the 185 circles over 0.12 ft as true arcs again once #1365 lands).