From f43a0c7ac6161659162fb3a36308fbab8534edfe Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 29 Oct 2026 17:10:20 -0400 Subject: [PATCH] Kernel rig: inspect cases, the smallest radius of a fillet, an ellipse and a circular edge, and none on a box Co-Authored-By: Claude Opus 5.5 --- .../expected.json | 13 +++++++ .../recipe.json | 18 +++++++++ .../expected.json | 13 +++++++ .../recipe.json | 30 +++++++++++++++ .../expected.json | 13 +++++++ .../recipe.json | 31 +++++++++++++++ .../expected.json | 13 +++++++ .../recipe.json | 38 +++++++++++++++++++ 8 files changed, 169 insertions(+) create mode 100644 tests/kernel-cases/inspect/cov-minimum-radius-of-a-box-is-none/expected.json create mode 100644 tests/kernel-cases/inspect/cov-minimum-radius-of-a-box-is-none/recipe.json create mode 100644 tests/kernel-cases/inspect/cov-minimum-radius-of-a-circular-edge/expected.json create mode 100644 tests/kernel-cases/inspect/cov-minimum-radius-of-a-circular-edge/recipe.json create mode 100644 tests/kernel-cases/inspect/cov-minimum-radius-of-a-fillet/expected.json create mode 100644 tests/kernel-cases/inspect/cov-minimum-radius-of-a-fillet/recipe.json create mode 100644 tests/kernel-cases/inspect/cov-minimum-radius-of-an-ellipse/expected.json create mode 100644 tests/kernel-cases/inspect/cov-minimum-radius-of-an-ellipse/recipe.json diff --git a/tests/kernel-cases/inspect/cov-minimum-radius-of-a-box-is-none/expected.json b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-box-is-none/expected.json new file mode 100644 index 000000000..36d5b98c4 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-box-is-none/expected.json @@ -0,0 +1,13 @@ +{ + "sources": [], + "what": "the smallest radius of a box, which has no curved face", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin: every face is flat: no radius (null)", + "results": [ + { + "command": 1, + "pointer": "/min_radius", + "value": null + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-minimum-radius-of-a-box-is-none/recipe.json b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-box-is-none/recipe.json new file mode 100644 index 000000000..144ba1eeb --- /dev/null +++ b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-box-is-none/recipe.json @@ -0,0 +1,18 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box", + "operation": "new" + } + }, + { + "command": "inspect.minimum_radius", + "params": {} + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-minimum-radius-of-a-circular-edge/expected.json b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-circular-edge/expected.json new file mode 100644 index 000000000..c3f5fc8ef --- /dev/null +++ b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-circular-edge/expected.json @@ -0,0 +1,13 @@ +{ + "sources": [], + "what": "the radius of a cylinder's top edge", + "source": "analytic", + "method": "a cylinder r 5 on (60,0,0): its top edge is a circle of r 5", + "results": [ + { + "command": 1, + "pointer": "/min_radius", + "value": 5.0 + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-minimum-radius-of-a-circular-edge/recipe.json b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-circular-edge/recipe.json new file mode 100644 index 000000000..780d1f903 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-circular-edge/recipe.json @@ -0,0 +1,30 @@ +{ + "commands": [ + { + "command": "solid.cylinder", + "params": { + "base": [ + 60, + 0, + 0 + ], + "radius": 5, + "height": 10, + "body_name": "Cyl", + "operation": "new" + } + }, + { + "command": "inspect.minimum_radius", + "params": { + "edges": [ + [ + 65, + 0, + 10 + ] + ] + } + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-minimum-radius-of-a-fillet/expected.json b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-fillet/expected.json new file mode 100644 index 000000000..72f5a8208 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-fillet/expected.json @@ -0,0 +1,13 @@ +{ + "sources": [], + "what": "the smallest radius over every face of a box with one rounded edge", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin, its top-front edge (y 0, z 20) rounded r 3: the flat faces have none, the round is a cylinder of r 3: the smallest radius is 3", + "results": [ + { + "command": 2, + "pointer": "/min_radius", + "value": 3.0 + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-minimum-radius-of-a-fillet/recipe.json b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-fillet/recipe.json new file mode 100644 index 000000000..3eef8050a --- /dev/null +++ b/tests/kernel-cases/inspect/cov-minimum-radius-of-a-fillet/recipe.json @@ -0,0 +1,31 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box", + "operation": "new" + } + }, + { + "command": "solid.fillet", + "params": { + "edges": [ + [ + 20, + 0, + 20 + ] + ], + "radius": 3 + } + }, + { + "command": "inspect.minimum_radius", + "params": {} + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-minimum-radius-of-an-ellipse/expected.json b/tests/kernel-cases/inspect/cov-minimum-radius-of-an-ellipse/expected.json new file mode 100644 index 000000000..3c8dd17bf --- /dev/null +++ b/tests/kernel-cases/inspect/cov-minimum-radius-of-an-ellipse/expected.json @@ -0,0 +1,13 @@ +{ + "sources": [], + "what": "the smallest radius of a sketch ellipse", + "source": "analytic", + "method": "ellipse a 10, b 4: tightest at the ends of the major axis, b^2 / a = 1.6, at (+-10, 0)", + "results": [ + { + "command": 3, + "pointer": "/min_radius", + "value": 1.6 + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-minimum-radius-of-an-ellipse/recipe.json b/tests/kernel-cases/inspect/cov-minimum-radius-of-an-ellipse/recipe.json new file mode 100644 index 000000000..db95c8624 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-minimum-radius-of-an-ellipse/recipe.json @@ -0,0 +1,38 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "S" + } + }, + { + "command": "sketch.ellipse", + "params": { + "center": [ + 0, + 0 + ], + "major": [ + 10, + 0 + ], + "minor_radius": 4 + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "inspect.minimum_radius", + "params": { + "sketch": "S", + "curves": [ + "e1" + ] + } + } + ] +}