diff --git a/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/expected.json b/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/expected.json new file mode 100644 index 0000000000..64a022f8fc --- /dev/null +++ b/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/expected.json @@ -0,0 +1,20 @@ +{ + "sources": [], + "what": "a body patterned 3 times along a half circle r20 with orientation path: each copy turns with the tangent", + "source": "analytic", + "method": "instances at 0, 90 and 180 deg along the arc, each turned with the tangent: the 4x2x2 key (long side radial) stays radial, at (0,20) 2 wide in X and 4 long in Y (y 18..22). Unturned it would be 4 wide in X (x -2..2, y 19..21). Three keys: V = 3*16, bbox x -22..22, y -1..22, z 0..2", + "body_count": 3, + "volume_mm3": 48.0, + "bbox": { + "min": [ + -22, + -1, + 0 + ], + "max": [ + 22, + 22, + 2 + ] + } +} diff --git a/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/recipe.json b/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/recipe.json new file mode 100644 index 0000000000..dc1c6cd744 --- /dev/null +++ b/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/recipe.json @@ -0,0 +1,61 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 4, + "width": 2, + "height": 2, + "center": [ + 20, + 0, + 1 + ], + "body_name": "Key" + } + }, + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "Path" + } + }, + { + "command": "sketch.arc.center_point", + "params": { + "center": [ + 0, + 0 + ], + "start": [ + 20, + 0 + ], + "sweep": 180, + "id": "arc" + } + }, + { + "command": "sketch.finish", + "params": { + "sketch": "Path" + } + }, + { + "command": "solid.pattern.path", + "params": { + "bodies": [ + "Key" + ], + "path_sketch": "Path", + "path": [ + "arc" + ], + "count": 3, + "distance": 62.83185307179586, + "orientation": "path" + } + } + ] +} diff --git a/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/expected.json b/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/expected.json new file mode 100644 index 0000000000..acc43ee8ba --- /dev/null +++ b/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/expected.json @@ -0,0 +1,21 @@ +{ + "sources": [], + "what": "a boss joined to a plate, patterned 5 times 20 mm apart along a sketch line", + "source": "analytic", + "method": "plate 100x20x5 = 10000 plus 5 bosses r3 h5 at x = 10, 30 ... 90: 5 pi 9 5; faces: plate 6 + 2 a boss (side, top) = 16", + "body_count": 1, + "faces": 16, + "volume_mm3": 10706.858347057703, + "bbox": { + "min": [ + 0, + 0, + 0 + ], + "max": [ + 100, + 20, + 10 + ] + } +} diff --git a/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/recipe.json b/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/recipe.json new file mode 100644 index 0000000000..8d71d29b55 --- /dev/null +++ b/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/recipe.json @@ -0,0 +1,73 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 100, + "width": 20, + "height": 5, + "body_name": "Plate" + } + }, + { + "command": "solid.cylinder", + "params": { + "base": [ + 10, + 10, + 5 + ], + "radius": 3, + "height": 5, + "operation": "join", + "name": "Boss" + } + }, + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "Path" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 10, + 10 + ], + [ + 90, + 10 + ] + ], + "ids": [ + "p1" + ], + "infer": false + } + }, + { + "command": "sketch.finish", + "params": { + "sketch": "Path" + } + }, + { + "command": "solid.pattern.path", + "params": { + "features": [ + "Boss" + ], + "path_sketch": "Path", + "path": [ + "p1" + ], + "count": 5, + "spacing": 20 + } + } + ] +} diff --git a/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/expected.json b/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/expected.json new file mode 100644 index 0000000000..4114b4bcd9 --- /dev/null +++ b/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "6 instances 20 mm apart need 100 mm of an 80 mm path: refused", + "source": "analytic", + "method": "(6 - 1) * 20 = 100 > 80: the last instances would leave the path; a clean refusal naming its length", + "outcome": "refused", + "refusal": "run past the end of the path (80.000 mm long)" +} diff --git a/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/recipe.json b/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/recipe.json new file mode 100644 index 0000000000..a3c0621a0c --- /dev/null +++ b/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/recipe.json @@ -0,0 +1,73 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 100, + "width": 20, + "height": 5, + "body_name": "Plate" + } + }, + { + "command": "solid.cylinder", + "params": { + "base": [ + 10, + 10, + 5 + ], + "radius": 3, + "height": 5, + "operation": "join", + "name": "Boss" + } + }, + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "Path" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 10, + 10 + ], + [ + 90, + 10 + ] + ], + "ids": [ + "p1" + ], + "infer": false + } + }, + { + "command": "sketch.finish", + "params": { + "sketch": "Path" + } + }, + { + "command": "solid.pattern.path", + "params": { + "features": [ + "Boss" + ], + "path_sketch": "Path", + "path": [ + "p1" + ], + "count": 6, + "spacing": 20 + } + } + ] +}