Skip to content

feat(re): the body scorers judge a body both files write as true curves in the fine tessellation (#1365) (RE-331) - #1369

Merged
DrunkOnJava merged 5 commits into
mainfrom
feat/1365-fine-bar
Nov 4, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
feat/1365-fine-bar

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

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 feat(re): the body scorers also measure both files at one equal, fine deflection (#1355) (RE-331) #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.

  • 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).
  • 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 feat(re): the body scorers also measure both files at one equal, fine deflection (#1355) (RE-331) #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.)
  • 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.
  • 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

  • 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.
  • A fragment under changelog.d/research/.
  • No emojis; no private paths; held-out data as counts only.
  • Not a reverse-engineering finding about the format.
  • 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

  • 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.

@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 4, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 16:50
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 4, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 4, 2026 17:48
@DrunkOnJava
DrunkOnJava merged commit e875500 into main Nov 4, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1365-fine-bar branch November 4, 2026 17:57
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.

Body scorers: the fine tessellation decides where both files write true curves (#1355 decision)

1 participant