I have a 3D shape (a bone) as a triangular mesh in STL format and I'm working with Python language.
I then have a ray with its origin and direction and I need to know:
- which face of the mesh collides with this ray
- coordinates of intersection point
- the angle between my ray and the normal vector of the collided face
I know 'pycaster' ( https://pyscience.wordpress.com/2014/09/21/ray-casting-with-python-and-vtk-intersecting-linesrays-with-surface-meshes/ ) but it only works with Python 2.x and I need to use Python 3.x.
I know 'trimeshgeom' class ( http://cgkit.sourceforge.net/doc2/_sources/trimeshgeom.txt ) from cgkit but PyCharm can't install it as an interpreter (can't understand why).
Does anybody know how I could do what I'm trying to do?
Thanks, Cheers,
Davide