Exemplo n.º 1
0
 def test_bounding_box_with_pentagonal_base_block(self):
     block = Block(Point(10, 20),
                   [Point(-10, -20), Point(10, -30), Point(20, 10), Point(-5, 30), Point(-20, 5)],
                   2)
     self.assertEqual(block.bounding_box(),
                      BoundingBox(Point(-10, -10), Point(30, 50, 2)))
Exemplo n.º 2
0
 def test_bounding_box_with_not_convex_base_block(self):
     block = Block(Point(0, 0), [Point(-15, 0), Point(10, -40), Point(0, 0), Point(15, 30)])
     self.assertEqual(block.bounding_box(), BoundingBox(Point(-15, -40), Point(15, 30, 0.15)))
Exemplo n.º 3
0
 def test_bounding_box(self):
     block = Block(Point(10, 20),
                   [Point(15, 30), Point(15, -5), Point(40, 30), Point(40, -5)],
                   1)
     self.assertEqual(block.bounding_box(), BoundingBox(Point(25, 15), Point(50, 50, 1)))