How to make sure METIS partition surface mesh connected?

19 Views Asked by At

I'm a new learner in CGAL and Metis, I'm trying to partition a surface mesh with CGAL and METIS. However, when I used example code from CGALhere, it could cause seperate meshes. I only want the connected mesh to be partitioned together. Is there any parameters I can adjust to fix this problem? Thank you so much for your help :D! Seperate clusters

P.S. Whether there are ways that only the triangles share the most boundaries will be clustered together?

1

There are 1 best solutions below

2
sloriot On

You don't need Metis for that. You can use the function PMP::connected_components() like in this example (you can call CGAL::copy_face_graph(ffg, my_mesh)) to extract a copy of a connected component.