diff --git a/tests/kernel-cases/surfaces/cov-unstitch-box-every-face/expected.json b/tests/kernel-cases/surfaces/cov-unstitch-box-every-face/expected.json new file mode 100644 index 0000000000..0be8573b4f --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-unstitch-box-every-face/expected.json @@ -0,0 +1,26 @@ +{ + "sources": [], + "what": "a 20 x 10 x 10 box unstitched: six surface bodies, one a face", + "source": "analytic", + "method": "no faces picked: every face its own surface body; areas 2 (200 + 200 + 100) = 1000; each face keeps its 4 edges, now free: 24", + "valid": false, + "body_count": 6, + "faces": 6, + "boundary_edges": 24, + "area_mm2": 1000.0, + "surface_types": [ + "plane" + ], + "bbox": { + "min": [ + 0, + 0, + 0 + ], + "max": [ + 20, + 10, + 10 + ] + } +} diff --git a/tests/kernel-cases/surfaces/cov-unstitch-box-every-face/recipe.json b/tests/kernel-cases/surfaces/cov-unstitch-box-every-face/recipe.json new file mode 100644 index 0000000000..8bfecc18bf --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-unstitch-box-every-face/recipe.json @@ -0,0 +1,19 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 20, + "width": 10, + "height": 10, + "body_name": "Box" + } + }, + { + "command": "surface.unstitch", + "params": { + "body": "Box" + } + } + ] +} diff --git a/tests/kernel-cases/surfaces/cov-unstitch-box-top-only/expected.json b/tests/kernel-cases/surfaces/cov-unstitch-box-top-only/expected.json new file mode 100644 index 0000000000..e0ce57bb9a --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-unstitch-box-top-only/expected.json @@ -0,0 +1,14 @@ +{ + "sources": [], + "what": "the top of a box unstitched: the top a surface body, the open box the other", + "source": "analytic", + "method": "the picked face (top, 200) its own body, the other five (800) stay together under the box's name: 2 bodies, area 1000, free edges 4 (the top's) + 4 (the open box's rim)", + "valid": false, + "body_count": 2, + "faces": 6, + "boundary_edges": 8, + "area_mm2": 1000.0, + "surface_types": [ + "plane" + ] +} diff --git a/tests/kernel-cases/surfaces/cov-unstitch-box-top-only/recipe.json b/tests/kernel-cases/surfaces/cov-unstitch-box-top-only/recipe.json new file mode 100644 index 0000000000..33bf21733f --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-unstitch-box-top-only/recipe.json @@ -0,0 +1,27 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 20, + "width": 10, + "height": 10, + "body_name": "Box" + } + }, + { + "command": "surface.unstitch", + "params": { + "body": "Box", + "faces": [ + [ + 10, + 5, + 10 + ] + ], + "body_name": "Top" + } + } + ] +} diff --git a/tests/kernel-cases/surfaces/cov-unstitch-cylinder-caps-and-side/expected.json b/tests/kernel-cases/surfaces/cov-unstitch-cylinder-caps-and-side/expected.json new file mode 100644 index 0000000000..5781d8cc97 --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-unstitch-cylinder-caps-and-side/expected.json @@ -0,0 +1,15 @@ +{ + "sources": [], + "what": "a cylinder r 5, 10 high, unstitched: the side and the two caps, each a surface body", + "source": "analytic", + "method": "side 2 pi 5 10 = 314.16 (a cylinder, closed on its seam), caps 2 x 25 pi = 157.08 (planes): 3 bodies, area 471.24; free edges: each cap's circle and the side's two circles, 4", + "valid": false, + "body_count": 3, + "faces": 3, + "boundary_edges": 4, + "area_mm2": 471.23889803846896, + "surface_types": [ + "cylinder", + "plane" + ] +} diff --git a/tests/kernel-cases/surfaces/cov-unstitch-cylinder-caps-and-side/recipe.json b/tests/kernel-cases/surfaces/cov-unstitch-cylinder-caps-and-side/recipe.json new file mode 100644 index 0000000000..b78647a632 --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-unstitch-cylinder-caps-and-side/recipe.json @@ -0,0 +1,18 @@ +{ + "commands": [ + { + "command": "solid.cylinder", + "params": { + "radius": 5, + "height": 10, + "body_name": "Post" + } + }, + { + "command": "surface.unstitch", + "params": { + "body": "Post" + } + } + ] +} diff --git a/tests/kernel-cases/surfaces/cov-unstitch-one-face-sheet-refused/expected.json b/tests/kernel-cases/surfaces/cov-unstitch-one-face-sheet-refused/expected.json new file mode 100644 index 0000000000..6ab0afc1aa --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-unstitch-one-face-sheet-refused/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "unstitch on a body of one face: nothing to take apart, refused", + "source": "invariants", + "method": "a single face is already as far apart as it goes", + "outcome": "refused", + "refusal": "the body has one face: nothing to unstitch" +} diff --git a/tests/kernel-cases/surfaces/cov-unstitch-one-face-sheet-refused/recipe.json b/tests/kernel-cases/surfaces/cov-unstitch-one-face-sheet-refused/recipe.json new file mode 100644 index 0000000000..ac3b9012f2 --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-unstitch-one-face-sheet-refused/recipe.json @@ -0,0 +1,57 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0, + 0, + 0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Sheet sketch" + } + }, + { + "command": "sketch.rectangle.two_point", + "params": { + "p0": [ + 0, + 0 + ], + "p1": [ + 10, + 10 + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "surface.patch", + "params": { + "sketch": "Sheet sketch", + "body_name": "Sheet" + } + }, + { + "command": "surface.unstitch", + "params": { + "body": "Sheet" + } + } + ] +}