Skip to content

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

Wave 481/509: Kernel rig: shell/3576 was the ladder's drafted box with rounds shelled, recipe for recipe; the ladder case grades it and carries #3576 and #3573 (and 3 more)

jyviko66327c27aac2
diff --git a/tests/kernel-cases/fillets/851-chamfer-arc-and-top-front-2/expected.json b/tests/kernel-cases/fillets/851-chamfer-arc-and-top-front-2/expected.json
index 50248e9905..9a037c1932 100644
--- a/tests/kernel-cases/fillets/851-chamfer-arc-and-top-front-2/expected.json
+++ b/tests/kernel-cases/fillets/851-chamfer-arc-and-top-front-2/expected.json
@@ -4,8 +4,9 @@
"tangency-labs/solidcraft#854"
],
"what": "on #851's knife-edge part (tessellation/1263): the arc's top edge and the top front edge together chamfered 2",
- "source": "invariants",
- "method": "a 2 mm chamfer fits on these edges (the arc's chamfer is a cone cut by the back face where the arc runs into it); one closed valid solid whose display mesh closes is the right answer",
+ "source": "analytic",
+ "method": "plate x 0..41.1667, y -21..0 and the corner x 41.1667..62.1667 less the cylinder r 21 about (62.1667, -21), 10 high (tessellation/1263): V0 = 10 (62.1667 x 21 - pi 21^2/4) = 9591.394099. The arc's chamfer: its section in (rho, z) about the wall's axis, the triangle (rho - 21) + (10 - z) <= 2, swept round it from the front face (through the axis, square to the arc) to the back face y = 0, which the arc runs into tangent at the tip: at radius rho the part spans the angle asin(21/rho), so it takes Int_21^23 rho asin(21/rho) (2 - (rho - 21)) drho = 58.061950 (Simpson; the same derivation as 851-chamfer-arc-top-edge-9-5 at distance 2). The top front edge (y = -21, z = 10, x 0..41.1667) chamfered 2 takes 2^2/2 x 41.1667 = 82.333333. The two chamfers meet at the corner (41.1667, -21, 10), where the top, the front face and the arc's wall are square to each other, so together they take the union of the two: their common part in the plate (u = z - 8 in 0..2, 0 <= y + 21 <= u, x <= 41.1667, rho <= 21 + u) is Int_0^2 Int_0^u (sqrt((21 + u)^2 - Y^2) - 21) dY du = 2.637139, and the front chamfer's sliver past x = 41.1667 lies inside the arc's chamfer already (there rho <= sqrt(21^2 + Y^2) <= 21 + u). V = 9591.394099 - 58.061950 - 82.333333 + 2.637139 = 9453.635955; one closed valid solid whose display mesh closes",
"body_count": 1,
+ "volume_mm3": 9453.6359553261,
"watertight": true
}
diff --git a/tests/kernel-cases/shell/3576-shell-tapered-box-rounded-corners/expected.json b/tests/kernel-cases/shell/3576-shell-tapered-box-rounded-corners/expected.json
deleted file mode 100644
index 0fa7a1053c..0000000000
--- a/tests/kernel-cases/shell/3576-shell-tapered-box-rounded-corners/expected.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "sources": [
- "tangency-labs/solidcraft#3576",
- "tangency-labs/solidcraft#3573"
- ],
- "what": "a 120x80x40 box drafted 5 degrees with 4 mm rounds on the sloping corners, shelled 2 mm open at the top: the inner rounds' edges must lie on their faces (#3573 reports the same design)",
- "source": "invariants",
- "method": "no closed-form volume (tilted rounds). Invariants: the shell succeeds, one closed body, and the record's geometry check holds (every edge of the four inner rounds lies on its faces; the old offset left them up to 0.02 mm off, which other STEP readers reject)",
- "body_count": 1
-}
\ No newline at end of file
diff --git a/tests/kernel-cases/shell/3576-shell-tapered-box-rounded-corners/recipe.json b/tests/kernel-cases/shell/3576-shell-tapered-box-rounded-corners/recipe.json
deleted file mode 100644
index e6ad11c235..0000000000
--- a/tests/kernel-cases/shell/3576-shell-tapered-box-rounded-corners/recipe.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "commands": [
- {
- "command": "sketch.create",
- "params": {
- "plane": "XY"
- }
- },
- {
- "command": "sketch.rectangle.center",
- "params": {
- "center": [
- 0,
- 0
- ],
- "corner": [
- 60,
- 40
- ]
- }
- },
- {
- "command": "sketch.finish",
- "params": {}
- },
- {
- "command": "solid.extrude",
- "params": {
- "distance": 40,
- "taper": "-5 deg",
- "operation": "new"
- }
- },
- {
- "command": "solid.fillet",
- "params": {
- "edges": [
- [
- 58.25022672948152,
- 38.25022672948152,
- 20
- ],
- [
- 58.25022672948152,
- -38.25022672948152,
- 20
- ],
- [
- -58.25022672948152,
- 38.25022672948152,
- 20
- ],
- [
- -58.25022672948152,
- -38.25022672948152,
- 20
- ]
- ],
- "radius": 4
- }
- },
- {
- "command": "solid.shell",
- "params": {
- "faces": [
- [
- 0,
- 0,
- 40
- ]
- ],
- "thickness": 2
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/tests/kernel-cases/shell/391-deboss-text-on-flange-of-filleted-shelled-body/expected.json b/tests/kernel-cases/shell/391-deboss-text-on-flange-of-filleted-shelled-body/expected.json
index 31d705000e..3d20394d74 100644
--- a/tests/kernel-cases/shell/391-deboss-text-on-flange-of-filleted-shelled-body/expected.json
+++ b/tests/kernel-cases/shell/391-deboss-text-on-flange-of-filleted-shelled-body/expected.json
@@ -3,7 +3,23 @@
"tangency-labs/solidcraft#391"
],
"what": "text debossed 0.6 mm into the flat flange top of a filleted and shelled tapered housing, well away from the curved walls",
- "source": "invariants",
- "method": "the flange top (z=6) is planar and the text is clear of the walls, so the deboss must succeed and leave one valid closed body; the letter area is font dependent, so only the outcome and validity are graded",
- "body_count": 1
+ "source": "analytic",
+ "method": "the flange top (z=6) is planar and the text is clear of the walls and of the cavity below (z 2.5..3.5), so the deboss removes exactly 0.6 x the letters' area. Housing: flange 114 x 84 x 6 + the box drafted 2 deg (half-widths 45 - z k, 30 - z k, k = tan2) above it, z 6..35, less its r6 rounds as sloped prisms (section r^2 (tan(psi/2) - psi/2), psi = acos(sin^2 2), times height sqrt(1+2k^2)): 207002.5157. Shell 2.5 open at the top, every kept face moved 2.5 in and extended to meet: the flange's slab 109 x 79 x 1 (z 2.5..3.5) and the drafted box's offset (half-widths less 2.5/cos2, rounds r3.5) from z = 3.5 to 35: cavity 149670.2362, material 57332.2795. Rounding the cavity at the concave loop where the drafted walls meet the flange top (the true offset; under 298.32 mm, the walls 88 deg from the flange) enlarges it by at most 2.5^2 (tan44 - 44 deg) per mm: 368.6982. The letters, Liberation Sans' A and B at a 4 mm capital height (1409 units), are 598584.83 + 781544.83 units^2 (their quadratic outlines integrated exactly), 11.1229 mm^2: the deboss removes 6.6737. V = 56956.9075 .. 57325.6057",
+ "body_count": 1,
+ "volume_mm3": [
+ 56956.9,
+ 57325.7
+ ],
+ "bbox": {
+ "min": [
+ -57,
+ -42,
+ 0
+ ],
+ "max": [
+ 57,
+ 42,
+ 35
+ ]
+ }
}
\ No newline at end of file
diff --git a/tests/kernel-cases/shell/616-shell-open-a-rib-side-face-of-a-lid/expected.json b/tests/kernel-cases/shell/616-shell-open-a-rib-side-face-of-a-lid/expected.json
index 37349c4f1b..1869739bd5 100644
--- a/tests/kernel-cases/shell/616-shell-open-a-rib-side-face-of-a-lid/expected.json
+++ b/tests/kernel-cases/shell/616-shell-open-a-rib-side-face-of-a-lid/expected.json
@@ -3,7 +3,23 @@
"tangency-labs/solidcraft#616"
],
"what": "#616's lid (a 2.4 mm plate with R3 corners, a 3 mm skirt, three openings and four 1.6 mm ribs, all boxes) shelled 0.5 mm with a rib's outer side face open (action matrix (apps/solidcraft-cli/tests/action_matrix.rs): corpus/issue-616-lid-ribs, Lid/F8:-x face.shell)",
- "source": "invariants",
- "method": "every wall is at least 1.4 thick, so a 0.5 shell fits everywhere; the cavity's corners at the openings and the R3 rounds' offsets make the volume long but not unknown, and the case guards the build: one closed valid solid is the right answer",
- "body_count": 1
+ "source": "analytic",
+ "method": "every wall is at least 1.4 thick, so a 0.5 shell fits everywhere. The lid is boxes but for the plate's four R3 corners: as sharp boxes, plate 76.8 x 89.3 x 2.4 + skirt 71.5 x 84 x 3 less the openings (68 x 61 and 44 x 10 through, 22 x 2.65 x 3 in the skirt) + the ribs above the skirt (4 x 1.6 x 6 x 8.7): 9861.756, less the corners 4 (1 - pi/4) 9 x 2.4: V = 9843.2144. Cavity, every kept face moved 0.5 in and extended to meet (the open rib face's plane bounding it): for the boxes the points more than 0.5 from the outside in the max norm, with a 0.5 slab laid over the open face, summed exactly over the grid of the body's coordinates and those +-0.5: 5865.246 (one region, open at the rib), less the corners where the plate's margin cavity (z 0.5..1.9) follows the r2.5 offsets, 4 (1 - pi/4) 6.25 x 1.4: 5857.7349; material 3985.4795. Rounding the cavity at the 413.4 mm of concave edges instead (the true offset) enlarges it by at most (1 - pi/4) 0.25 per mm, with 0.125 at each of the 92 edge ends: 33.6791, so material 3951.8004 .. 3985.4795. A shell that fails to open leaves 2 shells; the full solid is 9843.2",
+ "body_count": 1,
+ "volume_mm3": [
+ 3951.8,
+ 3985.5
+ ],
+ "bbox": {
+ "min": [
+ 100,
+ 0,
+ 0
+ ],
+ "max": [
+ 176.8,
+ 89.3,
+ 14.1
+ ]
+ }
}