diff --git a/tests/kernel-cases/construction/cov-axis-through-a-circular-edge/expected.json b/tests/kernel-cases/construction/cov-axis-through-a-circular-edge/expected.json new file mode 100644 index 000000000..a329700ed --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-through-a-circular-edge/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the axis through a circular edge", + "source": "analytic", + "method": "cylinder r 5, h 10 on (60,0,0) along +Z: its top edge is the circle r 5 about (60,0,10) in z = 10: the line through its centre along its normal Z", + "construction": { + "A": { + "axis": { + "through": [ + 60, + 0, + 10 + ], + "dir": [ + 0, + 0, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-axis-through-a-circular-edge/recipe.json b/tests/kernel-cases/construction/cov-axis-through-a-circular-edge/recipe.json new file mode 100644 index 000000000..5f2c5015e --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-through-a-circular-edge/recipe.json @@ -0,0 +1,31 @@ +{ + "commands": [ + { + "command": "solid.cylinder", + "params": { + "base": [ + 60, + 0, + 0 + ], + "radius": 5, + "height": 10, + "body_name": "Cyl", + "operation": "new" + } + }, + { + "command": "construct.axis.through_cylinder", + "params": { + "face": { + "edge": [ + 65, + 0, + 10 + ] + }, + "name": "A" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-axis-through-a-cylinder/expected.json b/tests/kernel-cases/construction/cov-axis-through-a-cylinder/expected.json new file mode 100644 index 000000000..cd0d4a3bb --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-through-a-cylinder/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the axis of a cylinder's side", + "source": "analytic", + "method": "cylinder r 5, h 10 on (60,0,0) along +Z: the line through (60,0,0) along Z", + "construction": { + "A": { + "axis": { + "through": [ + 60, + 0, + 0 + ], + "dir": [ + 0, + 0, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-axis-through-a-cylinder/recipe.json b/tests/kernel-cases/construction/cov-axis-through-a-cylinder/recipe.json new file mode 100644 index 000000000..016dfd2e0 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-through-a-cylinder/recipe.json @@ -0,0 +1,31 @@ +{ + "commands": [ + { + "command": "solid.cylinder", + "params": { + "base": [ + 60, + 0, + 0 + ], + "radius": 5, + "height": 10, + "body_name": "Cyl", + "operation": "new" + } + }, + { + "command": "construct.axis.through_cylinder", + "params": { + "face": { + "face": [ + 65, + 0, + 5 + ] + }, + "name": "A" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-axis-through-a-torus/expected.json b/tests/kernel-cases/construction/cov-axis-through-a-torus/expected.json new file mode 100644 index 000000000..6bafc9171 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-through-a-torus/expected.json @@ -0,0 +1,22 @@ +{ + "sources": [], + "what": "the axis of a torus", + "source": "analytic", + "method": "torus major 10, minor 2 centred on (0,60,0) about Z: the line through (0,60,0) along Z", + "construction": { + "A": { + "axis": { + "through": [ + 0, + 60, + 0 + ], + "dir": [ + 0, + 0, + 1 + ] + } + } + } +} diff --git a/tests/kernel-cases/construction/cov-axis-through-a-torus/recipe.json b/tests/kernel-cases/construction/cov-axis-through-a-torus/recipe.json new file mode 100644 index 000000000..5bbf5f1db --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-through-a-torus/recipe.json @@ -0,0 +1,31 @@ +{ + "commands": [ + { + "command": "solid.torus", + "params": { + "center": [ + 0, + 60, + 0 + ], + "major": 10, + "minor": 2, + "body_name": "Ring", + "operation": "new" + } + }, + { + "command": "construct.axis.through_cylinder", + "params": { + "face": { + "face": [ + 12, + 60, + 0 + ] + }, + "name": "A" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-axis-through-cylinder-refuses-a-flat-face/expected.json b/tests/kernel-cases/construction/cov-axis-through-cylinder-refuses-a-flat-face/expected.json new file mode 100644 index 000000000..8e5f5615b --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-through-cylinder-refuses-a-flat-face/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "an axis through a flat face", + "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 a plane, with no axis: refused", + "outcome": "refused", + "refusal": "the face is not a cylinder, cone or torus" +} diff --git a/tests/kernel-cases/construction/cov-axis-through-cylinder-refuses-a-flat-face/recipe.json b/tests/kernel-cases/construction/cov-axis-through-cylinder-refuses-a-flat-face/recipe.json new file mode 100644 index 000000000..2818dbdc8 --- /dev/null +++ b/tests/kernel-cases/construction/cov-axis-through-cylinder-refuses-a-flat-face/recipe.json @@ -0,0 +1,26 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box" + } + }, + { + "command": "construct.axis.through_cylinder", + "params": { + "face": { + "face": [ + 20, + 15, + 20 + ] + }, + "name": "A" + } + } + ] +}