Repository navigation
feat(re): the body scorers judge a body both files write as true curves in the fine tessellation (#1365) (RE-331) - #1369
Merged
Merged
Conversation
…es in the fine tessellation (#1365) (RE-331)
DrunkOnJava
marked this pull request as ready for review
November 4, 2026 16:50
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 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
IfcCircleProfileDefin 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 (theBodyrepresentations, 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 thefinerows 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 rowdecided by the fine tessellationwhere it was.tools/re/saved_meshes_vs_ifc.py: the box of such an element comes from the fine mesh; the table gains afinecolumn 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.mdsection 8,changelog.d/research/1365-fine-bar.md.No Rust change;
.github/workflows/measure.ymlis not touched.Testing
Unit tests are banned in this repository: none added. Python only;
tools/check-local.shis not affected.main:mesh_bodies_vs_ifcandsaved_meshes_vs_ifcprint byte for byte whatmain'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).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: everymesh_bodies_vs_ifcandsaved_meshes_vs_ifcfile (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 onaaa38de8, 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=maincompares exports, not scorers: both sides are scored by the workflow ref's scorers.)IfcOffsetCurve2Doutline (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.0326e39f,-f ref=3a6ed928, default flags), against themeasure-baseside of 41869173374 (main's scorers and code at3a6ed928), per model (RE-331 section 8.5): both green, 111 models; 1,669 files (every scorer output andifc.sha256, the held-outcounts.txtincluded) 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 whoseBodySourceissaved_graphics_mesh, which rvt-rs writes as anIfcTriangulatedFaceSet, 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_ifcat permit, 195 s (baseline 120 s, on a shard that was slower on every step).Audit-honesty checklist
changelog.d/research/.true_curves.pydoes not name is judged in the default tessellation, so a gap in its list leaves a body where it was.Legal and contribution hygiene
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.