diff --git a/tests/kernel-cases/inspect/cov-curvature-comb-circle-and-line/expected.json b/tests/kernel-cases/inspect/cov-curvature-comb-circle-and-line/expected.json new file mode 100644 index 000000000..285efa83e --- /dev/null +++ b/tests/kernel-cases/inspect/cov-curvature-comb-circle-and-line/expected.json @@ -0,0 +1,28 @@ +{ + "sources": [], + "what": "the combs of a sketch circle and a line", + "source": "analytic", + "method": "circle r 7: curvature 1/7 everywhere, radius 7; a line: straight, no radius", + "results": [ + { + "command": 4, + "pointer": "/combs/0/min_radius", + "value": 7.0 + }, + { + "command": 4, + "pointer": "/combs/0/max_curvature", + "value": 0.14285714285714285 + }, + { + "command": 4, + "pointer": "/combs/1/min_radius", + "value": null + }, + { + "command": 4, + "pointer": "/combs/1/max_curvature", + "value": 0.0 + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-curvature-comb-circle-and-line/recipe.json b/tests/kernel-cases/inspect/cov-curvature-comb-circle-and-line/recipe.json new file mode 100644 index 000000000..09a86df83 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-curvature-comb-circle-and-line/recipe.json @@ -0,0 +1,50 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "S" + } + }, + { + "command": "sketch.circle.center", + "params": { + "center": [ + 0, + 0 + ], + "radius": 7 + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 0, + 20 + ], + [ + 10, + 20 + ] + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "inspect.curvature_comb", + "params": { + "sketch": "S", + "curves": [ + "c1", + "l1" + ] + } + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-curvature-comb-cylinder-edge/expected.json b/tests/kernel-cases/inspect/cov-curvature-comb-cylinder-edge/expected.json new file mode 100644 index 000000000..2af9c42d8 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-curvature-comb-cylinder-edge/expected.json @@ -0,0 +1,18 @@ +{ + "sources": [], + "what": "the comb along a cylinder's top edge", + "source": "analytic", + "method": "a cylinder r 5 on (60,0,0): its top edge is a circle of r 5, curvature 1/5", + "results": [ + { + "command": 1, + "pointer": "/combs/0/min_radius", + "value": 5.0 + }, + { + "command": 1, + "pointer": "/combs/0/max_curvature", + "value": 0.2 + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-curvature-comb-cylinder-edge/recipe.json b/tests/kernel-cases/inspect/cov-curvature-comb-cylinder-edge/recipe.json new file mode 100644 index 000000000..6640bd674 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-curvature-comb-cylinder-edge/recipe.json @@ -0,0 +1,30 @@ +{ + "commands": [ + { + "command": "solid.cylinder", + "params": { + "base": [ + 60, + 0, + 0 + ], + "radius": 5, + "height": 10, + "body_name": "Cyl", + "operation": "new" + } + }, + { + "command": "inspect.curvature_comb", + "params": { + "edges": [ + [ + 65, + 0, + 10 + ] + ] + } + } + ] +} diff --git a/tests/kernel-cases/inspect/cov-curvature-comb-refuses-nothing-picked/expected.json b/tests/kernel-cases/inspect/cov-curvature-comb-refuses-nothing-picked/expected.json new file mode 100644 index 000000000..af2f4ee34 --- /dev/null +++ b/tests/kernel-cases/inspect/cov-curvature-comb-refuses-nothing-picked/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "a comb with no curve, edge or face", + "source": "analytic", + "method": "box 40 x 30 x 20 with a corner at the origin; nothing picked: refused", + "outcome": "refused", + "refusal": "give `curves`, `edges` or `faces`" +} diff --git a/tests/kernel-cases/inspect/cov-curvature-comb-refuses-nothing-picked/recipe.json b/tests/kernel-cases/inspect/cov-curvature-comb-refuses-nothing-picked/recipe.json new file mode 100644 index 000000000..22b640b8e --- /dev/null +++ b/tests/kernel-cases/inspect/cov-curvature-comb-refuses-nothing-picked/recipe.json @@ -0,0 +1,18 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 40, + "width": 30, + "height": 20, + "body_name": "Box", + "operation": "new" + } + }, + { + "command": "inspect.curvature_comb", + "params": {} + } + ] +}