Search code examples
cgal

Triangulated Surface Mesh Skeletonization Package - How to keep the skeleton inside the surface mesh?


I tried executing the example in http://doc.cgal.org/latest/Surface_mesh_skeletonization/index.html to get the skeleton of a surface mesh.

I tried using a mesh model of blood vessels with thin structures. However, no matter how refined my meshes are, parts of the skeletons seems to always be outside the mesh models.

In the sample code, there seems to be no parameters which I am able to play around with, so I am asking if there is anything i can do to make sure the skeleton stays within the mesh model.

I have tried to refined the meshes, till the program crashes. Thanks for any help provided. thanks!


Solution

  • I guess you have used the free function setting all parameters to their default. In case you want to tune the parameters you need to use the class Mean_curvature_flow_skeletonization.

    It has 3 parameters that need to be fine tuned so that your skeleton lies within the mesh:

    Note that the polyhedron demo includes a plugin where you can try the effect of the different parameters.

    If you can share the mesh with me, I can also have a look.