From b5853aec6ce72fa2fe42a3ea8e0136c826a95050 Mon Sep 17 00:00:00 2001 From: Brennen Herbruck Date: Wed, 21 Oct 2026 06:20:15 -0400 Subject: [PATCH] Wave 58/509: kernel-cases: sweeps lofts from #271-#3412 (zig-zag pairing, ring sections, flush joins and cuts) 1 commits, squashed; the originals stay reachable from tag archive/merge-main-develop. - 739524a17 Brennen Herbruck: kernel-cases: sweeps lofts from #271-#3412 (zig-zag pairing, ring sections, flush joins and cuts) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- .../expected.json | 15 + .../recipe.json | 129 +++ .../expected.json | 22 + .../recipe.json | 234 +++++ .../expected.json | 12 + .../recipe.json | 141 +++ .../expected.json | 12 + .../recipe.json | 129 +++ .../expected.json | 23 + .../recipe.json | 829 ++++++++++++++++++ .../expected.json | 21 + .../recipe.json | 135 +++ .../expected.json | 9 + .../recipe.json | 92 ++ .../expected.json | 12 + .../recipe.json | 139 +++ .../expected.json | 11 + .../recipe.json | 136 +++ .../expected.json | 24 + .../recipe.json | 234 +++++ 20 files changed, 2359 insertions(+) create mode 100644 tests/kernel-cases/sweeps/1184-loft-ring-sections-keep-the-hole/expected.json create mode 100644 tests/kernel-cases/sweeps/1184-loft-ring-sections-keep-the-hole/recipe.json create mode 100644 tests/kernel-cases/sweeps/1666-loft-zigzag-to-flat-rectangle/expected.json create mode 100644 tests/kernel-cases/sweeps/1666-loft-zigzag-to-flat-rectangle/recipe.json create mode 100644 tests/kernel-cases/sweeps/2435-loft-rectangular-ring-sections/expected.json create mode 100644 tests/kernel-cases/sweeps/2435-loft-rectangular-ring-sections/recipe.json create mode 100644 tests/kernel-cases/sweeps/271-loft-cut-with-targets-keeps-the-bystander/expected.json create mode 100644 tests/kernel-cases/sweeps/271-loft-cut-with-targets-keeps-the-bystander/recipe.json create mode 100644 tests/kernel-cases/sweeps/2847-loft-rectangles-turning-through-half-a-turn/expected.json create mode 100644 tests/kernel-cases/sweeps/2847-loft-rectangles-turning-through-half-a-turn/recipe.json create mode 100644 tests/kernel-cases/sweeps/3111-loft-rectangular-ring-to-circular-ring/expected.json create mode 100644 tests/kernel-cases/sweeps/3111-loft-rectangular-ring-to-circular-ring/recipe.json create mode 100644 tests/kernel-cases/sweeps/3412-loft-sections-in-one-plane-refused/expected.json create mode 100644 tests/kernel-cases/sweeps/3412-loft-sections-in-one-plane-refused/recipe.json create mode 100644 tests/kernel-cases/sweeps/396-loft-join-standing-on-a-box-face/expected.json create mode 100644 tests/kernel-cases/sweeps/396-loft-join-standing-on-a-box-face/recipe.json create mode 100644 tests/kernel-cases/sweeps/443-loft-intersect-cone-meets-wall-below-top/expected.json create mode 100644 tests/kernel-cases/sweeps/443-loft-intersect-cone-meets-wall-below-top/recipe.json create mode 100644 tests/kernel-cases/sweeps/881-loft-zigzag-pleat-vertex-pairing/expected.json create mode 100644 tests/kernel-cases/sweeps/881-loft-zigzag-pleat-vertex-pairing/recipe.json diff --git a/tests/kernel-cases/sweeps/1184-loft-ring-sections-keep-the-hole/expected.json b/tests/kernel-cases/sweeps/1184-loft-ring-sections-keep-the-hole/expected.json new file mode 100644 index 000000000..8d32ef53d --- /dev/null +++ b/tests/kernel-cases/sweeps/1184-loft-ring-sections-keep-the-hole/expected.json @@ -0,0 +1,15 @@ +{ + "sources": [ + "tangency-labs/solidcraft#1184", + "tangency-labs/solidcraft#1254", + "tangency-labs/solidcraft#2435", + "tangency-labs/solidcraft#2447" + ], + "what": "a loft between two ring sections (outer r 20, inner r 12) 20 mm apart (the hole was dropped and a solid disc built)", + "source": "analytic", + "method": "a tube of outer r 20, inner r 12, length 20: V = pi (20^2 - 12^2) 20, A = 2 pi 20 20 + 2 pi 12 20 + 2 pi (20^2 - 12^2); faces: outer wall, bore, two annular caps.", + "body_count": 1, + "volume_mm3": 16084.95438637974, + "area_mm2": 5629.734035232909, + "faces": 4 +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/1184-loft-ring-sections-keep-the-hole/recipe.json b/tests/kernel-cases/sweeps/1184-loft-ring-sections-keep-the-hole/recipe.json new file mode 100644 index 000000000..b7eb90c48 --- /dev/null +++ b/tests/kernel-cases/sweeps/1184-loft-ring-sections-keep-the-hole/recipe.json @@ -0,0 +1,129 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "A" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 20 + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 12 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 20.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "B" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 20 + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 12 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "A", + "profiles": [ + { + "point": [ + 16, + 0 + ] + } + ] + }, + { + "sketch": "B", + "profiles": [ + { + "point": [ + 16, + 0 + ] + } + ] + } + ], + "operation": "new", + "body_name": "Ring" + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/1666-loft-zigzag-to-flat-rectangle/expected.json b/tests/kernel-cases/sweeps/1666-loft-zigzag-to-flat-rectangle/expected.json new file mode 100644 index 000000000..9622a0c65 --- /dev/null +++ b/tests/kernel-cases/sweeps/1666-loft-zigzag-to-flat-rectangle/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [ + "tangency-labs/solidcraft#1666" + ], + "what": "a ruled loft from an 18-vertex zig-zag section to a flat 52 x 3 rectangle with 18 vertices (8 of them collinear), whose twisted ruled faces were exported as crossing triangles", + "source": "analytic", + "method": "vertex i of the bottom section is joined to vertex i of the top (same start vertex and winding), so the solid is ruled and every section is the polygon of the interpolated vertices: V = h/6 (A0 + 4 Am + A1), h = 90.5, Am the shoelace area of the averaged polygon.", + "body_count": 1, + "volume_mm3": 17993.40548, + "bbox": { + "min": [ + -26, + 0, + 0 + ], + "max": [ + 26, + 14.97217, + 90.5 + ] + } +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/1666-loft-zigzag-to-flat-rectangle/recipe.json b/tests/kernel-cases/sweeps/1666-loft-zigzag-to-flat-rectangle/recipe.json new file mode 100644 index 000000000..95a48885c --- /dev/null +++ b/tests/kernel-cases/sweeps/1666-loft-zigzag-to-flat-rectangle/recipe.json @@ -0,0 +1,234 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Bottom" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -26, + 3 + ], + [ + -24.76384, + 3 + ], + [ + -16.0568, + 14.97217 + ], + [ + -8, + 4.90117 + ], + [ + 0, + 14.90117 + ], + [ + 8, + 4.90117 + ], + [ + 16.0568, + 14.97217 + ], + [ + 24.76384, + 3 + ], + [ + 26, + 3 + ], + [ + 26, + 0 + ], + [ + 23.23616, + 0 + ], + [ + 15.9432, + 10.02783 + ], + [ + 8, + 0.09883 + ], + [ + 0, + 10.09883 + ], + [ + -8, + 0.09883 + ], + [ + -15.9432, + 10.02783 + ], + [ + -23.23616, + 0 + ], + [ + -26, + 0 + ] + ], + "infer": false, + "closed": true + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 90.5 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Top" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -26, + 3 + ], + [ + -24, + 3 + ], + [ + -16, + 3 + ], + [ + -8, + 3 + ], + [ + 0, + 3 + ], + [ + 8, + 3 + ], + [ + 16, + 3 + ], + [ + 24, + 3 + ], + [ + 26, + 3 + ], + [ + 26, + 0 + ], + [ + 24, + 0 + ], + [ + 16, + 0 + ], + [ + 8, + 0 + ], + [ + 0, + 0 + ], + [ + -8, + 0 + ], + [ + -16, + 0 + ], + [ + -24, + 0 + ], + [ + -26, + 0 + ] + ], + "infer": false, + "closed": true + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "Bottom" + }, + { + "sketch": "Top" + } + ], + "operation": "new" + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/2435-loft-rectangular-ring-sections/expected.json b/tests/kernel-cases/sweeps/2435-loft-rectangular-ring-sections/expected.json new file mode 100644 index 000000000..9db043d30 --- /dev/null +++ b/tests/kernel-cases/sweeps/2435-loft-rectangular-ring-sections/expected.json @@ -0,0 +1,12 @@ +{ + "sources": [ + "tangency-labs/solidcraft#2435", + "tangency-labs/solidcraft#2447" + ], + "what": "a loft between two rectangular ring sections (a rectangle with a rectangular hole), 24 mm apart, tapering outer 40 x 30 to 28 x 20 and hole 20 x 14 to 12 x 6", + "source": "analytic", + "method": "outer and hole are ruled frustums of rectangles; the section area is quadratic in height so V = h/6 (A0 + 4 Am + A1) is exact for each: outer 24/6 (1200 + 4 34 25 + 560) = 20640, hole 24/6 (280 + 4 16 10 + 72) = 3968, V = 16672. Faces: 4 outer walls, 4 hole walls, 2 caps = 10.", + "body_count": 1, + "volume_mm3": 16672.0, + "faces": 10 +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/2435-loft-rectangular-ring-sections/recipe.json b/tests/kernel-cases/sweeps/2435-loft-rectangular-ring-sections/recipe.json new file mode 100644 index 000000000..70ee11550 --- /dev/null +++ b/tests/kernel-cases/sweeps/2435-loft-rectangular-ring-sections/recipe.json @@ -0,0 +1,141 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "A" + } + }, + { + "command": "sketch.rectangle.center", + "params": { + "center": [ + 0, + 0 + ], + "corner": [ + 20, + 15 + ] + } + }, + { + "command": "sketch.rectangle.center", + "params": { + "center": [ + 0, + 0 + ], + "corner": [ + 10, + 7 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 24.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "B" + } + }, + { + "command": "sketch.rectangle.center", + "params": { + "center": [ + 0, + 0 + ], + "corner": [ + 14, + 10 + ] + } + }, + { + "command": "sketch.rectangle.center", + "params": { + "center": [ + 0, + 0 + ], + "corner": [ + 6, + 3 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "A", + "profiles": [ + { + "point": [ + 15, + 0 + ] + } + ] + }, + { + "sketch": "B", + "profiles": [ + { + "point": [ + 10, + 0 + ] + } + ] + } + ], + "operation": "new", + "body_name": "RectRing" + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/271-loft-cut-with-targets-keeps-the-bystander/expected.json b/tests/kernel-cases/sweeps/271-loft-cut-with-targets-keeps-the-bystander/expected.json new file mode 100644 index 000000000..2be0485b1 --- /dev/null +++ b/tests/kernel-cases/sweeps/271-loft-cut-with-targets-keeps-the-bystander/expected.json @@ -0,0 +1,12 @@ +{ + "sources": [ + "tangency-labs/solidcraft#271", + "tangency-labs/solidcraft#286", + "tangency-labs/solidcraft#299" + ], + "what": "a loft cut limited by targets to one body while a second body lies inside the loft", + "source": "analytic", + "method": "loft of the 20 x 20 square at z = -1 to the 30 x 30 square at z = 25 (side s(z) = 20 + 10 (z+1)/26). Target (40 x 40 x 10) loses the slice z in [0,10]: integral of s^2 dz = (s(10)^3 - s(0)^3)/(3 k), k = 10/26. Bystander (6^3 = 216) is not a target and survives whole: V = 16000 - removed + 216; two bodies.", + "body_count": 2, + "volume_mm3": 11227.341222879684 +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/271-loft-cut-with-targets-keeps-the-bystander/recipe.json b/tests/kernel-cases/sweeps/271-loft-cut-with-targets-keeps-the-bystander/recipe.json new file mode 100644 index 000000000..86b4b1bb6 --- /dev/null +++ b/tests/kernel-cases/sweeps/271-loft-cut-with-targets-keeps-the-bystander/recipe.json @@ -0,0 +1,129 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 40, + "height": 10, + "corner": [ + 0, + 0, + 0 + ], + "body_name": "Target" + } + }, + { + "command": "solid.box", + "params": { + "length": 6, + "width": 6, + "height": 6, + "corner": [ + 17, + 17, + 12 + ], + "body_name": "Bystander" + } + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + -1.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "S0" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 10, + 10 + ], + "p1": [ + 30, + 30 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 25.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "S1" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 5, + 5 + ], + "p1": [ + 35, + 35 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "S0" + }, + { + "sketch": "S1" + } + ], + "operation": "cut", + "targets": [ + "Target" + ] + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/2847-loft-rectangles-turning-through-half-a-turn/expected.json b/tests/kernel-cases/sweeps/2847-loft-rectangles-turning-through-half-a-turn/expected.json new file mode 100644 index 000000000..5cec9036d --- /dev/null +++ b/tests/kernel-cases/sweeps/2847-loft-rectangles-turning-through-half-a-turn/expected.json @@ -0,0 +1,23 @@ +{ + "sources": [ + "tangency-labs/solidcraft#2847", + "tangency-labs/solidcraft#3452" + ], + "what": "a loft through 19 identical 6 x 4 rectangles on planes turning about the Z axis every 10 degrees from 0 to 180 degrees, centred 30 mm from the axis (volume came out 6 % of the expected at 180 degrees, no error)", + "source": "analytic", + "method": "every section is in a half-plane through the Z axis with its centroid at distance 30, so the loft is a bent bar of constant section: Pappus V = A * R * theta = 24 * 30 * pi. bbox: the rectangle reaches radius 33 at 0, 90 and 180 degrees and z = +-2.", + "body_count": 1, + "volume_mm3": 2261.946710584651, + "bbox": { + "min": [ + -33, + 0, + -2 + ], + "max": [ + 33, + 33, + 2 + ] + } +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/2847-loft-rectangles-turning-through-half-a-turn/recipe.json b/tests/kernel-cases/sweeps/2847-loft-rectangles-turning-through-half-a-turn/recipe.json new file mode 100644 index 000000000..3ae5b84b7 --- /dev/null +++ b/tests/kernel-cases/sweeps/2847-loft-rectangles-turning-through-half-a-turn/recipe.json @@ -0,0 +1,829 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1.0, + 0.0, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S0" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 0.984807753012208, + 0.17364817766693033, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S1" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 0.9396926207859084, + 0.3420201433256687, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S2" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 0.8660254037844387, + 0.49999999999999994, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S3" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 0.766044443118978, + 0.6427876096865393, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S4" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 0.6427876096865394, + 0.766044443118978, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S5" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 0.5000000000000001, + 0.8660254037844386, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S6" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 0.3420201433256688, + 0.9396926207859083, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S7" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 0.17364817766693041, + 0.984807753012208, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S8" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 6.123233995736766e-17, + 1.0, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S9" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -0.1736481776669303, + 0.984807753012208, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S10" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -0.3420201433256687, + 0.9396926207859084, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S11" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -0.4999999999999998, + 0.8660254037844387, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S12" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -0.6427876096865394, + 0.766044443118978, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S13" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -0.7660444431189779, + 0.6427876096865395, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S14" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -0.8660254037844387, + 0.49999999999999994, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S15" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -0.9396926207859083, + 0.3420201433256689, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S16" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -0.984807753012208, + 0.17364817766693028, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S17" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + -1.0, + 1.2246467991473532e-16, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "S18" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 27, + -2 + ], + "p1": [ + 33, + 2 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "S0" + }, + { + "sketch": "S1" + }, + { + "sketch": "S2" + }, + { + "sketch": "S3" + }, + { + "sketch": "S4" + }, + { + "sketch": "S5" + }, + { + "sketch": "S6" + }, + { + "sketch": "S7" + }, + { + "sketch": "S8" + }, + { + "sketch": "S9" + }, + { + "sketch": "S10" + }, + { + "sketch": "S11" + }, + { + "sketch": "S12" + }, + { + "sketch": "S13" + }, + { + "sketch": "S14" + }, + { + "sketch": "S15" + }, + { + "sketch": "S16" + }, + { + "sketch": "S17" + }, + { + "sketch": "S18" + } + ], + "operation": "new" + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/3111-loft-rectangular-ring-to-circular-ring/expected.json b/tests/kernel-cases/sweeps/3111-loft-rectangular-ring-to-circular-ring/expected.json new file mode 100644 index 000000000..9b55102da --- /dev/null +++ b/tests/kernel-cases/sweeps/3111-loft-rectangular-ring-to-circular-ring/expected.json @@ -0,0 +1,21 @@ +{ + "sources": [ + "tangency-labs/solidcraft#3111" + ], + "what": "a loft from a rectangular ring (two nested rectangles) to a circular ring (two concentric circles) 30 mm above: a hollow transition piece", + "source": "invariants", + "method": "no closed form for the ring-to-ring pairing, so only invariants are graded: the loft succeeds as one closed valid solid (outer wall, hole wall and two caps), and since every ruling joins a point of one section to a point of the other, the solid lies in the hull of both sections: bbox x +-20, y +-15 (the 40 x 30 outer rectangle), z 0 to 30.", + "body_count": 1, + "bbox": { + "min": [ + -20, + -15, + 0 + ], + "max": [ + 20, + 15, + 30 + ] + } +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/3111-loft-rectangular-ring-to-circular-ring/recipe.json b/tests/kernel-cases/sweeps/3111-loft-rectangular-ring-to-circular-ring/recipe.json new file mode 100644 index 000000000..fecab0374 --- /dev/null +++ b/tests/kernel-cases/sweeps/3111-loft-rectangular-ring-to-circular-ring/recipe.json @@ -0,0 +1,135 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "A" + } + }, + { + "command": "sketch.rectangle.center", + "params": { + "center": [ + 0, + 0 + ], + "corner": [ + 20, + 15 + ] + } + }, + { + "command": "sketch.rectangle.center", + "params": { + "center": [ + 0, + 0 + ], + "corner": [ + 15, + 10 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 30.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "B" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 12 + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 8 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "A", + "profiles": [ + { + "point": [ + 17, + 0 + ] + } + ] + }, + { + "sketch": "B", + "profiles": [ + { + "point": [ + 10, + 0 + ] + } + ] + } + ], + "operation": "new", + "body_name": "Transition" + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/3412-loft-sections-in-one-plane-refused/expected.json b/tests/kernel-cases/sweeps/3412-loft-sections-in-one-plane-refused/expected.json new file mode 100644 index 000000000..ee451e2ec --- /dev/null +++ b/tests/kernel-cases/sweeps/3412-loft-sections-in-one-plane-refused/expected.json @@ -0,0 +1,9 @@ +{ + "sources": [ + "tangency-labs/solidcraft#3412" + ], + "what": "a loft through two circles drawn on the same plane (no volume between them; it built a flat zero-volume body and reported success)", + "source": "invariants", + "method": "the two sections are coplanar, so no solid exists between them: the right behaviour is a clean refusal with no body left, never a zero-volume body.", + "outcome": "refused" +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/3412-loft-sections-in-one-plane-refused/recipe.json b/tests/kernel-cases/sweeps/3412-loft-sections-in-one-plane-refused/recipe.json new file mode 100644 index 000000000..da5650c15 --- /dev/null +++ b/tests/kernel-cases/sweeps/3412-loft-sections-in-one-plane-refused/recipe.json @@ -0,0 +1,92 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "A" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 10 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "B" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 20 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "A" + }, + { + "sketch": "B" + } + ], + "operation": "new" + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/396-loft-join-standing-on-a-box-face/expected.json b/tests/kernel-cases/sweeps/396-loft-join-standing-on-a-box-face/expected.json new file mode 100644 index 000000000..9064f267b --- /dev/null +++ b/tests/kernel-cases/sweeps/396-loft-join-standing-on-a-box-face/expected.json @@ -0,0 +1,12 @@ +{ + "sources": [ + "tangency-labs/solidcraft#396", + "tangency-labs/solidcraft#577" + ], + "what": "a conical loft standing on a box top face, joined to the box (one body reported, two touching shells in the result)", + "source": "analytic", + "method": "box 40 x 30 x 20 plus the frustum of height 15 from r 6 to r 4 whose base disc lies wholly inside the box top face: V = 24000 + 15/3 pi (36 + 24 + 16). One closed shell: faces = 6 box (top with a circular hole) + cone + top disc = 8.", + "body_count": 1, + "volume_mm3": 25193.805208364123, + "faces": 8 +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/396-loft-join-standing-on-a-box-face/recipe.json b/tests/kernel-cases/sweeps/396-loft-join-standing-on-a-box-face/recipe.json new file mode 100644 index 000000000..8e3407459 --- /dev/null +++ b/tests/kernel-cases/sweeps/396-loft-join-standing-on-a-box-face/recipe.json @@ -0,0 +1,139 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Base" + } + }, + { + "command": "sketch.rectangle.center", + "params": { + "center": [ + 0, + 0 + ], + "corner": [ + 20, + 15 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.extrude", + "params": { + "distance": 20, + "body_name": "Box" + } + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 20.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "L0" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 6 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 35.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "L1" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 4 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "L0" + }, + { + "sketch": "L1" + } + ], + "operation": "join" + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/443-loft-intersect-cone-meets-wall-below-top/expected.json b/tests/kernel-cases/sweeps/443-loft-intersect-cone-meets-wall-below-top/expected.json new file mode 100644 index 000000000..53709983a --- /dev/null +++ b/tests/kernel-cases/sweeps/443-loft-intersect-cone-meets-wall-below-top/expected.json @@ -0,0 +1,11 @@ +{ + "sources": [ + "tangency-labs/solidcraft#443" + ], + "what": "a cylinder (r 35, h 10) intersected with a conical loft (r 45 at z = -1 to r 33 at z = 11) that crosses its wall 1 mm below the top face (body came back unchanged)", + "source": "analytic", + "method": "the cone radius is 44 - z, so it meets the wall r = 35 at z = 9 and has r = 34 at the top: the result is the cylinder to z = 9 plus a frustum from r 35 to r 34 over 1 mm: V = pi 35^2 9 + pi/3 (35^2 + 35 34 + 34^2); faces: wall, cone, top, bottom.", + "body_count": 1, + "volume_mm3": 38375.601461150516, + "faces": 4 +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/443-loft-intersect-cone-meets-wall-below-top/recipe.json b/tests/kernel-cases/sweeps/443-loft-intersect-cone-meets-wall-below-top/recipe.json new file mode 100644 index 000000000..afbb99335 --- /dev/null +++ b/tests/kernel-cases/sweeps/443-loft-intersect-cone-meets-wall-below-top/recipe.json @@ -0,0 +1,136 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Cyl" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 35 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.extrude", + "params": { + "distance": 10, + "body_name": "Body" + } + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + -1.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "A" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 45 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 11.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "B" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 33 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "A" + }, + { + "sketch": "B" + } + ], + "operation": "intersect" + } + } + ] +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/881-loft-zigzag-pleat-vertex-pairing/expected.json b/tests/kernel-cases/sweeps/881-loft-zigzag-pleat-vertex-pairing/expected.json new file mode 100644 index 000000000..8854d64ba --- /dev/null +++ b/tests/kernel-cases/sweeps/881-loft-zigzag-pleat-vertex-pairing/expected.json @@ -0,0 +1,24 @@ +{ + "sources": [ + "tangency-labs/solidcraft#881", + "tangency-labs/solidcraft#956" + ], + "what": "a ruled loft between two 18-vertex zig-zag sections with the same start vertex and winding, whose first-vertex direction is ambiguous from the section centroid", + "source": "analytic", + "method": "vertex i of the bottom section is joined to vertex i of the top, so the solid is ruled and the section at height t is the polygon of the interpolated vertices; its area is quadratic in t, so Simpson is exact: V = h/6 (A0 + 4 Am + A1) with h = 90 and Am the shoelace area of the polygon of averaged vertices. Faces: 18 ruled sides + 2 planar caps.", + "body_count": 1, + "volume_mm3": 17914.43472, + "faces": 20, + "bbox": { + "min": [ + -26, + 0, + 0 + ], + "max": [ + 26, + 14.97217, + 90 + ] + } +} \ No newline at end of file diff --git a/tests/kernel-cases/sweeps/881-loft-zigzag-pleat-vertex-pairing/recipe.json b/tests/kernel-cases/sweeps/881-loft-zigzag-pleat-vertex-pairing/recipe.json new file mode 100644 index 000000000..7a68e85cd --- /dev/null +++ b/tests/kernel-cases/sweeps/881-loft-zigzag-pleat-vertex-pairing/recipe.json @@ -0,0 +1,234 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Bottom" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -26, + 3 + ], + [ + -24.76384, + 3 + ], + [ + -16.0568, + 14.97217 + ], + [ + -8, + 4.90117 + ], + [ + 0, + 14.90117 + ], + [ + 8, + 4.90117 + ], + [ + 16.0568, + 14.97217 + ], + [ + 24.76384, + 3 + ], + [ + 26, + 3 + ], + [ + 26, + 0 + ], + [ + 23.23616, + 0 + ], + [ + 15.9432, + 10.02783 + ], + [ + 8, + 0.09883 + ], + [ + 0, + 10.09883 + ], + [ + -8, + 0.09883 + ], + [ + -15.9432, + 10.02783 + ], + [ + -23.23616, + 0 + ], + [ + -26, + 0 + ] + ], + "infer": false, + "closed": true + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + 0.0, + 90.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Top" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -26, + 3 + ], + [ + -24.02812, + 3 + ], + [ + -16, + 3.30105 + ], + [ + -8, + 3.00105 + ], + [ + 0, + 3.30105 + ], + [ + 8, + 3.00105 + ], + [ + 16, + 3.30105 + ], + [ + 24.02812, + 3 + ], + [ + 26, + 3 + ], + [ + 26, + 0 + ], + [ + 23.97188, + 0 + ], + [ + 16, + 0.29895 + ], + [ + 8, + -0.00105 + ], + [ + 0, + 0.29895 + ], + [ + -8, + -0.00105 + ], + [ + -16, + 0.29895 + ], + [ + -23.97188, + 0 + ], + [ + -26, + 0 + ] + ], + "infer": false, + "closed": true + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "Bottom" + }, + { + "sketch": "Top" + } + ], + "operation": "new" + } + } + ] +} \ No newline at end of file