Skip to content

Commit

Permalink
Change set-up of boxes in pyemblite.tests.TestMultiIntersection to co…
Browse files Browse the repository at this point in the history
…pe with older trimesh versions which don't support 'bounds' argument.
  • Loading branch information
Shane-J-Latham committed Jun 1, 2024
1 parent 5488cb3 commit f8ec505
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyemblite/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,14 @@ class TestMultiIntersection(TestCase):
def setUp(self):
"""Initialisation"""

bnds = np.asarray([[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]], dtype=np.float32)
self.offsets = np.linspace(4.0, 32.0, 8)
boxes = list(
trimesh.primitives.Box(bounds=bnds + [0.0, 0.0, offset])
trimesh.primitives.Box(extents=[2.0, 2.0, 2.0])
for offset in self.offsets
)
for box, offset in zip(boxes, self.offsets):
box.apply_translation([0.0, 0.0, offset])

self.embreeDevice = rtc.EmbreeDevice()
self.scene = rtcs.EmbreeScene(self.embreeDevice)
self.box_meshes = list(
Expand Down

0 comments on commit f8ec505

Please sign in to comment.