From e0e3798ae7ff4df57cd29e23a5bb089eb884d290 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 midplane of parallel faces, of a corner, and of a plane with itself Co-Authored-By: Claude Opus 5.5 --- .../expected.json | 22 +++++++++++++ .../recipe.json | 27 +++++++++++++++ .../expected.json | 22 +++++++++++++ .../recipe.json | 33 +++++++++++++++++++ .../expected.json | 22 +++++++++++++ .../recipe.json | 12 +++++++ 6 files changed, 138 insertions(+) create mode 100644 tests/kernel-cases/construction/cov-plane-midplane-between-parallel-planes/expected.json create mode 100644 tests/kernel-cases/construction/cov-plane-midplane-between-parallel-planes/recipe.json create mode 100644 tests/kernel-cases/construction/cov-plane-midplane-bisects-a-corner/expected.json create mode 100644 tests/kernel-cases/construction/cov-plane-midplane-bisects-a-corner/recipe.json create mode 100644 tests/kernel-cases/construction/cov-plane-midplane-of-a-plane-with-itself/expected.json create mode 100644 tests/kernel-cases/construction/cov-plane-midplane-of-a-plane-with-itself/recipe.json diff --git a/tests/kernel-cases/construction/cov-plane-midplane-between-parallel-planes/expected.json b/tests/kernel-cases/construction/cov-plane-midplane-between-parallel-planes/expected.json new file mode 100644 index 0000000000..16ed5baa54 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-midplane-between-parallel-planes/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the midplane of XY and a box's top", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin (x 0..40, y 0..30, z 0..20): halfway between z = 0 and z = 20: z = 10", + "construction": { + "M": { + "plane": { + "through": [ + 5, + 5, + 10 + ], + "normal": [ + 0, + 0, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-plane-midplane-between-parallel-planes/recipe.json b/tests/kernel-cases/construction/cov-plane-midplane-between-parallel-planes/recipe.json new file mode 100644 index 0000000000..9bf6739beb --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-midplane-between-parallel-planes/recipe.json @@ -0,0 +1,27 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.plane.midplane", + "params": { + "a": "XY", + "b": { + "face": [ + 20, + 15, + 20 + ] + }, + "name": "M" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-plane-midplane-bisects-a-corner/expected.json b/tests/kernel-cases/construction/cov-plane-midplane-bisects-a-corner/expected.json new file mode 100644 index 0000000000..a80bfa0f89 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-midplane-bisects-a-corner/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the midplane of two box sides meeting at a corner", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin (x 0..40, y 0..30, z 0..20): x = 40 and y = 30 meet on the vertical line through (40,30); the plane bisecting the box's 90 deg corner holds (1,1,0) and Z: normal (1,-1,0), through (40,30,0)", + "construction": { + "M": { + "plane": { + "through": [ + 40, + 30, + 0 + ], + "normal": [ + 1, + -1, + 0 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-plane-midplane-bisects-a-corner/recipe.json b/tests/kernel-cases/construction/cov-plane-midplane-bisects-a-corner/recipe.json new file mode 100644 index 0000000000..bc59c6462d --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-midplane-bisects-a-corner/recipe.json @@ -0,0 +1,33 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.plane.midplane", + "params": { + "a": { + "face": [ + 40, + 15, + 10 + ] + }, + "b": { + "face": [ + 20, + 30, + 10 + ] + }, + "name": "M" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-plane-midplane-of-a-plane-with-itself/expected.json b/tests/kernel-cases/construction/cov-plane-midplane-of-a-plane-with-itself/expected.json new file mode 100644 index 0000000000..136a388f5d --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-midplane-of-a-plane-with-itself/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the midplane of a plane and itself", + "source": "analytic", + "method": "halfway between XY and XY: XY", + "construction": { + "M": { + "plane": { + "through": [ + 0, + 0, + 0 + ], + "normal": [ + 0, + 0, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-plane-midplane-of-a-plane-with-itself/recipe.json b/tests/kernel-cases/construction/cov-plane-midplane-of-a-plane-with-itself/recipe.json new file mode 100644 index 0000000000..9a0ca7c1d5 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-midplane-of-a-plane-with-itself/recipe.json @@ -0,0 +1,12 @@ +{ + "commands": [ + { + "command": "construct.plane.midplane", + "params": { + "a": "XY", + "b": "XY", + "name": "M" + } + } + ] +}