Skip to content

Commit

Permalink
test_direct_api.py -> add more BoundBox.is_inside tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Dec 19, 2024
1 parent 20a40d8 commit 4c53117
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_direct_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,13 @@ def test_basic_bounding_box(self):
)
self.assertTrue(bb2.is_inside(bb1))

# Further tests for is_inside
bb1 = Compound([Vertex(1, 1, 1), Vertex(2, 2, 2)]).bounding_box()
bb2 = Compound([Vertex(1.1, 1.1, 1.1), Vertex(-1, -1, -1)]).bounding_box()
bb3 = Compound([Vertex(0, 0, 0), Vertex(-1, -1, -1)]).bounding_box()
self.assertTrue(bb1.is_inside(bb2))
self.assertFalse(bb1.is_inside(bb3))

def test_bounding_box_repr(self):
bb = Solid.make_box(1, 1, 1).bounding_box()
self.assertEqual(
Expand Down

0 comments on commit 4c53117

Please sign in to comment.