fix(kernel): boolean volume corruption in coaxial cylinder/annulus stacks#427
Merged
Conversation
…acks Regression from a turbopump field repro: intersecting two deep union trees of coaxial cylinders/annuli returned ~661 mm³ of phantom volume with only ~100 mm² of surface (isoperimetrically impossible), while every pairwise intersection of the same parts was correct. The new catalogue-style test (torr_phantom_intersection.rs) asserts the intersection is empty and pins both union trees to their analytic volumes; those controls exposed four kernel bugs, all fixed: - face_sample_point picked classification samples ON the outer boundary of planar faces with holes — exactly where the other solid's surface passes, since split curves come from it — so ray casts against the other operand's tessellation misclassified split sub-faces (a pocket cut over a coaxial bore read +48% volume). Samples now maximize clearance from every boundary (outer, polygon holes, degenerate circle holes) and validate with point_in_face. - Disk sub-faces created by circle splits inherited the SSI circle's arbitrary winding instead of the loop-CCW-around-surface-normal convention the tessellator expects; a surviving disk (bore mouth kept as the visible floor under a press-fit ring) tessellated inside-out and integrated negative volume. - A boss ring exactly inscribed to a cap rim (tangent from inside) never punched its hole through the cap: the containment test required strict clearance, and a circle equal to the cap's own rim is now rejected explicitly instead (degenerate-loop analog of circle_is_own_boundary). - Circles partially overhanging a degenerate cap's rim could not split it at all: the degenerate path now polygonizes the rim and reuses the arc splitter, split_planar_face_by_arc re-homes pre-existing inner loops onto the containing sub-face instead of dropping them, and the pipeline's split gate probes 8 rim angles instead of a single fixed point that could land outside the face. Full static union tree error: +4.7% → +0.07%; rotating tree +0.9% → +0.3%. cargo test --workspace green, clippy -D warnings clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JvTnDfeNNvXh1E89t387PW
…t_cad Any real solid satisfies A³ ≥ 36·π·V² (equality only for the sphere), and the bound holds exactly for closed, consistently wound meshes — so a volume/area pair violating it cannot bound any solid. In the field this is the signature of a wrong-but-watertight boolean result: the turbopump repro returned ~661 mm³ of phantom intersection volume with ~100 mm² of surface, which can enclose at most ~94 mm³. The mutation-integrity layer reported volume and watertightness but could not catch this class of corruption. Now: - integrity.ts exports isoperimetricViolation() and checks the bound per part in computeIntegrity, warning with the offending volume, area, and the maximum volume that area could enclose. Reports also carry a new surface_area_mm2 total. - inspect_cad runs the same per-part check and returns a `warnings` array naming the offending part instead of returning impossible numbers silently. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JvTnDfeNNvXh1E89t387PW
The leaderboard build rendered one f3-clip-pipe-01 run artifact whose SVG was absent from the checked-in cache; siblings in the same run directory were already committed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JvTnDfeNNvXh1E89t387PW
What shippedIntersecting complex assemblies of coaxial cylinders and rings — such as a shaft floating inside stacked bearing bores — could produce phantom solid volume that was geometrically impossible: the reported material was far too large to fit inside the reported surface area. Four related bugs in the geometry engine caused this, and all four are now fixed.
Plain-English summary generated by Choji from this pull request. |
This was referenced Jul 7, 2026
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.
Regression from a turbopump field repro: intersecting two deep union
trees of coaxial cylinders/annuli returned ~661 mm³ of phantom volume
with only ~100 mm² of surface (isoperimetrically impossible), while
every pairwise intersection of the same parts was correct. The new
catalogue-style test (torr_phantom_intersection.rs) asserts the
intersection is empty and pins both union trees to their analytic
volumes; those controls exposed four kernel bugs, all fixed:
of planar faces with holes — exactly where the other solid's surface
passes, since split curves come from it — so ray casts against the
other operand's tessellation misclassified split sub-faces (a pocket
cut over a coaxial bore read +48% volume). Samples now maximize
clearance from every boundary (outer, polygon holes, degenerate
circle holes) and validate with point_in_face.
arbitrary winding instead of the loop-CCW-around-surface-normal
convention the tessellator expects; a surviving disk (bore mouth kept
as the visible floor under a press-fit ring) tessellated inside-out
and integrated negative volume.
never punched its hole through the cap: the containment test required
strict clearance, and a circle equal to the cap's own rim is now
rejected explicitly instead (degenerate-loop analog of
circle_is_own_boundary).
it at all: the degenerate path now polygonizes the rim and reuses the
arc splitter, split_planar_face_by_arc re-homes pre-existing inner
loops onto the containing sub-face instead of dropping them, and the
pipeline's split gate probes 8 rim angles instead of a single fixed
point that could land outside the face.
Full static union tree error: +4.7% → +0.07%; rotating tree +0.9% →
+0.3%. cargo test --workspace green, clippy -D warnings clean.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01JvTnDfeNNvXh1E89t387PW