From f10dfd8d06182a59c05f000954e7ce5072c0474a Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Wed, 21 Oct 2026 23:55:26 -0400 Subject: [PATCH] kernel-cases: crossing equal holes leave each wall in two faces ladder/05/011 expected 8 faces (the stock's 6 and one per hole). With equal radii the two walls cross along two ellipses that meet at the two points where the walls are tangent (x = 25 and 35, y = 20, z = 10), so each wall is left in two pieces that touch only at those points, with no edge between them: separate faces, 10 in all. SMLib makes those 10 (volume exact); truck's 8 came with an invalid record. Derivation in the case's method. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt --- .../011-crossing-holes-steinmetz/expected.json | 4 ++-- tools/kernel-ladder/cases.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/kernel-cases/ladder/05-holes-and-taps/011-crossing-holes-steinmetz/expected.json b/tests/kernel-cases/ladder/05-holes-and-taps/011-crossing-holes-steinmetz/expected.json index 842f4aaf1..8f9ce79fc 100644 --- a/tests/kernel-cases/ladder/05-holes-and-taps/011-crossing-holes-steinmetz/expected.json +++ b/tests/kernel-cases/ladder/05-holes-and-taps/011-crossing-holes-steinmetz/expected.json @@ -2,8 +2,8 @@ "sources": [], "what": "two d10 through holes whose axes cross: vertical and along Y at z=10", "source": "analytic", - "method": "equal radii, crossing axes: the common part is the Steinmetz solid 16 r^3 / 3; removed pi r^2 (20 + 40) - 16 r^3/3", + "method": "equal radii, crossing axes: the common part is the Steinmetz solid 16 r^3 / 3; removed pi r^2 (20 + 40) - 16 r^3/3. Faces: the stock's 6 and two per hole. With equal radii the walls cross along two ellipses that meet at the two points where the walls are tangent (x = 25 and 35, y = 20, z = 10), so each wall is left in two pieces (the vertical one above and below the other hole, the horizontal one either side of the vertical hole) that touch only at those points: no edge joins them, so they are separate faces", "body_count": 1, "volume_mm3": 43954.277686282, - "faces": 8 + "faces": 10 } diff --git a/tools/kernel-ladder/cases.py b/tools/kernel-ladder/cases.py index df546855e..fd066b017 100644 --- a/tools/kernel-ladder/cases.py +++ b/tools/kernel-ladder/cases.py @@ -299,8 +299,12 @@ case(T5, "010-hole-tangent-to-end-face", "a d10 through hole tangent to the end {"body_count": 1, "volume_mm3": VB - PI * 25 * 20}, "the wall touches x=0 along a line: removed pi 5^2 20, one body", base=B1) case(T5, "011-crossing-holes-steinmetz", "two d10 through holes whose axes cross: vertical and along Y at z=10", [H(position=top, diameter=10), H(position=[30, 0, 10], diameter=10)], - {"body_count": 1, "volume_mm3": VB - PI * 25 * 20 - PI * 25 * 40 + 16 * 125 / 3, "faces": 8}, - "equal radii, crossing axes: the common part is the Steinmetz solid 16 r^3 / 3; removed pi r^2 (20 + 40) - 16 r^3/3", base=B1) + {"body_count": 1, "volume_mm3": VB - PI * 25 * 20 - PI * 25 * 40 + 16 * 125 / 3, "faces": 10}, + "equal radii, crossing axes: the common part is the Steinmetz solid 16 r^3 / 3; removed pi r^2 (20 + 40) - 16 r^3/3. " + "Faces: the stock's 6 and two per hole. With equal radii the walls cross along two ellipses that meet at the two " + "points where the walls are tangent (x = 25 and 35, y = 20, z = 10), so each wall is left in two pieces (the vertical " + "one above and below the other hole, the horizontal one either side of the vertical hole) that touch only at those " + "points: no edge joins them, so they are separate faces", base=B1) rr, off = 2.5, 2.0 lo, hi = max(-rr, off - rr), min(rr, off + rr) vx = quad(lambda u: 4 * math.sqrt(max(rr * rr - u * u, 0)) * math.sqrt(max(rr * rr - (u - off) ** 2, 0)), lo, hi, 256)