trimesh
trimesh copied to clipboard
ValueError while trying to load a *.stp file within a worker thread
Hello,
I try to load a *.stp file within a worker thread with the following line of code:
mesh = trimesh.Trimesh(**trimesh.interfaces.gmsh.load_gmsh("model.stp"))
Unfortunately i got the following error message:
Traceback (most recent call last):
File "C:\Users\ThomasFuhrer\Desktop\01 Testprogram\WorkerThreads.py", line 331, in run
mesh = trimesh.Trimesh(**trimesh.interfaces.gmsh.load_gmsh("model.stp"))
File "C:\Developer\WPy64-3950\python-3.9.5.amd64\lib\site-packages\trimesh\interfaces\gmsh.py", line 37, in load_gmsh
import gmsh
File "C:\Developer\WPy64-3950\python-3.9.5.amd64\lib\site-packages\gmsh.py", line 41, in <module>
oldsig = signal.signal(signal.SIGINT, signal.SIG_DFL)
File "C:\Developer\WPy64-3950\python-3.9.5.amd64\lib\signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread of the main interpreter
Do you know how to solve it? Is it possible to somehow load a *.stp file while running the function within a worker thread?
Best regards, Marcel