I'm using trimesh to find the closest point on a mesh to a given point,
closest_vertex, d, face_id = trimesh.proximity.closest_point(mesh, [[-5,100,0]])
That's my code for that bit I get an point back from this code and it displays fine on a graph as well. However when I look at the stl file to figure out the point index, the point does not exist.
Any help would be awesome!
I expect to find this point in the stl as after all it still is returning the closest point.
As per documentation :
So it is finding the closest point on your trimesh surface, not the closest vertex. This is why you are not finding the point in your STL file.
To find the nearest vertex, you'll probably need to write a small function for this :