Skip to content

fix(kernel): boolean volume corruption in coaxial cylinder/annulus stacks#427

Merged
ecto merged 3 commits into
mainfrom
claude/exciting-hopper-vv041x
Jul 7, 2026
Merged

fix(kernel): boolean volume corruption in coaxial cylinder/annulus stacks#427
ecto merged 3 commits into
mainfrom
claude/exciting-hopper-vv041x

Conversation

@ecto

@ecto ecto commented Jul 7, 2026

Copy link
Copy Markdown
Owner

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

claude added 3 commits July 7, 2026 14:48
…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
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated (UTC)
mecheval Ignored Ignored Jul 7, 2026 4:36pm
vcad Ignored Ignored Jul 7, 2026 4:36pm
vcad-docs Ignored Ignored Jul 7, 2026 4:36pm
vcad-mcp Ignored Ignored Jul 7, 2026 4:36pm

Request Review

@ecto
ecto merged commit 4188cf2 into main Jul 7, 2026
12 checks passed
@chojiai

chojiai Bot commented Jul 7, 2026

Copy link
Copy Markdown

What shipped

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

  • Boolean operations on nested coaxial assemblies now return correct results; the specific field case (a turbopump rotating group intersected with its static housing) went from reporting ~661 mm³ of phantom material to correctly reporting an empty intersection.
  • Inspection and integrity reports now include surface area alongside volume, and will warn explicitly when a part's volume and surface area are mathematically inconsistent — a sign the volume calculation cannot be trusted.

Plain-English summary generated by Choji from this pull request.

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.

2 participants