Skip to content

ci(re): the volume reading finds the end faces of a bar cut at a slant and maps an elliptical one to its circle, so such a bar reads as a square-cut one does (#1712) - #1722

Merged
DrunkOnJava merged 1 commit into
mainfrom
ci/1712-scorer-ellipse-caps
Nov 11, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
ci/1712-scorer-ellipse-caps

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

tools/re/volume_readings.py now finds the end faces of a bar cut at a slant (the six decimals of the files had split one into 5 to 10 caps, and Revit draws it as a prism of 8 vertices with a quadrilateral for an end face), maps an elliptical end face of rvt-rs's, and Revit's caps with it, to the circle of its minor radius, and reads it as a circle. A bar that stays unexplained says why. It is a scorer: no export changes.

Motivation

#1712: a mitred round bar has elliptical end faces, which the shell reading left as no round end face in rvt-rs's shell.

Changes

  • COPLANAR 1e-5: a slanted cap's triangles are coplanar to about 3e-6 ft, because each vertex is off by up to 5e-7 in each coordinate.
  • caps(..., least): the cap's normal is the sum of its triangles' (a sliver's own is 0.5 degrees off); Revit's caps are read with least=2, as quadrilaterals.
  • ellipse_of, squash, squashed: a least-squares conic fit, and the affine map that takes the ellipse to its minor circle. Ellipses are read only when the shell has no circle, so a shell read before is read as before.

Testing

Measure on main 053ceac, the scorer of main (43032192721) against this branch's (43032197294), nordic=true samples=true sample_years=2024: 28 models, 17 with a Revit export to read against.

  • 13 of the 17 read the same, line for line. The four BIM4LCA office files change in one railing each (2598350, Railing:KAI-5): 17 to 19 of its 71 other shells read explained (volume and end-face area ratio 1.5000), and 52 to 54 stay other, now with a reason (the volume ratio is not the end faces' area ratio) where main's said a round end face of rvt-rs's has no inscribed polygon in Revit's.
  • Across the 17: readings 147 and 147, equal shells 187 and 187, explained shells 359 to 431, other shells 332 to 260. Nothing read as explained before reads otherwise, and nothing reads explained without a polygon of Revit's inscribed in the mapped circle.
  • Not in Measure, read locally against the Revit export this repository cannot publish: volume_readings: a round bar cut at a slant has elliptical end faces, which the shell reading leaves as another reason #1712's railing 622056 (six bars 3.09 ft long, cut at a slant at both ends). Its 95 other shells read explained on both scorers; its 6 bars read no round end face in rvt-rs's shell on main's and the volume ratio is not the end faces' area ratio on this branch's: each end face is now one cap and a circle after the map, and Revit's quadrilaterals are found, but Revit draws the bar as a twisted prism of 8 vertices, whose volume is not its end faces' area ratio times its length. That is a measured negative on the issue's second item, reported on volume_readings: a round bar cut at a slant has elliptical end faces, which the shell reading leaves as another reason #1712, not rounded away.

Reproduce: python3 tools/re/mesh_bodies_vs_ifc.py as Measure runs it, on the kept exports; the line is shell readings:.

Audit-honesty

  • The issue's "the 6 bars of 622056 read explained" is not met, for the reason above; the PR says Refs, not Closes, and volume_readings: a round bar cut at a slant has elliptical end faces, which the shell reading leaves as another reason #1712 keeps the residual.
  • least=2 applies to every shell, not only to slanted bars: a square-cut bar whose Revit end face is a bare quadrilateral (four corners on the circle, no extra edge vertices) now reads explained where main said no inscribed polygon in Revit's. That is a sound explanation (the volume ratio equals the area ratio), rvtDevelop's synthetic control shows it, and none of the 28 measured models holds such a shell. A top ring moved off the plane still refuses.
  • No export, no src/, no fixture changes. No changelog fragment: a scorer is not user-visible.
  • No private paths, no Autodesk source (CLEANROOM.md): the maths is a conic fit and an affine map.

Refs #1712

…t (the six decimals of the files, Revit's quadrilaterals, an ellipse) and says why a bar is not explained (#1712)

The coplanarity tolerance of 1e-6 ft was below the files' own rounding (six decimals), so the 55-vertex end face of a slanted bar came out as 5 to 10 caps; a cap's normal is now the sum of its triangles'; Revit's two-triangle quadrilateral end faces are caps; and a shell with no circle is read by its elliptical end faces through the affine map to the circle of the minor radius. On the 24 railings of Snowdon Architectural: explained 1,792 to 1,810, the 188 shells that had no round end face and the 57 with no inscribed polygon in Revit's become 118 'the volume ratio is not the end faces' area ratio', 106 with no end face at all and 3 with no inscribed polygon; nothing that read 'other' reads 'explained' without a polygon of Revit's inscribed in the mapped circle.
@DrunkOnJava
DrunkOnJava merged commit 11d094f into main Nov 11, 2026
44 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/1712-scorer-ellipse-caps branch November 11, 2026 14:26
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.

1 participant