Point to mesh distance and split a mesh into components
Hello, few questions about the features of the library (it's the first time I use it).
-
Do you have a function to compute "point to mesh" distance? Something like https://github.com/libigl/libigl/blob/main/include/igl/point_mesh_squared_distance.h
-
Is there a utility function to split a mesh into multiple meshes where each output mesh is a connected component? At the moment I am using the DisjointSet data structure to work this out.
-
I am looking also for basic primitives (3D point to triangle distance, line to triangle intersection in 3D space etc), I can see you have something for 2D but nothing for 3D in your elementary_geometry header file?
Hi @lukkio88,
I at least have a good answer to your first question: another member of the Geometry Collective (Rohan Sawhney) has written a super fast header-only library for point-to-mesh distance, called FCPW (Fastest Closest Points in the West): https://github.com/rohan-sawhney/fcpw
This isn't directly integrated with geometry-central, but I've used the two in conjunction with no problem. Perhaps they can/should be integrated in a future release...
-Keenan
Hi @keenancrane ,
Thank you for your reply. It seems like I need my mesh represented as triangle soup. Is there a straight forward way to convert a manifold mesh to a polygon soup? (as I mentioned I am getting started now with geometry central).
(By easy way I mean if there's an API doing this already, cause I want to avoid to re-invent the wheel).
Thank you