def test_bounded_cylinder_bounding_box(self): shape = Cylinder() shape.minimum = -5 shape.maximum = 3 box = shape.bounds_of() self.assertEqual(box.min, Point(-1, -5, -1)) self.assertEqual(box.max, Point(1, 3, 1))
def test_unbounded_cylinder_bounding_box(self): shape = Cylinder() box = shape.bounds_of() self.assertEqual(box.min, Point(-1, -math.inf, -1)) self.assertEqual(box.max, Point(1, math.inf, 1))