Create a hollow box
(self)
| 2417 | s4.shell(1) |
| 2418 | |
| 2419 | def testClosedShell(self): |
| 2420 | """ |
| 2421 | Create a hollow box |
| 2422 | """ |
| 2423 | s1 = Workplane("XY").box(2, 2, 2).shell(-0.1) |
| 2424 | self.assertEqual(12, s1.faces().size()) |
| 2425 | self.assertTrue(s1.val().isValid()) |
| 2426 | |
| 2427 | s2 = Workplane("XY").box(2, 2, 2).shell(0.1) |
| 2428 | self.assertEqual(32, s2.faces().size()) |
| 2429 | self.assertTrue(s2.val().isValid()) |
| 2430 | |
| 2431 | pts = [(1.0, 0.0), (0.3, 0.2), (0.0, 0.0), (0.3, -0.1), (1.0, -0.03)] |
| 2432 | |
| 2433 | s3 = Workplane().polyline(pts).close().extrude(1).shell(-0.05) |
| 2434 | self.assertTrue(s3.val().isValid()) |
| 2435 | |
| 2436 | s4_shape = Workplane("XY").box(2, 2, 2).val() |
| 2437 | # test that None and empty list both work and are equivalent |
| 2438 | s4_shell_1 = s4_shape.hollow(faceList=None, thickness=-0.1) |
| 2439 | s4_shell_2 = s4_shape.hollow(faceList=[], thickness=-0.1) |
| 2440 | # this should be the same as the first shape |
| 2441 | self.assertEqual(len(s4_shell_1.Faces()), s1.faces().size()) |
| 2442 | self.assertEqual(len(s4_shell_2.Faces()), s1.faces().size()) |
| 2443 | |
| 2444 | def testOpenCornerShell(self): |
| 2445 | s = Workplane("XY").box(1, 1, 1) |
nothing calls this directly
no test coverage detected