cgal icon indicating copy to clipboard operation
cgal copied to clipboard

Corefinement Produces Self-Intersecting Meshes Even When Both Input Meshes Are Valid

Open chudonghao opened this issue 1 month ago • 4 comments

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:

  1. Why does corefinement produce a mesh with self-intersections even when both input meshes are valid?

  2. 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?

mesh.zip

chudonghao avatar Nov 26 '25 14:11 chudonghao

Statistics:

Statistics.txt

chudonghao avatar Nov 27 '25 00:11 chudonghao

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.

sloriot avatar Nov 27 '25 17:11 sloriot

Does it mean that Epick is not used internally in the algorithm, and the precision is reduced only when outputting?

chudonghao avatar Nov 28 '25 01:11 chudonghao

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.

sloriot avatar Dec 02 '25 09:12 sloriot