Skip to content

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

Wave 411/509: Kernel rig: everyday rounds on a block joined to a cylinder

jyviko5c69b88375be
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-curvature/expected.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-curvature/expected.json
new file mode 100644
index 0000000000..ef56e6b184
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-curvature/expected.json
@@ -0,0 +1,11 @@
+{
+ "sources": [],
+ "what": "a block's long top edge rounded curvature-continuous (Type: Curvature) size 2, running from its end face into the cylinder the block is joined to",
+ "source": "analytic",
+ "method": "block 40x10x15 (x 0..40, y -5..5) joined to the cylinder R10 x 30 on the z axis, the block's end on the cylinder's diameter x = 0 so its sides y = +-5 meet the wall at vertical creases: V0 = 6000 + 3000 pi - 15 * (the disc's part with x > 0, |y| <= 5: 2 (y/2 sqrt(100-y^2) + 50 asin(y/10)) at y=5 = 95.661148) = 13989.8607. The edge y = 5, z = 15 between the planar top and side faces, ending on the planar end face x = 40 and on the cylinder wall; the section is the quintic Bezier of setback 2 (fillets/862), removed from the end face back to the wall, which keeps its material: strip length 40 - sqrt(100 - y^2) at height y. Removed = int over the region between the corner and the quintic of (40 - sqrt(100-y^2)) (Green on the Bezier with the exact antiderivative, Gauss-Legendre) = 18.6183. V = 13971.2424. Both seams of the round with the planar faces G2.",
+ "body_count": 1,
+ "volume_mm3": 13971.24243835931,
+ "continuity": {
+ "order": "g2"
+ }
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-curvature/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-curvature/recipe.json
new file mode 100644
index 0000000000..a4920aed69
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-curvature/recipe.json
@@ -0,0 +1,48 @@
+{
+ "commands": [
+ {
+ "command": "solid.box",
+ "params": {
+ "length": 40,
+ "width": 10,
+ "height": 15,
+ "corner": [
+ 0,
+ -5,
+ 0
+ ],
+ "body_name": "Block"
+ }
+ },
+ {
+ "command": "solid.cylinder",
+ "params": {
+ "radius": 10,
+ "height": 30,
+ "base": [
+ 0,
+ 0,
+ 0
+ ],
+ "operation": "join",
+ "targets": [
+ "Block"
+ ]
+ }
+ },
+ {
+ "command": "solid.fillet",
+ "params": {
+ "edges": [
+ [
+ 30,
+ 5,
+ 15
+ ]
+ ],
+ "radius": 2,
+ "type": "curvature"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/expected.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/expected.json
new file mode 100644
index 0000000000..aa3648951b
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/expected.json
@@ -0,0 +1,11 @@
+{
+ "sources": [],
+ "what": "a block's long top edge rounded r2 (Tangent chain off), running from the block's end face into the cylinder the block is joined to",
+ "source": "analytic",
+ "method": "block 40x10x15 (x 0..40, y -5..5) joined to the cylinder R10 x 30 on the z axis, the block's end on the cylinder's diameter x = 0 so its sides y = +-5 meet the wall at vertical creases: V0 = 6000 + 3000 pi - 15 * (the disc's part with x > 0, |y| <= 5: 2 (y/2 sqrt(100-y^2) + 50 asin(y/10)) at y=5 = 95.661148) = 13989.8607. The edge y = 5, z = 15 runs from the wall (x = sqrt 75) to the end face x = 40. Its r2 round removes the spandrel (y in [3,5], z in [13,15], outside the circle about (3,13)) from the end face back to where it runs into the cylinder, which keeps its material: at height y the strip is 40 - sqrt(100 - y^2) long. Removed = int over the spandrel of (40 - sqrt(100-y^2)) (Gauss-Legendre) = 26.7021. V = 13963.1587.",
+ "body_count": 1,
+ "volume_mm3": 13963.158669185039,
+ "continuity": {
+ "order": "g1"
+ }
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/recipe.json
new file mode 100644
index 0000000000..3447ee56ac
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/recipe.json
@@ -0,0 +1,48 @@
+{
+ "commands": [
+ {
+ "command": "solid.box",
+ "params": {
+ "length": 40,
+ "width": 10,
+ "height": 15,
+ "corner": [
+ 0,
+ -5,
+ 0
+ ],
+ "body_name": "Block"
+ }
+ },
+ {
+ "command": "solid.cylinder",
+ "params": {
+ "radius": 10,
+ "height": 30,
+ "base": [
+ 0,
+ 0,
+ 0
+ ],
+ "operation": "join",
+ "targets": [
+ "Block"
+ ]
+ }
+ },
+ {
+ "command": "solid.fillet",
+ "params": {
+ "edges": [
+ [
+ 30,
+ 5,
+ 15
+ ]
+ ],
+ "radius": 2,
+ "tangent_chain": false
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-concave-arc-r2/expected.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-concave-arc-r2/expected.json
new file mode 100644
index 0000000000..e332fb1ad7
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-concave-arc-r2/expected.json
@@ -0,0 +1,11 @@
+{
+ "sources": [],
+ "what": "the concave arc where a block's top meets the taller cylinder it is joined to, rounded r2, the block's sides meeting the wall at creases",
+ "source": "analytic",
+ "method": "block 40x10x15 (x 0..40, y -5..5) joined to the cylinder R10 x 30 on the z axis, the block's end on the cylinder's diameter x = 0 so its sides y = +-5 meet the wall at vertical creases: V0 = 6000 + 3000 pi - 15 * (the disc's part with x > 0, |y| <= 5: 2 (y/2 sqrt(100-y^2) + 50 asin(y/10)) at y=5 = 95.661148) = 13989.8607. The arc (z = 15, rho = 10, |y| <= 5) rounded r2 adds the spandrel between the top plane and the wall (rho in [10,12], z in [15,17], outside the circle about (12,17) of radius 2), revolved about the axis and ended by the block's side planes |y| = 5, which the round runs into: at radius rho it spans 2 asin(5/rho). Added = int over the spandrel of 2 rho asin(5/rho) drho dz (rho = 10 + 2(1-cos th), Gauss-Legendre) = 8.9528. V = 13998.8136.",
+ "body_count": 1,
+ "volume_mm3": 13998.81358766597,
+ "continuity": {
+ "order": "g1"
+ }
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-concave-arc-r2/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-concave-arc-r2/recipe.json
new file mode 100644
index 0000000000..5fc80a70a2
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-concave-arc-r2/recipe.json
@@ -0,0 +1,47 @@
+{
+ "commands": [
+ {
+ "command": "solid.box",
+ "params": {
+ "length": 40,
+ "width": 10,
+ "height": 15,
+ "corner": [
+ 0,
+ -5,
+ 0
+ ],
+ "body_name": "Block"
+ }
+ },
+ {
+ "command": "solid.cylinder",
+ "params": {
+ "radius": 10,
+ "height": 30,
+ "base": [
+ 0,
+ 0,
+ 0
+ ],
+ "operation": "join",
+ "targets": [
+ "Block"
+ ]
+ }
+ },
+ {
+ "command": "solid.fillet",
+ "params": {
+ "edges": [
+ [
+ 10,
+ 0,
+ 15
+ ]
+ ],
+ "radius": 2
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-cylinder-top-rim-r2/expected.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-cylinder-top-rim-r2/expected.json
new file mode 100644
index 0000000000..a39f9cd921
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-cylinder-top-rim-r2/expected.json
@@ -0,0 +1,11 @@
+{
+ "sources": [],
+ "what": "the top rim of a cylinder that a block is joined to, rounded r2",
+ "source": "analytic",
+ "method": "block 40x10x15 (x 0..40, y -5..5) joined to the cylinder R10 x 30 on the z axis, the block's end on the cylinder's diameter x = 0 so its sides y = +-5 meet the wall at vertical creases: V0 = 6000 + 3000 pi - 15 * (the disc's part with x > 0, |y| <= 5: 2 (y/2 sqrt(100-y^2) + 50 asin(y/10)) at y=5 = 95.661148) = 13989.8607. The rim (rho = 10, z = 30), well above the block, rounded r2 removes the spandrel (1-pi/4) r^2 = 0.858407 revolved once, its centroid at rho = 10 - r (5/6-pi/4)/(1-pi/4) (first moment about the wall r^3 (5/6-pi/4) = 0.383481): Pappus 2 pi (10 A - M) = 51.5258. V = 13938.3349.",
+ "body_count": 1,
+ "volume_mm3": 13938.334904711712,
+ "continuity": {
+ "order": "g1"
+ }
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-cylinder-top-rim-r2/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-cylinder-top-rim-r2/recipe.json
new file mode 100644
index 0000000000..326b3d17dc
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-cylinder-top-rim-r2/recipe.json
@@ -0,0 +1,47 @@
+{
+ "commands": [
+ {
+ "command": "solid.box",
+ "params": {
+ "length": 40,
+ "width": 10,
+ "height": 15,
+ "corner": [
+ 0,
+ -5,
+ 0
+ ],
+ "body_name": "Block"
+ }
+ },
+ {
+ "command": "solid.cylinder",
+ "params": {
+ "radius": 10,
+ "height": 30,
+ "base": [
+ 0,
+ 0,
+ 0
+ ],
+ "operation": "join",
+ "targets": [
+ "Block"
+ ]
+ }
+ },
+ {
+ "command": "solid.fillet",
+ "params": {
+ "edges": [
+ [
+ -10,
+ 0,
+ 30
+ ]
+ ],
+ "radius": 2
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/expected.json b/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/expected.json
new file mode 100644
index 0000000000..8756858792
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/expected.json
@@ -0,0 +1,13 @@
+{
+ "sources": [],
+ "what": "the long top edge of a block as wide as the cylinder it is joined to, rounded r2 alone (Tangent chain off): it ends where it runs on tangentially into the concave arc at the wall",
+ "source": "analytic",
+ "method": "block 40x20x15 (x 0..40, y -10..10) joined to the cylinder R10 x 30 on the z axis: the block's sides y = +-10 run tangent into the cylinder wall at x = 0; V0 = 12000 + 3000 pi - 15 * 50 pi = 19068.5835. The edge y = 10, z = 15 (x 0..40) rounded r2 alone removes the spandrel (y in [8,10], z in [13,15]) from the end face x = 40 back to the cylinder, which keeps its material: strip 40 - sqrt(100-y^2) long. Removed = 32.0577 (Gauss-Legendre). V = 19036.5258. Or a refusal saying the edge continues tangentially (the 1207 precedent).",
+ "body_count": 1,
+ "outcome": "solid_or_refused",
+ "refusal": "continues tangentially",
+ "volume_mm3": 19036.52579199075,
+ "continuity": {
+ "order": "g1"
+ }
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/recipe.json
new file mode 100644
index 0000000000..646c62daa3
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/recipe.json
@@ -0,0 +1,48 @@
+{
+ "commands": [
+ {
+ "command": "solid.box",
+ "params": {
+ "length": 40,
+ "width": 20,
+ "height": 15,
+ "corner": [
+ 0,
+ -10,
+ 0
+ ],
+ "body_name": "Block"
+ }
+ },
+ {
+ "command": "solid.cylinder",
+ "params": {
+ "radius": 10,
+ "height": 30,
+ "base": [
+ 0,
+ 0,
+ 0
+ ],
+ "operation": "join",
+ "targets": [
+ "Block"
+ ]
+ }
+ },
+ {
+ "command": "solid.fillet",
+ "params": {
+ "edges": [
+ [
+ 30,
+ 10,
+ 15
+ ]
+ ],
+ "radius": 2,
+ "tangent_chain": false
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/expected.json b/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/expected.json
new file mode 100644
index 0000000000..b7dd930088
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/expected.json
@@ -0,0 +1,13 @@
+{
+ "sources": [],
+ "what": "the concave half circle where a block as wide as the cylinder's diameter meets the cylinder's wall above its top, rounded r2 alone (Tangent chain off)",
+ "source": "analytic",
+ "method": "block 40x20x15 (x 0..40, y -10..10) joined to the cylinder R10 x 30 on the z axis: the block's sides y = +-10 run tangent into the cylinder wall at x = 0; V0 = 12000 + 3000 pi - 15 * 50 pi = 19068.5835. The arc (z = 15, rho = 10, x > 0) ends at (0, +-10, 15), where the block's top-side edges go on tangentially. Rounded r2 alone, the round adds the spandrel (rho in [10,12], z in [15,17]) over the block only, between its side planes |y| = 10: at radius rho it spans 2 asin(10/rho), running out to nothing at the ends. Added = int over the spandrel of 2 rho asin(10/rho) (Gauss-Legendre) = 23.3785. V = 19091.9620. Or a refusal saying the edge continues tangentially (as fillets/1207-fillet-bar-top-edge-after-boss-arc-round-no-tangent-chain).",
+ "body_count": 1,
+ "outcome": "solid_or_refused",
+ "refusal": "continues tangentially",
+ "volume_mm3": 19091.962003483477,
+ "continuity": {
+ "order": "g1"
+ }
+}
\ No newline at end of file
diff --git a/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/recipe.json
new file mode 100644
index 0000000000..c7f769528e
--- /dev/null
+++ b/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/recipe.json
@@ -0,0 +1,48 @@
+{
+ "commands": [
+ {
+ "command": "solid.box",
+ "params": {
+ "length": 40,
+ "width": 20,
+ "height": 15,
+ "corner": [
+ 0,
+ -10,
+ 0
+ ],
+ "body_name": "Block"
+ }
+ },
+ {
+ "command": "solid.cylinder",
+ "params": {
+ "radius": 10,
+ "height": 30,
+ "base": [
+ 0,
+ 0,
+ 0
+ ],
+ "operation": "join",
+ "targets": [
+ "Block"
+ ]
+ }
+ },
+ {
+ "command": "solid.fillet",
+ "params": {
+ "edges": [
+ [
+ 10,
+ 0,
+ 15
+ ]
+ ],
+ "radius": 2,
+ "tangent_chain": false
+ }
+ }
+ ]
+}
\ No newline at end of file