geometry-central icon indicating copy to clipboard operation
geometry-central copied to clipboard

Point to mesh distance and split a mesh into components

Open lukkio88 opened this issue 4 years ago • 2 comments

Hello, few questions about the features of the library (it's the first time I use it).

  1. 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

  2. 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.

  3. 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?

lukkio88 avatar Jul 27 '21 14:07 lukkio88

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

keenancrane avatar Jul 27 '21 15:07 keenancrane

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

lukkio88 avatar Jul 27 '21 15:07 lukkio88