diff --git a/tests/kernel-cases/surfaces/cov-reverse-normal-l-sheet-swaps-the-thicken-side/expected.json b/tests/kernel-cases/surfaces/cov-reverse-normal-l-sheet-swaps-the-thicken-side/expected.json new file mode 100644 index 000000000..81dcf4c2a --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-reverse-normal-l-sheet-swaps-the-thicken-side/expected.json @@ -0,0 +1,21 @@ +{ + "sources": [], + "what": "the L sheet of two walls (30 and 20, 20 deep) turned over, then thickened +2: the side -2 took before, into the inside corner", + "source": "analytic", + "method": "kernel-cases/shell/5326: -2 is the inside of this sheet's corner; with every normal reversed +2 is. Each wall offset 2 toward the other, the slabs overlap in 2 x 2: V = (30*2 + 20*2 - 2*2) 20 = 1920, an L prism of 8 faces", + "body_count": 1, + "faces": 8, + "volume_mm3": 1920.0, + "bbox": { + "min": [ + 0, + 0, + 0 + ], + "max": [ + 30, + 20, + 20 + ] + } +} diff --git a/tests/kernel-cases/surfaces/cov-reverse-normal-l-sheet-swaps-the-thicken-side/recipe.json b/tests/kernel-cases/surfaces/cov-reverse-normal-l-sheet-swaps-the-thicken-side/recipe.json new file mode 100644 index 000000000..6c23cd636 --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-reverse-normal-l-sheet-swaps-the-thicken-side/recipe.json @@ -0,0 +1,88 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0, + 0, + 0 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "S" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 0, + 0 + ], + [ + 30, + 0 + ], + [ + 30, + 20 + ] + ], + "infer": false + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "surface.extrude", + "params": { + "sketch": "S", + "curves": [ + "l1", + "l2" + ], + "distance": 20, + "body_name": "L" + } + }, + { + "command": "surface.reverse_normal", + "params": { + "body": "L" + } + }, + { + "command": "surface.thicken", + "params": { + "bodies": [ + "L" + ], + "thickness": 2, + "operation": "new", + "body_name": "Wall" + } + }, + { + "command": "solid.remove", + "params": { + "bodies": [ + "L" + ] + } + } + ] +} diff --git a/tests/kernel-cases/surfaces/cov-reverse-normal-of-a-solid-refused/expected.json b/tests/kernel-cases/surfaces/cov-reverse-normal-of-a-solid-refused/expected.json new file mode 100644 index 000000000..6e8eef7f7 --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-reverse-normal-of-a-solid-refused/expected.json @@ -0,0 +1,8 @@ +{ + "sources": [], + "what": "reverse normal on a solid: refused, its faces face out", + "source": "invariants", + "method": "a closed solid's orientation is fixed by its material; only a surface may be turned over", + "outcome": "refused", + "refusal": "a solid's faces face out" +} diff --git a/tests/kernel-cases/surfaces/cov-reverse-normal-of-a-solid-refused/recipe.json b/tests/kernel-cases/surfaces/cov-reverse-normal-of-a-solid-refused/recipe.json new file mode 100644 index 000000000..99102ab20 --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-reverse-normal-of-a-solid-refused/recipe.json @@ -0,0 +1,19 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "length": 20, + "width": 10, + "height": 10, + "body_name": "Box" + } + }, + { + "command": "surface.reverse_normal", + "params": { + "body": "Box" + } + } + ] +} diff --git a/tests/kernel-cases/surfaces/cov-reverse-normal-then-thicken-goes-down/expected.json b/tests/kernel-cases/surfaces/cov-reverse-normal-then-thicken-goes-down/expected.json new file mode 100644 index 000000000..7c6f6e9ad --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-reverse-normal-then-thicken-goes-down/expected.json @@ -0,0 +1,21 @@ +{ + "sources": [], + "what": "a 10 x 10 sheet patched on XY (normal +z) turned over, then thickened 2 along its normal: the slab lies below it", + "source": "analytic", + "method": "the patch of an XY sketch faces +z; reversed it faces -z, and a positive thickness goes along the normal: the box 10 x 10 x 2 at z -2..0, V = 200, 6 faces; the sheet is removed so only the slab is graded", + "body_count": 1, + "faces": 6, + "volume_mm3": 200.0, + "bbox": { + "min": [ + 0, + 0, + -2 + ], + "max": [ + 10, + 10, + 0 + ] + } +} diff --git a/tests/kernel-cases/surfaces/cov-reverse-normal-then-thicken-goes-down/recipe.json b/tests/kernel-cases/surfaces/cov-reverse-normal-then-thicken-goes-down/recipe.json new file mode 100644 index 000000000..dda1d201c --- /dev/null +++ b/tests/kernel-cases/surfaces/cov-reverse-normal-then-thicken-goes-down/recipe.json @@ -0,0 +1,76 @@ +{ + "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.reverse_normal", + "params": { + "body": "Sheet" + } + }, + { + "command": "surface.thicken", + "params": { + "bodies": [ + "Sheet" + ], + "thickness": 2, + "operation": "new", + "body_name": "Slab" + } + }, + { + "command": "solid.remove", + "params": { + "bodies": [ + "Sheet" + ] + } + } + ] +}