scopatz/pyembree

multiple scenes

mikedh opened this issue · 1 comments

Hi, thanks for the great library!

Someone opened an issue on trimesh about the errors that get printed when you allocate multiple scenes. It's not really a functional problem as pyembree still returns the correct result, I was wondering if there was a procedure or destructor I could call to suppress these warnings?

import numpy as np

from pyembree import rtcore_scene
from pyembree.mesh_construction import TriangleMesh

if __name__ == '__main__':
     triangles_a = np.random.random((10,3,3))
     scene_a = rtcore_scene.EmbreeScene()
     mesh_a = TriangleMesh(scene_a, triangles_a)

     # do something to deallocate here?

     triangles_b = np.random.random((10,3,3))
     scene_b = rtcore_scene.EmbreeScene()
     mesh_b = TriangleMesh(scene_b, triangles_b)

produces this warning:

ERROR CAUGHT IN EMBREE
ERROR: Invalid operation
ERROR MESSAGE: b'/home/benthin/Projects/embree_v251/kernels/common/rtcore.cpp (157): already initialized'

Best,
Mike

Hi @mikedh, Pull requests are very welcome!