From 17c0aee44835e227b2ad0495049c4d3c80fa2769 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 29 Oct 2026 17:10:12 -0400 Subject: [PATCH] Kernel rig: construction cases, the line where two planes meet, square and slanted, and parallel planes refused Co-Authored-By: Claude Opus 5.5 --- .../expected.json | 22 +++++++++++ .../recipe.json | 33 ++++++++++++++++ .../expected.json | 8 ++++ .../recipe.json | 27 +++++++++++++ .../cov-axis-two-planes-slanted/expected.json | 22 +++++++++++ .../cov-axis-two-planes-slanted/recipe.json | 38 +++++++++++++++++++ 6 files changed, 150 insertions(+) create mode 100644 tests/kernel-cases/construction/cov-axis-two-planes-box-top-and-side/expected.json create mode 100644 tests/kernel-cases/construction/cov-axis-two-planes-box-top-and-side/recipe.json create mode 100644 tests/kernel-cases/construction/cov-axis-two-planes-refuses-parallel-planes/expected.json create mode 100644 tests/kernel-cases/construction/cov-axis-two-planes-refuses-parallel-planes/recipe.json create mode 100644 tests/kernel-cases/construction/cov-axis-two-planes-slanted/expected.json create mode 100644 tests/kernel-cases/construction/cov-axis-two-planes-slanted/recipe.json diff --git a/tests/kernel-cases/construction/cov-axis-two-planes-box-top-and-side/expected.json b/tests/kernel-cases/construction/cov-axis-two-planes-box-top-and-side/expected.json new file mode 100644 index 000000000..83f888078 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-two-planes-box-top-and-side/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the axis where a box's top and right side meet", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin (x 0..40, y 0..30, z 0..20): z = 20 and x = 40 meet on the line through (40,0,20) along Y", + "construction": { + "A": { + "axis": { + "through": [ + 40, + 0, + 20 + ], + "dir": [ + 0, + 1, + 0 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-axis-two-planes-box-top-and-side/recipe.json b/tests/kernel-cases/construction/cov-axis-two-planes-box-top-and-side/recipe.json new file mode 100644 index 000000000..6ed68fc37 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-two-planes-box-top-and-side/recipe.json @@ -0,0 +1,33 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.axis.two_planes", + "params": { + "a": { + "face": [ + 20, + 15, + 20 + ] + }, + "b": { + "face": [ + 40, + 15, + 10 + ] + }, + "name": "A" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-axis-two-planes-refuses-parallel-planes/expected.json b/tests/kernel-cases/construction/cov-axis-two-planes-refuses-parallel-planes/expected.json new file mode 100644 index 000000000..adff5fb01 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-two-planes-refuses-parallel-planes/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "an axis between two parallel planes", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin (x 0..40, y 0..30, z 0..20): XY and the top z = 20 are parallel and never meet: refused", + "outcome": "refused", + "refusal": "the planes are parallel" +} diff --git a/tests/kernel-cases/construction/cov-axis-two-planes-refuses-parallel-planes/recipe.json b/tests/kernel-cases/construction/cov-axis-two-planes-refuses-parallel-planes/recipe.json new file mode 100644 index 000000000..86d4d484f --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-two-planes-refuses-parallel-planes/recipe.json @@ -0,0 +1,27 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.axis.two_planes", + "params": { + "a": "XY", + "b": { + "face": [ + 20, + 15, + 20 + ] + }, + "name": "A" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-axis-two-planes-slanted/expected.json b/tests/kernel-cases/construction/cov-axis-two-planes-slanted/expected.json new file mode 100644 index 000000000..409b8c0da --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-two-planes-slanted/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the axis where two slanted planes meet", + "source": "analytic", + "method": "x + y = 10 (normal (1,1,0) through (10,0,0)) and y + z = 6 (normal (0,1,1) through (0,0,6)): direction (1,1,0) x (0,1,1) = (1,-1,1); (10,0,6) is on both", + "construction": { + "A": { + "axis": { + "through": [ + 10, + 0, + 6 + ], + "dir": [ + 1, + -1, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-axis-two-planes-slanted/recipe.json b/tests/kernel-cases/construction/cov-axis-two-planes-slanted/recipe.json new file mode 100644 index 000000000..39a4f9c18 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-two-planes-slanted/recipe.json @@ -0,0 +1,38 @@ +{ + "commands": [ + { + "command": "construct.axis.two_planes", + "params": { + "a": { + "plane": { + "origin": [ + 10, + 0, + 0 + ], + "normal": [ + 1, + 1, + 0 + ] + } + }, + "b": { + "plane": { + "origin": [ + 0, + 0, + 6 + ], + "normal": [ + 0, + 1, + 1 + ] + } + }, + "name": "A" + } + } + ] +}