Corefinement Produces Self-Intersecting Meshes Even When Both Input Meshes Are Valid
Issue Details
I encountered a problem when performing a corefine operation on two meshes. Although both input meshes contain no self-intersections or any other anomalies, the resulting mesh after corefinement becomes invalid and contains self-intersections.
This issue can be reproduced in the CGAL Mesh Boolean Operations demo by loading two valid meshes and applying corefine/difference/union/intersection.
My questions are:
-
Why does corefinement produce a mesh with self-intersections even when both input meshes are valid?
-
How can this issue be avoided or resolved?
- Is additional pre-processing required?
- Are there recommended settings, repair steps, or robustness guidelines?
- Is this a known limitation of the current corefinement implementation?
I gave a try with your meshes in the demo and I could compute the output of the union, intersection and difference successfully. The mesh I get is valid but indeed it contains self-intersections created when the exact intersection points are rounded to double values.
A call to PMP::remove_almost_degenerate() (I put threshold to 100) removed all of them.
Does it mean that Epick is not used internally in the algorithm, and the precision is reduced only when outputting?
For parts using only input points, EPICK is used. As soon as a construction occurs, an internal exact representation is stored and used for answering exactly predicates involving those points.