diff --git a/tests/kernel-cases/construction/cov-plane-at-angle-about-its-own-normal/expected.json b/tests/kernel-cases/construction/cov-plane-at-angle-about-its-own-normal/expected.json new file mode 100644 index 000000000..9853c7bc7 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-at-angle-about-its-own-normal/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "XY turned about Z, its own normal", + "source": "analytic", + "method": "a turn about the plane's normal maps the plane onto itself: XY, normal Z through the origin", + "construction": { + "P": { + "plane": { + "through": [ + 3, + 4, + 0 + ], + "normal": [ + 0, + 0, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-plane-at-angle-about-its-own-normal/recipe.json b/tests/kernel-cases/construction/cov-plane-at-angle-about-its-own-normal/recipe.json new file mode 100644 index 000000000..792827825 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-at-angle-about-its-own-normal/recipe.json @@ -0,0 +1,13 @@ +{ + "commands": [ + { + "command": "construct.plane.at_angle", + "params": { + "base": "XY", + "axis": "Z", + "angle": "30 deg", + "name": "P" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-plane-at-angle-face-off-the-axis/expected.json b/tests/kernel-cases/construction/cov-plane-at-angle-face-off-the-axis/expected.json new file mode 100644 index 000000000..78866877d --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-at-angle-face-off-the-axis/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "a box's top turned 45 degrees about X, which lies off 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 z = 20 turned +45 deg about the X axis through the origin: normal (0, -1/sqrt2, 1/sqrt2), and its point (0,0,20) goes to (0, -20/sqrt2, 20/sqrt2): the plane -y + z = 20 sqrt2, 20 from the axis", + "construction": { + "P": { + "plane": { + "through": [ + 0, + -14.14213562373095, + 14.14213562373095 + ], + "normal": [ + 0, + -1, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-plane-at-angle-face-off-the-axis/recipe.json b/tests/kernel-cases/construction/cov-plane-at-angle-face-off-the-axis/recipe.json new file mode 100644 index 000000000..f48a9ef45 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-at-angle-face-off-the-axis/recipe.json @@ -0,0 +1,28 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.plane.at_angle", + "params": { + "base": { + "face": [ + 5, + 5, + 20 + ] + }, + "axis": "X", + "angle": "45 deg", + "name": "P" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-plane-at-angle-xy-about-x-30/expected.json b/tests/kernel-cases/construction/cov-plane-at-angle-xy-about-x-30/expected.json new file mode 100644 index 000000000..d782b770c --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-at-angle-xy-about-x-30/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "XY turned 30 degrees about X", + "source": "analytic", + "method": "turning XY's normal Z by +30 deg about +X (right hand): (0, -sin 30, cos 30) = (0, -1/2, sqrt3/2); the plane keeps the X axis", + "construction": { + "P": { + "plane": { + "through": [ + 25, + 0, + 0 + ], + "normal": [ + 0, + -0.5, + 0.8660254037844386 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-plane-at-angle-xy-about-x-30/recipe.json b/tests/kernel-cases/construction/cov-plane-at-angle-xy-about-x-30/recipe.json new file mode 100644 index 000000000..ca6d54143 --- /dev/null +++ b/tests/kernel-cases/construction/cov-plane-at-angle-xy-about-x-30/recipe.json @@ -0,0 +1,13 @@ +{ + "commands": [ + { + "command": "construct.plane.at_angle", + "params": { + "base": "XY", + "axis": "X", + "angle": "30 deg", + "name": "P" + } + } + ] +}