SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 414/509: Kernel rig: everyday rounds of an L-bracket's bend
jyvikofc3062884f93
diff --git a/tests/kernel-cases/fillets/every-l-bracket-both-bends-r3-r8-concentric/expected.json b/tests/kernel-cases/fillets/every-l-bracket-both-bends-r3-r8-concentric/expected.jsonnew file mode 100644index 0000000000..98ea33ebb3--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-both-bends-r3-r8-concentric/expected.json@@ -0,0 +1,24 @@+{+ "sources": [],+ "what": "an L-bracket's inside bend rounded r3, then its outside bend r8 = 3 + its thickness: concentric rounds, a bend of even thickness",+ "source": "analytic",+ "method": "L-bracket: the legs 40x20x5 (x 0..40, z 0..5) and 5x20x40 (x 0..5, z 0..40) joined, 20 deep in y: V0 = 4000 + 4000 - 500 = 7500, 8 faces. Both rounds' centre lines are (8, y, 8): V = 7500 + 20 (1-pi/4) 9 - 20 (1-pi/4) 64 = 7263.9380. Check: in the square [0,8]^2 the bend is the quarter annulus pi (64 - 9)/4 against the L's 64 - 9 = 55 there: 20 (pi 55/4 - 55) = -236.0620. Faces 10.",+ "body_count": 1,+ "volume_mm3": 7263.937979737193,+ "faces": 10,+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 40,+ 20,+ 40+ ]+ },+ "continuity": {+ "order": "g1"+ }+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-both-bends-r3-r8-concentric/recipe.json b/tests/kernel-cases/fillets/every-l-bracket-both-bends-r3-r8-concentric/recipe.jsonnew file mode 100644index 0000000000..9367689c1c--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-both-bends-r3-r8-concentric/recipe.json@@ -0,0 +1,61 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 20,+ "height": 5,+ "corner": [+ 0,+ 0,+ 0+ ],+ "body_name": "Bracket"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 5,+ "width": 20,+ "height": 40,+ "corner": [+ 0,+ 0,+ 0+ ],+ "operation": "join",+ "targets": [+ "Bracket"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 5,+ 10,+ 5+ ]+ ],+ "radius": 3+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 0,+ 10,+ 0+ ]+ ],+ "radius": 8+ }+ }+ ]+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3-curvature/expected.json b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3-curvature/expected.jsonnew file mode 100644index 0000000000..88a3748a13--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3-curvature/expected.json@@ -0,0 +1,24 @@+{+ "sources": [],+ "what": "an L-bracket's inside bend rounded curvature-continuous (Type: Curvature) size 3",+ "source": "analytic",+ "method": "L-bracket: the legs 40x20x5 (x 0..40, z 0..5) and 5x20x40 (x 0..5, z 0..40) joined, 20 deep in y: V0 = 4000 + 4000 - 500 = 7500, 8 faces. The concave edge between two planes square to each other, its ends on the planar faces y = 0 and 20: the section is the quintic Bezier of setback 3 (fillets/862), area 113/756 9 = 1.345238, added along 20: V = 7526.9048. Faces 9; both seams G2.",+ "body_count": 1,+ "volume_mm3": 7526.9047619047615,+ "faces": 9,+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 40,+ 20,+ 40+ ]+ },+ "continuity": {+ "order": "g2"+ }+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3-curvature/recipe.json b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3-curvature/recipe.jsonnew file mode 100644index 0000000000..266f1ee45f--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3-curvature/recipe.json@@ -0,0 +1,49 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 20,+ "height": 5,+ "corner": [+ 0,+ 0,+ 0+ ],+ "body_name": "Bracket"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 5,+ "width": 20,+ "height": 40,+ "corner": [+ 0,+ 0,+ 0+ ],+ "operation": "join",+ "targets": [+ "Bracket"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 5,+ 10,+ 5+ ]+ ],+ "radius": 3,+ "type": "curvature"+ }+ }+ ]+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3/expected.json b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3/expected.jsonnew file mode 100644index 0000000000..01e3f09b16--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3/expected.json@@ -0,0 +1,24 @@+{+ "sources": [],+ "what": "the inside bend of an L-bracket rounded r3",+ "source": "analytic",+ "method": "L-bracket: the legs 40x20x5 (x 0..40, z 0..5) and 5x20x40 (x 0..5, z 0..40) joined, 20 deep in y: V0 = 4000 + 4000 - 500 = 7500, 8 faces. The concave edge (x = 5, z = 5) gains the spandrel (1-pi/4) 9 = 1.931417 along its 20: V = 7500 + 38.6283 = 7538.6283. Faces 9.",+ "body_count": 1,+ "volume_mm3": 7538.628330588459,+ "faces": 9,+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 40,+ 20,+ 40+ ]+ },+ "continuity": {+ "order": "g1"+ }+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3/recipe.json b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3/recipe.jsonnew file mode 100644index 0000000000..c00c653bca--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r3/recipe.json@@ -0,0 +1,48 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 20,+ "height": 5,+ "corner": [+ 0,+ 0,+ 0+ ],+ "body_name": "Bracket"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 5,+ "width": 20,+ "height": 40,+ "corner": [+ 0,+ 0,+ 0+ ],+ "operation": "join",+ "targets": [+ "Bracket"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 5,+ 10,+ 5+ ]+ ],+ "radius": 3+ }+ }+ ]+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r35-uses-both-faces/expected.json b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r35-uses-both-faces/expected.jsonnew file mode 100644index 0000000000..59fc7a7f1d--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r35-uses-both-faces/expected.json@@ -0,0 +1,21 @@+{+ "sources": [],+ "what": "an L-bracket's inside bend rounded r35, exactly as long as both inside faces: the round uses them up and meets the legs' ends at their edges",+ "source": "analytic",+ "method": "L-bracket: the legs 40x20x5 (x 0..40, z 0..5) and 5x20x40 (x 0..5, z 0..40) joined, 20 deep in y: V0 = 4000 + 4000 - 500 = 7500, 8 faces. The inside faces run 35 from the bend (x = 5..40 on the foot's top, z = 5..40 on the upright's inner face); the r35 round is tangent to them at their far edges (x = 40, z = 40), so both are used up. Added = 20 (1-pi/4) 35^2 = 5257.7450. V = 12757.7450. Faces 8 - 2 + 1 = 7. No continuity check: with both faces it was tangent to used up, the round meets only the legs' end faces (x = 40, z = 40), square to it (creases), so no tangent seam is left to measure.",+ "body_count": 1,+ "volume_mm3": 12757.744996762518,+ "faces": 7,+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 40,+ 20,+ 40+ ]+ }+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r35-uses-both-faces/recipe.json b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r35-uses-both-faces/recipe.jsonnew file mode 100644index 0000000000..63c750b54c--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r35-uses-both-faces/recipe.json@@ -0,0 +1,48 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 20,+ "height": 5,+ "corner": [+ 0,+ 0,+ 0+ ],+ "body_name": "Bracket"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 5,+ "width": 20,+ "height": 40,+ "corner": [+ 0,+ 0,+ 0+ ],+ "operation": "join",+ "targets": [+ "Bracket"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 5,+ 10,+ 5+ ]+ ],+ "radius": 35+ }+ }+ ]+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r36-refused/expected.json b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r36-refused/expected.jsonnew file mode 100644index 0000000000..33712e6559--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r36-refused/expected.json@@ -0,0 +1,8 @@+{+ "sources": [],+ "what": "an L-bracket's inside bend rounded r36, past both inside faces (35 long): refused, naming the largest radius that fits",+ "source": "invariants",+ "method": "a concave round adds material, and an r36 one would touch the inside faces 36 from the bend, past their 35: it would hang over the legs' ends. Owner rule: concave overflow stays refused, naming the largest that fits: 35 (every-l-bracket-inside-bend-r35-uses-both-faces), at the request's three significant digits (step 0.01).",+ "outcome": "refused",+ "refusal": "the largest radius that fits is 35 mm"+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r36-refused/recipe.json b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r36-refused/recipe.jsonnew file mode 100644index 0000000000..e970061b8d--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-inside-bend-r36-refused/recipe.json@@ -0,0 +1,48 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 20,+ "height": 5,+ "corner": [+ 0,+ 0,+ 0+ ],+ "body_name": "Bracket"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 5,+ "width": 20,+ "height": 40,+ "corner": [+ 0,+ 0,+ 0+ ],+ "operation": "join",+ "targets": [+ "Bracket"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 5,+ 10,+ 5+ ]+ ],+ "radius": 36+ }+ }+ ]+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-outside-bend-r5/expected.json b/tests/kernel-cases/fillets/every-l-bracket-outside-bend-r5/expected.jsonnew file mode 100644index 0000000000..52599252bc--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-outside-bend-r5/expected.json@@ -0,0 +1,24 @@+{+ "sources": [],+ "what": "the outside bend of an L-bracket rounded r5",+ "source": "analytic",+ "method": "L-bracket: the legs 40x20x5 (x 0..40, z 0..5) and 5x20x40 (x 0..5, z 0..40) joined, 20 deep in y: V0 = 4000 + 4000 - 500 = 7500, 8 faces. The convex edge (x = 0, z = 0) loses the spandrel (1-pi/4) 25 = 5.365046 along its 20: V = 7500 - 107.3009 = 7392.6991. Faces 9.",+ "body_count": 1,+ "volume_mm3": 7392.6990816987245,+ "faces": 9,+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 40,+ 20,+ 40+ ]+ },+ "continuity": {+ "order": "g1"+ }+}\ No newline at end of filediff --git a/tests/kernel-cases/fillets/every-l-bracket-outside-bend-r5/recipe.json b/tests/kernel-cases/fillets/every-l-bracket-outside-bend-r5/recipe.jsonnew file mode 100644index 0000000000..fd56175bcf--- /dev/null+++ b/tests/kernel-cases/fillets/every-l-bracket-outside-bend-r5/recipe.json@@ -0,0 +1,48 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 20,+ "height": 5,+ "corner": [+ 0,+ 0,+ 0+ ],+ "body_name": "Bracket"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 5,+ "width": 20,+ "height": 40,+ "corner": [+ 0,+ 0,+ 0+ ],+ "operation": "join",+ "targets": [+ "Bracket"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 0,+ 10,+ 0+ ]+ ],+ "radius": 5+ }+ }+ ]+}\ No newline at end of file