SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 493/509: Kernel rig: the turn at a corner of two rounds, Mitre (the default) and Swept, at a pocket's floor and a boss's base, by exact volumes
jyviko632c63f034ea
diff --git a/tests/kernel-cases/fillets/KNOWN_FAILING b/tests/kernel-cases/fillets/KNOWN_FAILINGindex add0a29b01..1c1cd2903b 100644--- a/tests/kernel-cases/fillets/KNOWN_FAILING+++ b/tests/kernel-cases/fillets/KNOWN_FAILING@@ -18,6 +18,8 @@ cov-fillet-g2-four-edge-apex-corner refused: the default setback is shorter thancov-fillet-g2-mixed-corner not supported yet: SMLib sets back a corner only where its edges are all convex or all concavecov-fillet-g2-oblique-three-edge-corner the G2 corner patch meets the new order-2 section's rounds only G1 at one face seam (its volume holds); the corner step rebuilds the patchcov-fillet-g2-pocket-corner the G2 corner patch meets the new order-2 section's rounds only G1 at one face seam (its volume holds); the corner step rebuilds the patch+cov-fillet-turn-swept-boss-base-r1 not supported yet: solid.fillet has no `turn`; the corners are mitred (12508.9676, the Mitre case's volume)+cov-fillet-turn-swept-pocket-sharp-corner-refused-r1 not supported yet: solid.fillet has no `turn`, so the sharp concave corners are mitred, not refusedcov-fillet-variable-box-edge-1-to-5-on-its-cone the variable round's sections are the balls' great circles, not the circles their envelope touches them along: volume 11955.6466 against 11956.2224 (rel 4.8e-5)report-drafted-peg-front-and-concave-rounds-together-r2 not supported yet: SMLib refuses the corner where the drafted front top edge runs tangent into the concave arc (on the cone) as of no kind its blend corners takereport-fillet-concave-arc-and-front-top-edge-together-r5-solver-residues the corner patch where the convex and concave rounds meet stands 0.128 out of the front face (box y min -0.0699 against 0.0579)diff --git a/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/expected.json b/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/expected.jsonnew file mode 100644index 0000000000..926f296cf7--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/expected.json@@ -0,0 +1,14 @@+{+ "sources": [],+ "what": "a pocket whose vertical corners are rounded R3 first, then its floor outline rounded R1 as one tangent chain: the round follows the corners round, a torus at each (no turn to choose)",+ "source": "analytic",+ "method": "pocket 20x10x5 with R3 vertical corners: V0 = 12000 - 5 (200 - (4 - pi) 9) = 11038.628330588. The floor round: straight runs 14, 4, 14, 4 add A each per length; at each corner the section turns about the corner's axis, its spandrel at distance R - u from it (u from the wall): (pi/2)(R A - M) each (Pappus). V = 11050.097960471. Every seam G1. Graded to 1e-7 relative: the Mitre and Swept turns differ by (8 - 2 pi) M = 0.0823 mm^3 at these four corners, 6.6e-6 of the volume.",+ "body_count": 1,+ "volume_mm3": 11050.097960470617,+ "continuity": {+ "order": "g1"+ },+ "tolerance": {+ "rel": 1e-07+ }+}diff --git a/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/recipe.jsonnew file mode 100644index 0000000000..186ffea28b--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/recipe.json@@ -0,0 +1,106 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 30,+ "height": 10,+ "body_name": "Part"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 10+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "Pocket"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 10,+ 10+ ],+ "p1": [+ 30,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "solid.extrude",+ "params": {+ "sketch": "Pocket",+ "distance": -5,+ "operation": "cut",+ "targets": [+ "Part"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 10,+ 10,+ 7.5+ ],+ [+ 30,+ 10,+ 7.5+ ],+ [+ 30,+ 20,+ 7.5+ ],+ [+ 10,+ 20,+ 7.5+ ]+ ],+ "radius": 3.0,+ "tangent_chain": false+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 20,+ 10,+ 5+ ]+ ],+ "radius": 1.0+ }+ }+ ]+}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/expected.json b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/expected.jsonnew file mode 100644index 0000000000..9ec0af3825--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/expected.json@@ -0,0 +1,11 @@+{+ "sources": [],+ "what": "a square boss 10 x 10 x 5 on a plate, its base edges rounded R1, its vertical corners sharp: the default turn, Mitre: at each convex corner the two base rounds run on past it to the bisector plane and meet there",+ "source": "analytic",+ "method": "plate 40x30x10 and boss 10x10x5: V0 = 12500. Each base round adds A along its edge and runs on past both corners to the bisector planes: the integral of (L + 2u) dA = L A + 2 M. Four edges of 10: 40 A + 8 M. V = 12508.967554824. Graded to 1e-7 relative: the Mitre and Swept turns differ by (8 - 2 pi) M = 0.0823 mm^3 at these four corners, 6.6e-6 of the volume.",+ "body_count": 1,+ "volume_mm3": 12508.96755482359,+ "tolerance": {+ "rel": 1e-07+ }+}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/recipe.jsonnew file mode 100644index 0000000000..a1486c6470--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/recipe.json@@ -0,0 +1,59 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 30,+ "height": 10,+ "body_name": "Part"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 10,+ "width": 10,+ "height": 5,+ "corner": [+ 15,+ 10,+ 10+ ],+ "operation": "join",+ "targets": [+ "Part"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 20,+ 10,+ 10+ ],+ [+ 25,+ 15,+ 10+ ],+ [+ 20,+ 20,+ 10+ ],+ [+ 15,+ 15,+ 10+ ]+ ],+ "radius": 1.0,+ "tangent_chain": false+ }+ }+ ]+}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/expected.json b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/expected.jsonnew file mode 100644index 0000000000..fa565b1cf1--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/expected.json@@ -0,0 +1,11 @@+{+ "sources": [],+ "what": "a pocket 20 x 10 x 5 in a plate, its floor edges rounded R1 and its vertical corners left sharp: the default turn, Mitre: at each corner the two floor rounds run on to the corner's bisector plane and meet there",+ "source": "analytic",+ "method": "plate 40x30x10 less the pocket 20x10x5: V0 = 11000. Each floor round adds the spandrel A = (1 - pi/4) r^2 along its edge; at a corner the bisector plane cuts it where x - 10 = u, u its distance from its own wall, so an edge of length L adds the integral of (L - 2u) dA = L A - 2 M, M = r^3 (5/6 - pi/4) the spandrel's first moment about its wall. Four edges (20, 10, 20, 10): 60 A - 8 M = 12.492628837. V = 11012.492628837. The rounds meet each other at the mitre G0 and their faces G1. Graded to 1e-7 relative: the Mitre and Swept turns differ by (8 - 2 pi) M = 0.0823 mm^3 at these four corners, 6.6e-6 of the volume.",+ "body_count": 1,+ "volume_mm3": 11012.492628836666,+ "tolerance": {+ "rel": 1e-07+ }+}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/recipe.jsonnew file mode 100644index 0000000000..0851590c24--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/recipe.json@@ -0,0 +1,93 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 30,+ "height": 10,+ "body_name": "Part"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 10+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "Pocket"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 10,+ 10+ ],+ "p1": [+ 30,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "solid.extrude",+ "params": {+ "sketch": "Pocket",+ "distance": -5,+ "operation": "cut",+ "targets": [+ "Part"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 20,+ 10,+ 5+ ],+ [+ 30,+ 15,+ 5+ ],+ [+ 20,+ 20,+ 5+ ],+ [+ 10,+ 15,+ 5+ ]+ ],+ "radius": 1.0,+ "tangent_chain": false+ }+ }+ ]+}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/expected.json b/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/expected.jsonnew file mode 100644index 0000000000..a3e5889c85--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/expected.json@@ -0,0 +1,14 @@+{+ "sources": [],+ "what": "the same boss's base rounds turned Swept: at each convex corner the section is revolved about the vertical corner edge through the corner's 90 degrees, a torus piece G1 to both rounds",+ "source": "analytic",+ "method": "V0 = 12500. Straight rounds 40 A; each corner the spandrel revolved a quarter turn about the corner edge, at distance u from it: (pi/2) M (Pappus). V = 12500 + 40 A + 2 pi M = 12508.885259020. Every seam G1. Graded to 1e-7 relative: the Mitre and Swept turns differ by (8 - 2 pi) M = 0.0823 mm^3 at these four corners, 6.6e-6 of the volume.",+ "body_count": 1,+ "volume_mm3": 12508.88525901954,+ "continuity": {+ "order": "g1"+ },+ "tolerance": {+ "rel": 1e-07+ }+}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/recipe.jsonnew file mode 100644index 0000000000..7b547431dc--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/recipe.json@@ -0,0 +1,60 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 30,+ "height": 10,+ "body_name": "Part"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 10,+ "width": 10,+ "height": 5,+ "corner": [+ 15,+ 10,+ 10+ ],+ "operation": "join",+ "targets": [+ "Part"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 20,+ 10,+ 10+ ],+ [+ 25,+ 15,+ 10+ ],+ [+ 20,+ 20,+ 10+ ],+ [+ 15,+ 15,+ 10+ ]+ ],+ "radius": 1.0,+ "tangent_chain": false,+ "turn": "swept"+ }+ }+ ]+}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/expected.json b/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/expected.jsonnew file mode 100644index 0000000000..6d08b6e627--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/expected.json@@ -0,0 +1,8 @@+{+ "sources": [],+ "what": "the same pocket's floor rounds asked to turn Swept at sharp concave corners: the ball cannot pass a concave corner rounded less than its radius, so it is refused, naming the corner radius that works",+ "source": "analytic",+ "method": "a swept turn sweeps the round's section along the corner's own rounding; a sharp concave corner (R 0 < r 1) has none the ball can follow: refused, naming R >= 1",+ "outcome": "refused",+ "refusal": "at least 1"+}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/recipe.jsonnew file mode 100644index 0000000000..24cddafb62--- /dev/null+++ b/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/recipe.json@@ -0,0 +1,94 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 30,+ "height": 10,+ "body_name": "Part"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 10+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "Pocket"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 10,+ 10+ ],+ "p1": [+ 30,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "solid.extrude",+ "params": {+ "sketch": "Pocket",+ "distance": -5,+ "operation": "cut",+ "targets": [+ "Part"+ ]+ }+ },+ {+ "command": "solid.fillet",+ "params": {+ "edges": [+ [+ 20,+ 10,+ 5+ ],+ [+ 30,+ 15,+ 5+ ],+ [+ 20,+ 20,+ 5+ ],+ [+ 10,+ 15,+ 5+ ]+ ],+ "radius": 1.0,+ "tangent_chain": false,+ "turn": "swept"+ }+ }+ ]+}