-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to test mesh self-intersection using CGAL::Polygon_mesh_processing::does_self_intersect #8605
Comments
In the file attached, you have two triangles that shares a point. So the triangle soup does not self-intersect. If you want to turn it into a mesh, you need to "orient" it so that non-manifold features are duplicated, creating a self-intersection then. |
The screenshot attached is not correctly representing the situation. Maybe a display issue of the software used (or a different rounding in the file provided) |
Thank you for your prompt response and kind help. In the previous file that I uploaded, I included just two triangles to simplify the problem. In order to make the question clearer, I have uploaded a mesh file which actually has self-intersections. When using Materialise Magics software, 6 self-intersecting triangles were detected in this mesh. However, when I applied the 'bool CGAL::Polygon_mesh_processing::does_self_intersect' function to check, it surprisingly returned false. I'm confused about this discrepancy and would appreciate it if you could offer some insights or suggestions. Thanks again. |
As you spotted there are some really badly shaped triangles but the mesh does not self-intersect. The other software is reporting a false positive. You can use the function Actually checking the output I noticed that there is an issue in the aforementioned function. Indeed there is such a bad triangle that it is both a needle and a cap. But it cannot be handled as a needle due to topological constraints and the code moves away without trying to fix it as a cap (with a flip). |
Issue Details
Hi there!
I've been working with the Polygon Mesh Processing Package and attempted to test whether a triangulated surface mesh has any self-intersections. However, I ran into an issue where it seems to have failed to detect the intersections between two triangles within the mesh.
This particular triangulated surface mesh consists of 5 vertices and 2 faces. Strangely enough, when I used the
bool CGAL::Polygon_mesh_processing::does_self_intersect
function, it indicated that this mesh does not self-intersect, which is contrary to what I expected based on my visual inspection of the mesh.Here are the coordinates of the vertices for reference:
Mesh file was attached. Any help would be greatly appreciated!
intersection.zip
Source Code:
Environment
The text was updated successfully, but these errors were encountered: