diff --git a/tests/kernel-cases/construction/cov-point-center-of-a-circular-edge/expected.json b/tests/kernel-cases/construction/cov-point-center-of-a-circular-edge/expected.json new file mode 100644 index 000000000..bbf8b272b --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-of-a-circular-edge/expected.json @@ -0,0 +1,15 @@ +{ + "sources": [], + "what": "the centre of a cylinder's top edge", + "source": "analytic", + "method": "cylinder r 5, h 10 on (60,0,0) along +Z: its top edge is the circle about (60,0,10)", + "construction": { + "C": { + "point": [ + 60, + 0, + 10 + ] + } + } +} diff --git a/tests/kernel-cases/construction/cov-point-center-of-a-circular-edge/recipe.json b/tests/kernel-cases/construction/cov-point-center-of-a-circular-edge/recipe.json new file mode 100644 index 000000000..e1be1b86e --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-of-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.point.center", + "params": { + "of": { + "edge": [ + 65, + 0, + 10 + ] + }, + "name": "C" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-point-center-of-a-sketch-arc/expected.json b/tests/kernel-cases/construction/cov-point-center-of-a-sketch-arc/expected.json new file mode 100644 index 000000000..1f8fb4038 --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-of-a-sketch-arc/expected.json @@ -0,0 +1,15 @@ +{ + "sources": [], + "what": "the centre of a sketch arc", + "source": "analytic", + "method": "the arc r 10 about the sketch origin on XY", + "construction": { + "C": { + "point": [ + 0, + 0, + 0 + ] + } + } +} diff --git a/tests/kernel-cases/construction/cov-point-center-of-a-sketch-arc/recipe.json b/tests/kernel-cases/construction/cov-point-center-of-a-sketch-arc/recipe.json new file mode 100644 index 000000000..fa61edc8e --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-of-a-sketch-arc/recipe.json @@ -0,0 +1,42 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "Path" + } + }, + { + "command": "sketch.arc.center_point", + "params": { + "center": [ + 0, + 0 + ], + "start": [ + 10, + 0 + ], + "end": [ + 0, + 10 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "construct.point.center", + "params": { + "of": { + "sketch": "Path", + "curve": "a1" + }, + "name": "C" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-point-center-of-a-sphere/expected.json b/tests/kernel-cases/construction/cov-point-center-of-a-sphere/expected.json new file mode 100644 index 000000000..f218862ca --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-of-a-sphere/expected.json @@ -0,0 +1,15 @@ +{ + "sources": [], + "what": "the centre of a sphere", + "source": "analytic", + "method": "sphere r 5 on (0,0,60)", + "construction": { + "C": { + "point": [ + 0, + 0, + 60 + ] + } + } +} diff --git a/tests/kernel-cases/construction/cov-point-center-of-a-sphere/recipe.json b/tests/kernel-cases/construction/cov-point-center-of-a-sphere/recipe.json new file mode 100644 index 000000000..4e4fff0eb --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-of-a-sphere/recipe.json @@ -0,0 +1,30 @@ +{ + "commands": [ + { + "command": "solid.sphere", + "params": { + "center": [ + 0, + 0, + 60 + ], + "radius": 5, + "body_name": "Ball", + "operation": "new" + } + }, + { + "command": "construct.point.center", + "params": { + "of": { + "face": [ + 5, + 0, + 60 + ] + }, + "name": "C" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-point-center-of-a-torus/expected.json b/tests/kernel-cases/construction/cov-point-center-of-a-torus/expected.json new file mode 100644 index 000000000..52b8edc91 --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-of-a-torus/expected.json @@ -0,0 +1,15 @@ +{ + "sources": [], + "what": "the centre of a torus", + "source": "analytic", + "method": "torus major 10, minor 2 on (0,60,0)", + "construction": { + "C": { + "point": [ + 0, + 60, + 0 + ] + } + } +} diff --git a/tests/kernel-cases/construction/cov-point-center-of-a-torus/recipe.json b/tests/kernel-cases/construction/cov-point-center-of-a-torus/recipe.json new file mode 100644 index 000000000..038b06c31 --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-of-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.point.center", + "params": { + "of": { + "face": [ + 12, + 60, + 0 + ] + }, + "name": "C" + } + } + ] +} diff --git a/tests/kernel-cases/construction/cov-point-center-refuses-a-flat-face/expected.json b/tests/kernel-cases/construction/cov-point-center-refuses-a-flat-face/expected.json new file mode 100644 index 000000000..8540d8fc9 --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-refuses-a-flat-face/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "the centre of 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, not a sphere or torus: refused", + "outcome": "refused", + "refusal": "the face is not a sphere or torus" +} diff --git a/tests/kernel-cases/construction/cov-point-center-refuses-a-flat-face/recipe.json b/tests/kernel-cases/construction/cov-point-center-refuses-a-flat-face/recipe.json new file mode 100644 index 000000000..5a67ef954 --- /dev/null +++ b/tests/kernel-cases/construction/cov-point-center-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.point.center", + "params": { + "of": { + "face": [ + 20, + 15, + 20 + ] + }, + "name": "C" + } + } + ] +}