From 8702e71372069d926834eccb1111f43bb586f2aa Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Sat, 31 Oct 2026 08:45:26 -0400 Subject: [PATCH] Wave 476/509: Kernel rig: 3604 G2 swept-tool cut graded on a volume range (filleted box minus the swept corner section) (and 3 more) 4 commits, squashed; the originals stay reachable from tag archive/merge-main-develop. - d3c8c36ec jyviko: Kernel rig: 3243 rim and tooth join graded on its volume (rim plus the trimmed tooth less their 0.01 mm overlap) - 9aa2651b1 jyviko: Kernel rig: 3782 emboss on a cylinder graded on its volume, area, faces and box (the wrapped 4 x 5 badge raised 1 mm) - 391fc51b4 jyviko: Kernel rig: 3604 G2 swept-tool cut graded on a volume range (filleted box minus the swept corner section) - 166d574cc jyviko: Kernel rig: 4505 coil joined through a cylinder wall graded on its volume, area and box (cylinder plus the wire's screw-swept segment outside r 76) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- .../expected.json | 19 +++++++++++++--- .../expected.json | 22 ++++++++++++++++--- .../expected.json | 21 +++++++++++++++--- .../expected.json | 20 ++++++++++++++--- 4 files changed, 70 insertions(+), 12 deletions(-) diff --git a/tests/kernel-cases/booleans/3243-rim-and-rounded-tooth-join/expected.json b/tests/kernel-cases/booleans/3243-rim-and-rounded-tooth-join/expected.json index 9d719eb89..c66c39dfa 100644 --- a/tests/kernel-cases/booleans/3243-rim-and-rounded-tooth-join/expected.json +++ b/tests/kernel-cases/booleans/3243-rim-and-rounded-tooth-join/expected.json @@ -3,7 +3,20 @@ "tangency-labs/solidcraft#3243" ], "what": "a join of a cylindrical rim (r 15.27..16.65, to z=5) and a rounded tooth trimmed to the same two cylinders that overlaps it by 0.01 mm in Z", - "source": "invariants", - "method": "the tooth (z 4.99..7.7) and the rim (z 1.76..5) overlap in z 4.99..5 with positive volume, so the join succeeds and gives one closed solid; the result is larger than the rim alone. No closed form is derived for the tooth, so only the outcome, validity and the body count are graded", - "body_count": 1 + "source": "analytic", + "method": "rim: pi*16.65^2*5 - pi*15.27^2*(5 - 1.76) = 1981.190. Tooth: the profile (flanks from x = +-3 at z 4.99 to x = +-0.1706 at z 7.6327, tip arc through (0, 7.7): centre z 7.45012, radius 0.24988) extruded along +y from y 14.9624 (inside r 15.27 for every |x| <= 3, as sqrt(15.27^2 - 9) = 14.9724) to y 16.65 (outside r 16.65), so trimming to the two cylinders leaves exactly {15.27 <= r <= 16.65} over the profile: V = int over the profile of sqrt(16.65^2 - x^2) - sqrt(15.27^2 - x^2) dx dz = 11.6193 (Simpson, converged to 1e-6). The part of it below z 5 (z 4.99..5) lies inside the rim: 0.0831. Join: 1981.190 + 11.619 - 0.083 = 1992.726 (a join that dropped the tooth gives 1981.19, outside the tolerance). Box: the rim's r 16.65 disc, z 0 to the tooth tip 7.7", + "body_count": 1, + "volume_mm3": 1992.726, + "bbox": { + "min": [ + -16.65, + -16.65, + 0.0 + ], + "max": [ + 16.65, + 16.65, + 7.7 + ] + } } diff --git a/tests/kernel-cases/booleans/3604-cut-with-g2-swept-tool-along-projected-edge/expected.json b/tests/kernel-cases/booleans/3604-cut-with-g2-swept-tool-along-projected-edge/expected.json index 1113b7546..f51291233 100644 --- a/tests/kernel-cases/booleans/3604-cut-with-g2-swept-tool-along-projected-edge/expected.json +++ b/tests/kernel-cases/booleans/3604-cut-with-g2-swept-tool-along-projected-edge/expected.json @@ -4,7 +4,23 @@ "tangency-labs/solidcraft#3613" ], "what": "cut of a box by a swept G2 corner-removal tool along a projected edge chain (left-rear corner; the symmetric front-left chain works)", - "source": "invariants", - "method": "no closed form for the free-form tool: the tool lies on the box's bottom edge and overlaps it, so the cut must succeed with one valid closed solid (the tool is consumed). No volume is graded", - "body_count": 1 + "source": "analytic", + "method": "fillet: the documented curvature section, the quintic Bezier on setback s = 5 (controls p+s t1, p+2s/3 t1, p+s/3 t1, p+s/3 t2, p+2s/3 t2, p+s t2), cuts 113/21 * 25/36 = 3.73677 mm^2 off each vertical edge (Green on the Bezier): Vf = 8000 - 4*10*3.73677 = 7850.529. Tool section: the G2 blend between two lines is the degree 5 Hermite Bezier of the lines' own derivatives, controls (0.8,0) (0.8,0.04) (0.8,0.08) (0.08,0.8) (0.04,0.8) (0,0.8); the part of the profile in the material quadrant has area a = 0.360667 and first moment about the wall S = 0.102152. Swept along the corner curve (length 8.21299, total turn pi/2, curvature at most 0.269, so 1 - k*0.8 > 0 and the tube does not fold), it removes a*L - S*pi/2 = 2.8015; along l3, a straight bottom edge next to that corner (10 long on the left, 30 on the rear: the chain's naming fixes which, analysis does not), a*10 = 3.6067 or a*30 = 10.820. V lies between 7850.529 - 13.622 = 7836.907 and 7850.529 - 6.408 = 7844.121, widened by 1e-4 relative for the measurement: a cut that did nothing (7850.53) or a fillet not made falls outside. Box: the 40 x 20 x 10 box's (the fillets and the cut leave every extreme face)", + "body_count": 1, + "volume_mm3": [ + 7836.1, + 7844.9 + ], + "bbox": { + "min": [ + 0.0, + 0.0, + 0.0 + ], + "max": [ + 40.0, + 20.0, + 10.0 + ] + } } \ No newline at end of file diff --git a/tests/kernel-cases/booleans/3782-emboss-on-cylinder-pick-on-far-half/expected.json b/tests/kernel-cases/booleans/3782-emboss-on-cylinder-pick-on-far-half/expected.json index 620853585..096b0d041 100644 --- a/tests/kernel-cases/booleans/3782-emboss-on-cylinder-pick-on-far-half/expected.json +++ b/tests/kernel-cases/booleans/3782-emboss-on-cylinder-pick-on-far-half/expected.json @@ -4,7 +4,22 @@ "tangency-labs/solidcraft#3425" ], "what": "emboss on a cylinder with the face pick on the half of the wall opposite the sketch", - "source": "invariants", - "method": "the cylinder wall is one logical face, so a pick anywhere on it (between the caps) must be accepted: the emboss succeeds with one valid closed solid. No volume is graded (the badge's shape on a curved wall is not fixed by the issue)", - "body_count": 1 + "source": "analytic", + "method": "the cylinder wall is one logical face, so a pick anywhere on it (between the caps) must be accepted. Emboss on a cylinder wraps the sketch's arc length round the wall from the sketch plane's line of tangency (y = 10) and raises it radially: the 4 x 5 badge spans 4 / 10 = 0.4 rad about +y, z 5..10, from r 10 to r 11. Volume: pi*10^2*20 + (0.4/2)*(11^2 - 10^2)*5 = 2000 pi + 21 = 6304.185. Area: 600 pi, less the wall under the badge 0.4*10*5 = 20, plus its cap 0.4*11*5 = 22, two radial side walls 1*5 each and two end walls (0.4/2)*(11^2 - 10^2) = 4.2 each: 600 pi + 20.4 = 1905.356. Faces: the wall (with the badge's hole), two caps, the badge's cap and its four walls = 8. Box: the cylinder's, with y to 11 (the badge's cap at its middle; it spans x = +-11 sin 0.2 = +-2.19)", + "body_count": 1, + "volume_mm3": 6304.185, + "area_mm2": 1905.356, + "faces": 8, + "bbox": { + "min": [ + -10.0, + -10.0, + 0.0 + ], + "max": [ + 10.0, + 11.0, + 20.0 + ] + } } \ No newline at end of file diff --git a/tests/kernel-cases/booleans/4505-join-coil-through-cylinder-wall/expected.json b/tests/kernel-cases/booleans/4505-join-coil-through-cylinder-wall/expected.json index 2e302fc93..b7aa632d6 100644 --- a/tests/kernel-cases/booleans/4505-join-coil-through-cylinder-wall/expected.json +++ b/tests/kernel-cases/booleans/4505-join-coil-through-cylinder-wall/expected.json @@ -4,7 +4,21 @@ "tangency-labs/solidcraft#3636" ], "what": "a coil (diameter 151, pitch 10, 80 high, 5 mm round section) whose section runs through a diameter-152 cylinder's wall, joined to it: truck ground for 125-296 s, then 'boolean Union: no result'", - "source": "invariants", - "method": "the coil's section crosses the wall along its whole length, so the union is one connected solid: one valid closed body. The helical sweep's part outside r 76 has no closed-form volume (the triage's script)", - "body_count": 1 + "source": "analytic", + "method": "the coil is a screw sweep of its axial section, a 5 mm circle centred at r 75.5 (section_position center), 80 / 10 = 8 turns from z 10, so the wire spans r 73..78, z 7.5..92.5: inside r 76 it lies in the cylinder (r 76, z 0..100), and what the join adds is the screw sweep of the section's segment beyond r 76 (chord 0.5 from the centre). Segment: A = 2.5^2 acos(0.2) - 0.5 sqrt(6) = 7.33425, int r dA = 75.5 A + (2/3) 6^(3/2) = 563.5335; a screw motion sweeps 2 pi * turns * int r dA: 16 pi * 563.5335 = 28326.28. V = pi 76^2 100 + 28326.28 = 1842910.2 (the cylinder alone, 1814583.9, is far outside the tolerance). Area: the cylinder's 2 pi 76^2 + 2 pi 76 100, less the band the wire covers on r 76 (2 sqrt(6) * 2 pi 76 * 8 = 18714.97), plus the screw sweep of the wire's outer arc (16 pi int R sqrt(r^2 + (10/2pi)^2 sin^2 phi) dphi over |phi| < acos(0.2), r = 75.5 + 2.5 cos phi: 26603.45) and the two end segments (2 A): 91947.04. Box: r 78 in x and y (8 whole turns reach every direction), z 0..100", + "body_count": 1, + "volume_mm3": 1842910.2, + "area_mm2": 91947.04, + "bbox": { + "min": [ + -78.0, + -78.0, + 0.0 + ], + "max": [ + 78.0, + 78.0, + 100.0 + ] + } }