Tests splitting a solid improperly
(self)
| 2358 | self.assertEqual(8, result.solids().item(1).faces().size()) |
| 2359 | |
| 2360 | def testSplitKeepingBottom(self): |
| 2361 | """ |
| 2362 | Tests splitting a solid improperly |
| 2363 | """ |
| 2364 | # Drill a hole in the side |
| 2365 | c = CQ(makeUnitCube()).faces(">Z").workplane().circle(0.25).cutThruAll() |
| 2366 | self.assertEqual(7, c.faces().size()) |
| 2367 | |
| 2368 | # Now cut it in half sideways |
| 2369 | result = c.faces(">Y").workplane(-0.5).split(keepTop=False, keepBottom=True) |
| 2370 | |
| 2371 | # stack will have both halves, original will be unchanged |
| 2372 | # one solid is on the stack |
| 2373 | self.assertEqual(1, result.solids().size()) |
| 2374 | self.assertEqual(8, result.solids().item(0).faces().size()) |
| 2375 | |
| 2376 | def testSplitError(self): |
| 2377 | # Test split produces the correct error when called with no solid to split. |
nothing calls this directly
no test coverage detected