From 4355e15df3f3c85473f5f241259b921025e1deaa 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, a box against a taller one and an identical one, and a tolerance out of range refused Co-Authored-By: Claude Opus 5.5 --- .../cov-compare-identical-boxes/expected.json | 23 ++++++++ .../cov-compare-identical-boxes/recipe.json | 31 +++++++++++ .../expected.json | 8 +++ .../recipe.json | 32 +++++++++++ .../cov-compare-taller-box/expected.json | 53 +++++++++++++++++++ .../cov-compare-taller-box/recipe.json | 31 +++++++++++ 6 files changed, 178 insertions(+) create mode 100644 tests/kernel-cases/inspect/cov-compare-identical-boxes/expected.json create mode 100644 tests/kernel-cases/inspect/cov-compare-identical-boxes/recipe.json create mode 100644 tests/kernel-cases/inspect/cov-compare-refuses-a-tolerance-out-of-range/expected.json create mode 100644 tests/kernel-cases/inspect/cov-compare-refuses-a-tolerance-out-of-range/recipe.json create mode 100644 tests/kernel-cases/inspect/cov-compare-taller-box/expected.json create mode 100644 tests/kernel-cases/inspect/cov-compare-taller-box/recipe.json diff --git a/tests/kernel-cases/inspect/cov-compare-identical-boxes/expected.json b/tests/kernel-cases/inspect/cov-compare-identical-boxes/expected.json new file mode 100644 index 000000000..e1d52a15b --- /dev/null +++ b/tests/kernel-cases/inspect/cov-compare-identical-boxes/expected.json @@ -0,0 +1,23 @@ +{ + "sources": [], + "what": "two identical boxes", + "source": "analytic", + "method": "boxes 40 x 30 x 20 on the same corner: identical, no region, B - A = 0", + "results": [ + { + "command": 2, + "pointer": "/identical", + "value": true + }, + { + "command": 2, + "pointer": "/regions", + "value": [] + }, + { + "command": 2, + "pointer": "/difference/volume_mm3", + "value": 0.0 + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-compare-identical-boxes/recipe.json b/tests/kernel-cases/inspect/cov-compare-identical-boxes/recipe.json new file mode 100644 index 000000000..0d31b1e06 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-compare-identical-boxes/recipe.json @@ -0,0 +1,31 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "A", + "operation": "new" + } + }, + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "B", + "operation": "new" + } + }, + { + "command": "inspect.compare", + "params": { + "a": "A", + "b": "B" + } + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-compare-refuses-a-tolerance-out-of-range/expected.json b/tests/kernel-cases/inspect/cov-compare-refuses-a-tolerance-out-of-range/expected.json new file mode 100644 index 000000000..b9545a4ab --- /dev/null +++ b/tests/kernel-cases/inspect/cov-compare-refuses-a-tolerance-out-of-range/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "compare with a 0 mm tolerance", + "source": "analytic", + "method": "the tolerance must be 0.001 to 10 mm: 0 is refused", + "outcome": "refused", + "refusal": "tolerance" +} diff --git a/tests/kernel-cases/inspect/cov-compare-refuses-a-tolerance-out-of-range/recipe.json b/tests/kernel-cases/inspect/cov-compare-refuses-a-tolerance-out-of-range/recipe.json new file mode 100644 index 000000000..4a8a6c9bc --- /dev/null +++ b/tests/kernel-cases/inspect/cov-compare-refuses-a-tolerance-out-of-range/recipe.json @@ -0,0 +1,32 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "A", + "operation": "new" + } + }, + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "B", + "operation": "new" + } + }, + { + "command": "inspect.compare", + "params": { + "a": "A", + "b": "B", + "tolerance": 0 + } + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-compare-taller-box/expected.json b/tests/kernel-cases/inspect/cov-compare-taller-box/expected.json new file mode 100644 index 000000000..fb9f6b54a --- /dev/null +++ b/tests/kernel-cases/inspect/cov-compare-taller-box/expected.json @@ -0,0 +1,53 @@ +{ + "sources": [], + "what": "a box against one 5 mm taller", + "source": "analytic", + "method": "box A 40 x 30 x 20 and B 40 x 30 x 25 on the same corner: B - A is the slab z 20..25, V 6000, only in B, at most 5 from A", + "results": [ + { + "command": 2, + "pointer": "/a/volume_mm3", + "value": 24000.0 + }, + { + "command": 2, + "pointer": "/b/volume_mm3", + "value": 30000.0 + }, + { + "command": 2, + "pointer": "/difference/volume_mm3", + "value": 6000.0 + }, + { + "command": 2, + "pointer": "/identical", + "value": false + }, + { + "command": 2, + "pointer": "/regions/0/side", + "value": "only_in_b" + }, + { + "command": 2, + "pointer": "/regions/0/volume_mm3", + "value": 6000.0 + }, + { + "command": 2, + "pointer": "/only_in_b/volume_mm3", + "value": 6000.0 + }, + { + "command": 2, + "pointer": "/only_in_a/volume_mm3", + "value": 0.0 + }, + { + "command": 2, + "pointer": "/deviation/max_mm", + "value": 5.0 + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-compare-taller-box/recipe.json b/tests/kernel-cases/inspect/cov-compare-taller-box/recipe.json new file mode 100644 index 000000000..5eb76e184 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-compare-taller-box/recipe.json @@ -0,0 +1,31 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "A", + "operation": "new" + } + }, + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 25, + "body_name": "B", + "operation": "new" + } + }, + { + "command": "inspect.compare", + "params": { + "a": "A", + "b": "B" + } + } + ] +}