-
I have two intersecting surface meshes representing different materials that I need to repair, with one mesh (mesh A) representing the more important material and the other (mesh B) representing the less important one. If I find all faces of mesh B that intersect mesh A using the Polygon_mesh_processing library, is there some straightforward way to then clip these faces of mesh B so that the region inside mesh A is removed, i.e. some function that will return new faces of mesh B as clipped by mesh A? Thanks so much in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
did you try to use the PMP::clip function? Could you share one such example? |
Beta Was this translation helpful? Give feedback.
If your meshes are both bounding volumes, you can use PMP::corefine_and_compute_difference; otherwise, you can use PMP::split and identify the connected component(s) that you must discard by checking if it's within A using (for example) CGAL::Side_of_triangle_mesh.