From 776d979ce115cb74ea619dad855f1303978e8b4b 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, an axis square to a flat face and to a cylinder through a point, and a point on the axis refused Co-Authored-By: Claude Opus 5.5 --- .../expected.json | 8 ++++ .../recipe.json | 38 +++++++++++++++++++ .../expected.json | 22 +++++++++++ .../recipe.json | 38 +++++++++++++++++++ .../expected.json | 22 +++++++++++ .../recipe.json | 33 ++++++++++++++++ 6 files changed, 161 insertions(+) create mode 100644 tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-refuses-a-point-on-its-axis/expected.json create mode 100644 tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-refuses-a-point-on-its-axis/recipe.json create mode 100644 tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-through-an-outside-point/expected.json create mode 100644 tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-through-an-outside-point/recipe.json create mode 100644 tests/kernel-cases/construction/cov-axis-normal-to-a-flat-face/expected.json create mode 100644 tests/kernel-cases/construction/cov-axis-normal-to-a-flat-face/recipe.json diff --git a/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-refuses-a-point-on-its-axis/expected.json b/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-refuses-a-point-on-its-axis/expected.json new file mode 100644 index 000000000..37d549807 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-refuses-a-point-on-its-axis/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "an axis square to a cylinder's side through a point on the cylinder's axis", + "source": "analytic", + "method": "cylinder r 5, h 10 on (60,0,0) along +Z: every radial line passes through (60,0,5), so no one normal: refused", + "outcome": "refused", + "refusal": "the point is on the face's axis" +} diff --git a/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-refuses-a-point-on-its-axis/recipe.json b/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-refuses-a-point-on-its-axis/recipe.json new file mode 100644 index 000000000..4b16354ba --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-refuses-a-point-on-its-axis/recipe.json @@ -0,0 +1,38 @@ +{ + "commands": [ + { + "command": "solid.cylinder", + "params": { + "base": [ + 60, + 0, + 0 + ], + "radius": 5, + "height": 10, + "body_name": "Cyl", + "operation": "new" + } + }, + { + "command": "construct.axis.normal_to_face", + "params": { + "face": { + "face": [ + 65, + 0, + 5 + ] + }, + "point": { + "point": [ + 60, + 0, + 5 + ] + }, + "name": "A" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-through-an-outside-point/expected.json b/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-through-an-outside-point/expected.json new file mode 100644 index 000000000..874e1a597 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-through-an-outside-point/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "an axis square to a cylinder's side through a point outside it", + "source": "analytic", + "method": "cylinder r 5, h 10 on (60,0,0) along +Z: through (66,8,5), 10 from the axis along (0.6,0.8,0): the radial line through (60,0,5) along (3,4,0)", + "construction": { + "A": { + "axis": { + "through": [ + 60, + 0, + 5 + ], + "dir": [ + 3, + 4, + 0 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-through-an-outside-point/recipe.json b/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-through-an-outside-point/recipe.json new file mode 100644 index 000000000..d242a4a99 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-normal-to-a-cylinder-through-an-outside-point/recipe.json @@ -0,0 +1,38 @@ +{ + "commands": [ + { + "command": "solid.cylinder", + "params": { + "base": [ + 60, + 0, + 0 + ], + "radius": 5, + "height": 10, + "body_name": "Cyl", + "operation": "new" + } + }, + { + "command": "construct.axis.normal_to_face", + "params": { + "face": { + "face": [ + 65, + 0, + 5 + ] + }, + "point": { + "point": [ + 66, + 8, + 5 + ] + }, + "name": "A" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-axis-normal-to-a-flat-face/expected.json b/tests/kernel-cases/construction/cov-axis-normal-to-a-flat-face/expected.json new file mode 100644 index 000000000..5014fa9ca --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-normal-to-a-flat-face/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "an axis square to a box's top through a point above it", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin (x 0..40, y 0..30, z 0..20): the top is z = 20, normal Z; through (12,7,30) square to it: the line x 12, y 7 along Z", + "construction": { + "A": { + "axis": { + "through": [ + 12, + 7, + 20 + ], + "dir": [ + 0, + 0, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-axis-normal-to-a-flat-face/recipe.json b/tests/kernel-cases/construction/cov-axis-normal-to-a-flat-face/recipe.json new file mode 100644 index 000000000..bfee23e78 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-normal-to-a-flat-face/recipe.json @@ -0,0 +1,33 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.axis.normal_to_face", + "params": { + "face": { + "face": [ + 10, + 10, + 20 + ] + }, + "point": { + "point": [ + 12, + 7, + 30 + ] + }, + "name": "A" + } + } + ] +}