Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Wave 478/509: Kernel rig: 1985 and 2243 STEP-export enclosures graded on their volume and box (the outline less the cavity, plus gusset and standoffs) (and 3 more)

jyvikoe2186acfd7e3
diff --git a/tests/kernel-cases/crashes/1985-step-export-enclosure-screw-hole/expected.json b/tests/kernel-cases/crashes/1985-step-export-enclosure-screw-hole/expected.json
index 7dedebf3c4..67aceaf463 100644
--- a/tests/kernel-cases/crashes/1985-step-export-enclosure-screw-hole/expected.json
+++ b/tests/kernel-cases/crashes/1985-step-export-enclosure-screw-hole/expected.json
@@ -4,7 +4,20 @@
"tangency-labs/solidcraft#2243"
],
"what": "a small enclosure (rounded box, inner cut, corner gusset with a screw hole, two standoffs, USB cut-out) whose STEP export never finished (the export meshes its own file back)",
- "source": "invariants",
- "method": "the script builds one connected part: the export must finish, and the part is one valid closed solid",
- "body_count": 1
+ "source": "analytic",
+ "method": "the script builds one connected part: the export must finish, and the part is one valid closed solid. Body sketch: the rounded rectangle 0..80 x 0..79, corners r 3 (straights 74 and 73), area 80*79 - (4 - pi)*9 = 6312.274, extruded 37.5: 236710.288. Cavity box (2,2,2.5) 74 x 73, open at the top: - 74*73*35 = 189070. Gusset (68,67,2.5) 8 x 8 x 35 in the cavity's back corner: + 2240. Screw hole r 1.25 at (72,71) from z 29.5, inside the gusset: - pi 1.25^2 8 = 39.270. Two standoffs r 2.5, 3 high at (30.11, 69.04) and (58.05, 69.04) on the floor, clear of the walls and the gusset: + 2 * 58.905. USB cut-out (21.33..31.33, -1..3, 5..11) through the 2 mm front wall: - 10*2*6 = 120. V = 49838.83. Box: the outline's 0..80 x 0..79, z 0..37.5",
+ "body_count": 1,
+ "volume_mm3": 49838.83,
+ "bbox": {
+ "min": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "max": [
+ 80.0,
+ 79.0,
+ 37.5
+ ]
+ }
}
\ No newline at end of file
diff --git a/tests/kernel-cases/crashes/2243-step-export-flanged-enclosure/expected.json b/tests/kernel-cases/crashes/2243-step-export-flanged-enclosure/expected.json
index 93668104cb..76f92907f3 100644
--- a/tests/kernel-cases/crashes/2243-step-export-flanged-enclosure/expected.json
+++ b/tests/kernel-cases/crashes/2243-step-export-flanged-enclosure/expected.json
@@ -4,7 +4,20 @@
"tangency-labs/solidcraft#1985"
],
"what": "a flanged enclosure with two standoffs and no screw hole whose STEP export also never finished",
- "source": "invariants",
- "method": "one connected part: the export finishes and the part is one valid closed solid",
- "body_count": 1
+ "source": "analytic",
+ "method": "one connected part: the export finishes and the part is one valid closed solid. Body sketch: the rounded rectangle 0..80 x 0..79, corners r 3, area 80*79 - (4 - pi)*9 = 6312.274, extruded 32.5. Flange: the rounded rectangle -10..90 x 0..79, corners r 3, area 7892.274, 2.5 thick, holding the body's footprint (its own corners lie outside the body's), so the two give 7892.274*2.5 + 6312.274*30. Cavity box (3,3,2.5) 74 x 73, open at the top: - 74*73*30 = 162060. Gusset (69,68,2.5) 8 x 8 x 30: + 1920. Two standoffs r 2.5, 3 high at (31.11, 70.04) and (59.05, 70.04): + 2 * 58.905. V = 49076.73. Box: the flange's -10..90 x 0..79, z 0..32.5",
+ "body_count": 1,
+ "volume_mm3": 49076.73,
+ "bbox": {
+ "min": [
+ -10.0,
+ 0.0,
+ 0.0
+ ],
+ "max": [
+ 90.0,
+ 79.0,
+ 32.5
+ ]
+ }
}
\ No newline at end of file
diff --git a/tests/kernel-cases/crashes/4092-loft-ribs-rounded-pad-union-panics/expected.json b/tests/kernel-cases/crashes/4092-loft-ribs-rounded-pad-union-panics/expected.json
index 073d941c6d..910d7b8ea1 100644
--- a/tests/kernel-cases/crashes/4092-loft-ribs-rounded-pad-union-panics/expected.json
+++ b/tests/kernel-cases/crashes/4092-loft-ribs-rounded-pad-union-panics/expected.json
@@ -3,7 +3,20 @@
"tangency-labs/solidcraft#4092"
],
"what": "join extrude of a rounded pad over a lofted body with ring and ribs: repeated truck intersection_curve panics, then 'boolean Union: no result'",
- "source": "invariants",
- "method": "the pad (X -8..8, Y 18..25, Z 36..59) overlaps the body, ribs and ring, so the join is one connected solid; the join must succeed with one valid closed solid and no panic",
- "body_count": 1
+ "source": "analytic",
+ "method": "the pad (X -8..8, Y 18..25, Z 36..59) overlaps the body, ribs and ring, so the join is one connected solid; the join must succeed with one valid closed solid and no panic. Body: neck pi 18^2 21; the two-section loft is ruled, the circle r 18 paired with the 30 x 20 ellipse by their common angle parameter (the ellipse an affine image of the circle), so each section is an ellipse (18 + 12 l) x (18 + 2 l): 17 pi int (18 + 12 l)(18 + 2 l) dl = 7786 pi (pairing by normals instead, the largest any pairing gives, adds 17 pi * 1.5 = 80, inside the tolerance); the ellipse chamber pi*30*20*22 (z 38..60) and the flange 70 x 50 r 6 (area 3500 - (4 - pi)*36 = 3469.097, z 60..64, holding the chamber): 101181.25. The handle disc (r 12 about (y 30, z 47), x -5..5), the two ribs (the rounded profile, x -8..-4 and 4..8) and the pad (x -8..8, z 36..59 rounded r 3, y 18..25) add, by integrating over x -8..8, z 35..59 the length in y of the union of every part's y-interval less the body's own (grids 400^2..1600^2 agree to 2.4): 5347.9. V = 106529.2. Box: the flange's x +-35, y -25 to the disc's 42, z 0..64",
+ "body_count": 1,
+ "volume_mm3": 106529.2,
+ "bbox": {
+ "min": [
+ -35.0,
+ -25.0,
+ 0.0
+ ],
+ "max": [
+ 35.0,
+ 42.0,
+ 64.0
+ ]
+ }
}
\ No newline at end of file
diff --git a/tests/kernel-cases/crashes/4092-loft-ribs-rounded-pad-union-reduced/expected.json b/tests/kernel-cases/crashes/4092-loft-ribs-rounded-pad-union-reduced/expected.json
index 0d4fbde596..a469e2f6e3 100644
--- a/tests/kernel-cases/crashes/4092-loft-ribs-rounded-pad-union-reduced/expected.json
+++ b/tests/kernel-cases/crashes/4092-loft-ribs-rounded-pad-union-reduced/expected.json
@@ -3,7 +3,20 @@
"tangency-labs/solidcraft#4092"
],
"what": "the same without the top flange: the join fails with 'boolean Union: no result'",
- "source": "invariants",
- "method": "the pad (X -8..8, Y 18..25, Z 36..59) overlaps the body, ribs and ring, so the join is one connected solid; the join must succeed with one valid closed solid and no panic",
- "body_count": 1
+ "source": "analytic",
+ "method": "the pad (X -8..8, Y 18..25, Z 36..59) overlaps the body, ribs and ring, so the join is one connected solid; the join must succeed with one valid closed solid and no panic. Body: neck pi 18^2 21; the two-section loft is ruled, the circle r 18 paired with the 30 x 20 ellipse by their common angle parameter (the ellipse an affine image of the circle), so each section is an ellipse (18 + 12 l) x (18 + 2 l): 17 pi int (18 + 12 l)(18 + 2 l) dl = 7786 pi (pairing by normals instead, the largest any pairing gives, adds 17 pi * 1.5 = 80, inside the tolerance); the ellipse chamber pi*30*20*26 (z 38..64): 94844.68. The handle disc (r 12 about (y 30, z 47), x -5..5), the two ribs (the rounded profile, x -8..-4 and 4..8) and the pad (x -8..8, z 36..59 rounded r 3, y 18..25) add, by integrating over x -8..8, z 35..59 the length in y of the union of every part's y-interval less the body's own (grids 400^2..1600^2 agree to 2.4): 5347.9. V = 100192.6. Box: the chamber's x +-30, y -20 to the disc's 42, z 0..64",
+ "body_count": 1,
+ "volume_mm3": 100192.6,
+ "bbox": {
+ "min": [
+ -30.0,
+ -20.0,
+ 0.0
+ ],
+ "max": [
+ 30.0,
+ 42.0,
+ 64.0
+ ]
+ }
}
\ No newline at end of file
diff --git a/tests/kernel-cases/crashes/4542-join-fluted-wall-on-revolved-base/expected.json b/tests/kernel-cases/crashes/4542-join-fluted-wall-on-revolved-base/expected.json
index 810c21b84c..48032ef388 100644
--- a/tests/kernel-cases/crashes/4542-join-fluted-wall-on-revolved-base/expected.json
+++ b/tests/kernel-cases/crashes/4542-join-fluted-wall-on-revolved-base/expected.json
@@ -3,7 +3,20 @@
"tangency-labs/solidcraft#4542"
],
"what": "a fluted cup wall (a 72-point periodic fit spline round r 31.5..32.5 outside, a circle r 25 inside) extruded 90 mm as a join onto the top face of a revolved base disc of r 32: the app hung in the boolean",
- "source": "invariants",
- "method": "the wall's ring stands on the base's top face (z = 7), overlapping it between r 25 and the disc's rim and overhanging it where the flutes pass r 32, so the join is one connected solid: one valid closed body. The spline's area is not closed-form, so the volume is not graded",
- "body_count": 1
+ "source": "analytic",
+ "method": "the wall's ring stands on the base's top face (z = 7), overlapping it between r 25 and the disc's rim and overhanging it where the flutes pass r 32, so the join is one connected solid: one valid closed body. The two only share the face z = 7, so V is their sum. Base: Pappus on the profile (0,0)-(25,0), the arc through (29.5,1.5) to (32,7) (centre (25.25, 6.75), r 6.75463), (32,7)-(0,7): area 214.2728, V = 2 pi int x dA = 20655.013. Wall: the sketch's periodic fit spline is the C2 cyclic cubic through the 72 points with chord-length spans (closed back to the first point), its area by Green on its 72 Bezier pieces 3217.3851 (star-shaped, r 31.5002..32.5002); less the r 25 circle: 1253.8897, times 90 = 112850.069. V = 133505.08 (either part alone, or a wall sunk into the base, falls outside the tolerance). Box: the spline's extremes x, y +-32.5 (it reaches 32.5 on the axes and no further), z 0..97",
+ "body_count": 1,
+ "volume_mm3": 133505.08,
+ "bbox": {
+ "min": [
+ -32.5,
+ -32.5,
+ 0.0
+ ],
+ "max": [
+ 32.5,
+ 32.5,
+ 97.0
+ ]
+ }
}
diff --git a/tests/kernel-cases/shell/1525-shell-box-with-rounds-chamfer-and-fillet/expected.json b/tests/kernel-cases/shell/1525-shell-box-with-rounds-chamfer-and-fillet/expected.json
index d71d868c3a..f113d6a47e 100644
--- a/tests/kernel-cases/shell/1525-shell-box-with-rounds-chamfer-and-fillet/expected.json
+++ b/tests/kernel-cases/shell/1525-shell-box-with-rounds-chamfer-and-fillet/expected.json
@@ -3,7 +3,21 @@
"tangency-labs/solidcraft#1525"
],
"what": "a 50x50x30 box with r10 vertical rounds, a 5 mm chamfer round the base and a 4 mm fillet where the chamfer meets the wall, shelled 2 mm open at the top",
- "source": "invariants",
- "method": "every radius and the chamfer have room for a 2 mm wall, so the shell must succeed: one valid closed body (no closed-form volume with the blend patches)",
- "body_count": 1
+ "source": "analytic",
+ "method": "the body is convex (every edge convex), so the 2 mm shell's cavity is its exact inward offset, open at the top. Body = the square Q = [10,40]^2 swept by a profile at distance f(z) from Q: horizontal section area A(z) = 900 + 120 f + pi f^2. Body: f = 5 + z (chamfer) to z = 4 sqrt2 - 1.828 = 3.828, then the r4 fillet centred at (6, zc), zc = 1 + 4 sqrt2, f = 6 + sqrt(16 - (z - zc)^2) up to zc, then f = 10 (r10 rounds) to z = 30. Cavity (every face moved 2 in: floor z = 2, chamfer plane by 2 along its normal, fillet r2 about the same centre, rounds r8): f = z + 5 - 2 sqrt2 to zc - sqrt2, then 6 + sqrt(4 - (z - zc)^2) to zc, then 8, from z = 2 to 30. V = int_0^30 A_body - int_2^30 A_cavity = 70207.8635 - 56506.1293. Faces: the body's 26 (top, bottom, 4 walls, 4 rounds, 4 + 4 chamfer planes and cones, 4 + 4 fillet cylinders and tori) less the top, their 25 inner copies and the rim",
+ "body_count": 1,
+ "volume_mm3": 13701.734185296977,
+ "faces": 51,
+ "bbox": {
+ "min": [
+ 0,
+ 0,
+ 0
+ ],
+ "max": [
+ 50,
+ 50,
+ 30
+ ]
+ }
}
\ No newline at end of file