SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 480/509: Kernel rig: the arc-sided plate shell graded on its volume (sharp to rounded at the hole's bottom), faces and box (and 3 more)
jyvikoa98d055597d8
diff --git a/tests/kernel-cases/shell/545-shell-ring-cut-frame-open-at-an-outer-wall/expected.json b/tests/kernel-cases/shell/545-shell-ring-cut-frame-open-at-an-outer-wall/expected.jsonindex dbbb7af826..54418cbd87 100644--- a/tests/kernel-cases/shell/545-shell-ring-cut-frame-open-at-an-outer-wall/expected.json+++ b/tests/kernel-cases/shell/545-shell-ring-cut-frame-open-at-an-outer-wall/expected.json@@ -10,5 +10,17 @@"volume_mm3": 21044.0,"tolerance": {"rel": 1e-06+ },+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 100,+ 100,+ 30+ ]}}diff --git a/tests/kernel-cases/shell/cov-shell-again-open-at-an-inner-wall-of-a-shelled-box/expected.json b/tests/kernel-cases/shell/cov-shell-again-open-at-an-inner-wall-of-a-shelled-box/expected.jsonindex bb3fc44702..20f65be613 100644--- a/tests/kernel-cases/shell/cov-shell-again-open-at-an-inner-wall-of-a-shelled-box/expected.json+++ b/tests/kernel-cases/shell/cov-shell-again-open-at-an-inner-wall-of-a-shelled-box/expected.json@@ -1,7 +1,23 @@{"sources": [],"what": "a 70 x 50 x 30 box with R6 vertical rounds shelled 2 mm open on top, shelled again 0.5 mm open at an inner wall: its 2 mm walls hollowed (action matrix (apps/solidcraft-cli/tests/action_matrix.rs): typical/filleted-shelled-box, Body1/F4:inner:F2:side:l1 face.shell)",- "source": "invariants",- "method": "the 2 mm walls take a 0.5 shell (a 1 mm cavity inside them, open at the picked inner wall); the rounds' offsets are concentric, but the rim and the open faces' cavity ends are the offset's own: one closed valid solid is the right answer",- "body_count": 1+ "source": "analytic",+ "method": "the 2 mm walls take a 0.5 shell (a 1 mm cavity inside them, open at the picked inner wall, the flat x -29..29 of y = -23). Rounded rectangle area L W - (4 - pi) r^2. First shell: 70 x 50 R6 x 30 less 66 x 46 r4 x 28 = 19449.4866. Second cavity, every kept face moved 0.5 in (the rounds' offsets concentric) and extended to meet: 69 x 49 r5.5 from z = 0.5 to 29.5 less 67 x 47 r4.5 above z = 1.5 (9610.6791), and where the inner wall is open the cavity reaches its plane, 58 x 0.5 x 28 (812): 10422.6791, material 9026.8074. Rounding the cavity at the 159.13 mm of concave floor edge (the true offset; r4 arcs counted at r4.5) enlarges it by at most (1 - pi/4) 0.25 per mm: 8.7061; the true offset's distance to the kept rounds where the open wall ends (two vertical tangent edges, 28 long) shrinks it by at most a quarter disc r0.5 each: 10.9956; 0.125 for each of the 4 ends. Material 9017.60 .. 9038.30. A shell that fails to open leaves 2 shells; the unchanged body is 19449.5",+ "body_count": 1,+ "volume_mm3": [+ 9017.6,+ 9038.3+ ],+ "bbox": {+ "min": [+ -35,+ -25,+ 0+ ],+ "max": [+ 35,+ 25,+ 30+ ]+ }}diff --git a/tests/kernel-cases/shell/cov-shell-plate-with-a-hole-through-its-arc-side/expected.json b/tests/kernel-cases/shell/cov-shell-plate-with-a-hole-through-its-arc-side/expected.jsonindex 5658e29ada..0af0f7cd23 100644--- a/tests/kernel-cases/shell/cov-shell-plate-with-a-hole-through-its-arc-side/expected.json+++ b/tests/kernel-cases/shell/cov-shell-plate-with-a-hole-through-its-arc-side/expected.json@@ -1,7 +1,27 @@{"sources": [],"what": "a 42.5 x 20 x 27.5 plate closed by a half-round side (r10), a blind hole r5 drilled in through that side, shelled 2 mm open at the far end: the edge where the hole's wall meets the arc side is neither a line nor an arc",- "source": "invariants",- "method": "the hole's wall moved 2 out meets the arc side moved 2 in along a curve of two cylinders; whether the cavity's corner at the hole's bottom is sharp or rounded is the offset's choice, so no closed form: one closed valid solid is the right answer",- "body_count": 1+ "source": "analytic",+ "method": "the hole's wall moved 2 out meets the arc side moved 2 in along a curve of two cylinders; every edge is convex but the hole's bottom circle, so only the cavity's corner there is the offset's choice, sharp or rounded. Body: profile 42.5 x 20 + pi 10^2 / 2 times 27.5, less the hole r5 inside it (x 0..7.5 and, for x < 0, out to the arc x = -sqrt(100 - (y-10)^2)): int 2 sqrt(25 - (y-12.5)^2) (7.5 + sqrt(100 - (y-10)^2)) dy = 1321.0770; V0 = 26373.6129. Sharp cavity: profile 42.5 x 16 + pi 8^2 / 2 (open at x = 42.5) from z = 2 to 25.5, less the hole's offset r7 up to x = 9.5 where it lies in it (y <= 18): int 2 sqrt(49 - (y-12.5)^2) (9.5 + sqrt(64 - (y-10)^2)) dy = 2369.0772 (the offset r7 is exact up to the hole's mouth: its foot on the r5 wall stays inside the arc); cavity 15973.4005, material 10400.2124. Rounding the cavity's corner at the hole's bottom (the true offset, a torus r2) enlarges it by at most 2 pi int r dA over r 5..7, x 7.5..9.5 less the quarter disc r2: 2 pi (24 - pi (5 + 8/(3 pi))) = 35.3452, so material 10364.8671 .. 10400.2124. Faces: outer 7 (arc, two flat sides, top, bottom, hole wall and bottom) less the open end, inner 7, the rim; 16 with the torus. A shell that fails to open leaves 2 shells; the full solid is 26373.6",+ "body_count": 1,+ "faces": [+ 15,+ 16+ ],+ "volume_mm3": [+ 10364.8,+ 10400.3+ ],+ "bbox": {+ "min": [+ -10,+ 0,+ 0+ ],+ "max": [+ 42.5,+ 20,+ 27.5+ ]+ }}diff --git a/tests/kernel-cases/shell/cov-shell-up-down-joined-squares-open-at-a-side-wall/expected.json b/tests/kernel-cases/shell/cov-shell-up-down-joined-squares-open-at-a-side-wall/expected.jsonindex d609b040bd..3357fd5ba5 100644--- a/tests/kernel-cases/shell/cov-shell-up-down-joined-squares-open-at-a-side-wall/expected.json+++ b/tests/kernel-cases/shell/cov-shell-up-down-joined-squares-open-at-a-side-wall/expected.json@@ -1,7 +1,23 @@{"sources": [],"what": "four squares drawn edge to edge, three extruded 10 up and three 10 down and joined, shelled 0.346 mm open at a side wall (action matrix (apps/solidcraft-cli/tests/action_matrix.rs): typical/up-down-join, Body1/F2:side:l1 face.shell)",- "source": "invariants",- "method": "every wall is 10 x 10 or more and the shell thin: the cavity's corners where the up and down parts overlap only along an edge are the offset's own choice, so no closed form: one closed valid solid is the right answer",- "body_count": 1+ "source": "analytic",+ "method": "every wall is 10 x 10 or more and the shell thin; the body is four 10 x 10 columns, two 20 tall (x<0<y and y<0<x) and two 10 tall (x,y<0 up, x,y>0 down): V = 6000. Its faces are all axis planes, so the cavity with every kept face moved 0.346 in and extended to meet (the open face's own plane bounding it) is the set of points more than 0.346 from the outside in the max norm, with a 0.346 slab laid over the open face; summed exactly over the grid of the body's coordinates and those +-0.346: cavity 5232.76615, material 767.23385. Rounding the cavity at the 59.654 mm of concave edges instead (the true offset; where the up and down parts meet only along an edge, at the origin) enlarges it by at most (1 - pi/4) 0.346^2 per mm, with 0.346^3 at each of the 8 edge ends: 1.86396, so material 765.36989 .. 767.23385. A shell that fails to open leaves 2 shells; the full solid is 6000",+ "body_count": 1,+ "volume_mm3": [+ 765.36,+ 767.24+ ],+ "bbox": {+ "min": [+ -10,+ -10,+ -10+ ],+ "max": [+ 10,+ 10,+ 10+ ]+ }}