From 1e9cefe1e86ce91561667102eb2a20131bbb8930 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 29 Oct 2026 16:50:20 -0400 Subject: [PATCH] Kernel rig: web cases, two gussets in a channel's corners and two walls grown along the sketch normal Co-Authored-By: Claude Opus 5.5 --- .../expected.json | 20 +++ .../recipe.json | 97 ++++++++++++++ .../expected.json | 20 +++ .../recipe.json | 119 ++++++++++++++++++ 4 files changed, 256 insertions(+) create mode 100644 tests/kernel-cases/sweeps/cov-web-normal-two-walls-reach-the-block/expected.json create mode 100644 tests/kernel-cases/sweeps/cov-web-normal-two-walls-reach-the-block/recipe.json create mode 100644 tests/kernel-cases/sweeps/cov-web-two-gussets-in-a-channel/expected.json create mode 100644 tests/kernel-cases/sweeps/cov-web-two-gussets-in-a-channel/recipe.json diff --git a/tests/kernel-cases/sweeps/cov-web-normal-two-walls-reach-the-block/expected.json b/tests/kernel-cases/sweeps/cov-web-normal-two-walls-reach-the-block/expected.json new file mode 100644 index 000000000..99b57a6e8 --- /dev/null +++ b/tests/kernel-cases/sweeps/cov-web-normal-two-walls-reach-the-block/expected.json @@ -0,0 +1,20 @@ +{ + "sources": [], + "what": "a web along the sketch normal: two 10 mm lines on a plane 20 mm in front of a block, each a wall grown to the block", + "source": "analytic", + "method": "each wall runs along +Y from y=-20 to the block face y=0: 10 long, 2 thick in the plane, 20 deep: 400 each; V = 24000 + 800", + "body_count": 1, + "volume_mm3": 24800.0, + "bbox": { + "min": [ + 0, + -20, + 0 + ], + "max": [ + 60, + 40, + 10 + ] + } +} diff --git a/tests/kernel-cases/sweeps/cov-web-normal-two-walls-reach-the-block/recipe.json b/tests/kernel-cases/sweeps/cov-web-normal-two-walls-reach-the-block/recipe.json new file mode 100644 index 000000000..d6a39180f --- /dev/null +++ b/tests/kernel-cases/sweeps/cov-web-normal-two-walls-reach-the-block/recipe.json @@ -0,0 +1,97 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 60, + "width": 40, + "height": 10, + "corner": [ + 0, + 0, + 0 + ], + "body_name": "Block" + } + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0.0, + -20.0, + 0.0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "WebS" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 10, + 5 + ], + [ + 20, + 5 + ] + ], + "ids": [ + "w1" + ], + "infer": false + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 40, + 5 + ], + [ + 50, + 5 + ] + ], + "ids": [ + "w2" + ], + "infer": false + } + }, + { + "command": "sketch.finish", + "params": { + "sketch": "WebS" + } + }, + { + "command": "solid.web", + "params": { + "sketch": "WebS", + "curves": [ + "w1", + "w2" + ], + "thickness": 2, + "direction": "normal" + } + } + ] +} diff --git a/tests/kernel-cases/sweeps/cov-web-two-gussets-in-a-channel/expected.json b/tests/kernel-cases/sweeps/cov-web-two-gussets-in-a-channel/expected.json new file mode 100644 index 000000000..3d69f8bd6 --- /dev/null +++ b/tests/kernel-cases/sweeps/cov-web-two-gussets-in-a-channel/expected.json @@ -0,0 +1,20 @@ +{ + "sources": [], + "what": "a web of two lines, one wall each, across the two inside corners of a U channel", + "source": "analytic", + "method": "channel: base 60x40x5 + two walls 5x40x35 = 26000; each line closes a right triangle of legs 15 with its wall and the base: 2 * 112.5 * 2 thick = 450", + "body_count": 1, + "volume_mm3": 26450.0, + "bbox": { + "min": [ + 0, + 0, + 0 + ], + "max": [ + 60, + 40, + 40 + ] + } +} diff --git a/tests/kernel-cases/sweeps/cov-web-two-gussets-in-a-channel/recipe.json b/tests/kernel-cases/sweeps/cov-web-two-gussets-in-a-channel/recipe.json new file mode 100644 index 000000000..e90984050 --- /dev/null +++ b/tests/kernel-cases/sweeps/cov-web-two-gussets-in-a-channel/recipe.json @@ -0,0 +1,119 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 60, + "width": 40, + "height": 5, + "body_name": "Bracket" + } + }, + { + "command": "solid.box", + "params": { + "length": 5, + "width": 40, + "height": 40, + "corner": [ + 0, + 0, + 0 + ], + "operation": "join" + } + }, + { + "command": "solid.box", + "params": { + "length": 5, + "width": 40, + "height": 40, + "corner": [ + 55, + 0, + 0 + ], + "operation": "join" + } + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0, + 20, + 0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 0, + 1 + ] + }, + "name": "Gussets" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 5, + 20 + ], + [ + 20, + 5 + ] + ], + "ids": [ + "g1" + ], + "infer": false + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 40, + 5 + ], + [ + 55, + 20 + ] + ], + "ids": [ + "g2" + ], + "infer": false + } + }, + { + "command": "sketch.finish", + "params": { + "sketch": "Gussets" + } + }, + { + "command": "solid.web", + "params": { + "sketch": "Gussets", + "curves": [ + "g1", + "g2" + ], + "thickness": 2 + } + } + ] +}