diff --git a/tests/kernel-cases/construction/cov-plane-two-edges-meeting-at-a-corner/expected.json b/tests/kernel-cases/construction/cov-plane-two-edges-meeting-at-a-corner/expected.json new file mode 100644 index 0000000000..3893d49b6d --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-two-edges-meeting-at-a-corner/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the plane through two box edges that meet 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): the top edges y 0, z 20 (along X) and x 40, z 20 (along Y) meet at (40,0,20): the top, z = 20", + "construction": { + "E": { + "plane": { + "through": [ + 1, + 1, + 20 + ], + "normal": [ + 0, + 0, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-plane-two-edges-meeting-at-a-corner/recipe.json b/tests/kernel-cases/construction/cov-plane-two-edges-meeting-at-a-corner/recipe.json new file mode 100644 index 0000000000..d8df250e43 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-two-edges-meeting-at-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.two_edges", + "params": { + "a": { + "edge": [ + 20, + 0, + 20 + ] + }, + "b": { + "edge": [ + 40, + 15, + 20 + ] + }, + "name": "E" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-plane-two-edges-opposite-box-edges/expected.json b/tests/kernel-cases/construction/cov-plane-two-edges-opposite-box-edges/expected.json new file mode 100644 index 0000000000..1390d905ce --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-two-edges-opposite-box-edges/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the plane through a box's bottom-front and top-back edges", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin (x 0..40, y 0..30, z 0..20): both run along X, through (0,0,0) and (0,30,20): normal X x (0,30,20) = (0,-20,30): the plane 3z = 2y, normal (0,-2,3)", + "construction": { + "E": { + "plane": { + "through": [ + 5, + 30, + 20 + ], + "normal": [ + 0, + -2, + 3 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-plane-two-edges-opposite-box-edges/recipe.json b/tests/kernel-cases/construction/cov-plane-two-edges-opposite-box-edges/recipe.json new file mode 100644 index 0000000000..835d05243e --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-two-edges-opposite-box-edges/recipe.json @@ -0,0 +1,33 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.plane.two_edges", + "params": { + "a": { + "edge": [ + 20, + 0, + 0 + ] + }, + "b": { + "edge": [ + 20, + 30, + 20 + ] + }, + "name": "E" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-plane-two-edges-refuses-skew-edges/expected.json b/tests/kernel-cases/construction/cov-plane-two-edges-refuses-skew-edges/expected.json new file mode 100644 index 0000000000..f061ab2497 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-two-edges-refuses-skew-edges/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "a plane through two skew box edges", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin (x 0..40, y 0..30, z 0..20): y 0, z 0 along X and x 40, z 20 along Y never meet and are not parallel: no plane holds both: refused", + "outcome": "refused", + "refusal": "the edges are not in one plane" +} diff --git a/tests/kernel-cases/construction/cov-plane-two-edges-refuses-skew-edges/recipe.json b/tests/kernel-cases/construction/cov-plane-two-edges-refuses-skew-edges/recipe.json new file mode 100644 index 0000000000..ef250537b5 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-two-edges-refuses-skew-edges/recipe.json @@ -0,0 +1,33 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.plane.two_edges", + "params": { + "a": { + "edge": [ + 20, + 0, + 0 + ] + }, + "b": { + "edge": [ + 40, + 15, + 20 + ] + }, + "name": "E" + } + } + ] +}