Closed AlbertDeTerre closed 3 months ago
PMP::corefine_and_compute_intersection
corefines both original_mesh
and mesh_to_divide
, meaning it modifies those meshes to add their intersection points and edges.
The kernel is missing from your snippet above, but likely you have an inexact construction kernel, and while the corefinement process is performed exactly, self-intersections can appear once you are back into your inexact kernel. Thus on your first iteration, everything is well, but at a further iteration (not necessarily the second), the mesh now has self-intersections and the throw mechanism rejects any further corefinement.
You can either:
original_mesh
be modified by corefinement operations at all iterations.Thanks for your fast answer ! Duplicating the mesh resolved the issue.
Have a nice day !
Hello guys, I've got an issue that I can't understand while trying to compute intersection between two meshes.
Issue Details
My issue is that I got a "Self_intersection_exception" when trying to process a corefine_and_compute_intersection() method into a recursive function. Selft intersecting mesh appears to be "original_mesh". The weird thing is that "original_mesh" is not changing at all through my recursion process (See code below).
Source Code
Call of 'process_reshape' function
vector<Surface_mesh> remaining_cubes = process_reshape(obb_sm, mesh1, 0.2, 0.8, 5, 0);
Content of 'process_reshape' function
Output before the error is thrown
Environment