EPICK Mesh boolean fail - CGAL 6.1.1
Pkg::PMP
# Issue report
Bug found trying to do this example:
<img width="962" height="563" alt="Image" src="https://github.com/user-attachments/assets/99e958c7-0958-4317-bb42-9cffdd27ed26" />
## Issue Details
`CGAL::Polygon_mesh_processing::corefine_and_compute_difference` crashes with a segmentation fault when used with
`Exact_predicates_inexact_constructions_kernel` (EPICK) on a chain of three sequential cylinder subtractions, where the three axis-aligned cylinders meet exactly at the origin.
Concretely: starting from a "rounded cube" (cube ∩ sphere), subtracting three cylinders of radius 0.8 along the world X, Y, Z axes (length 4, centred at the origin) succeeds for the first two subtractions but segfaults inside the third corefinement call. No precondition error is raised — the function never returns.
Replacing the kernel with `Exact_predicates_exact_constructions_kernel` (EPECK) and changing nothing else makes the entire chain succeed in well under a second. This strongly suggests the crash is caused by inexact constructions accumulating near-coincident geometry on the cut boundary that subsequent corefinement steps cannot handle, rather than by malformed input.
Observed output (Windows 11 / MSVC 19.43 / CGAL 6.1.1):
```
$ ./build/Release/probe_epick_chain.exe
cube: V=8 F=12 self_intersects=false
sphere: V=4034 F=8064 self_intersects=false
cyl_x: V=98 F=192 self_intersects=false
step1 (cube ∩ sphere): ok V=1830
step2 (− cyl_x): ok V=2052
step3 (− cyl_y): ok V=2879
<segmentation fault, exit 139 — step4 never prints>
$ ./build/Release/probe_epeck_chain.exe
... (identical lines for steps 1–3) ...
step4 (− cyl_z): ok V=3821
EPECK total: 0.41s
```
## Source Code
Two self-contained reproducers are included in this repository: https://github.com/petrasvestartas/cgal_boolean_repro
- probe_epick_chain.cpp — uses EPICK, crashes.
- probe_epeck_chain.cpp — uses EPECK, succeeds.
Both files build their five input meshes analytically inside `main()` (no external file I/O, no hardcoded vertex tables) and run the same operation chain. They differ only in the `using Kernel = ...;` line.
Build (CMake project provided in the same folder):
```
cmake -S . -B build
cmake --build build --config Release --target probe_epick_chain probe_epeck_chain
./build/Release/probe_epick_chain.exe
./build/Release/probe_epeck_chain.exe
```
The CMake project will download CGAL 6.1.1, Boost 1.82, and Eigen 3.4.0
into `./external/` on first configure (or use a system install with
`-DUSE_SYSTEM_CGAL=ON`).
## Environment
* Operating system (Windows/Mac/Linux, 32/64 bits): Windows 11, 64-bit
* Compiler: MSVC 19.43 (Visual Studio 2022 17.13)
* Release or debug mode: Release
* Specific flags used (if any): `/Zm1200 /bigobj`, C++20
* CGAL version: 6.1.1 (header-only)
* Boost version: 1.82.0
* Other libraries versions if used (Eigen, TBB, etc.): Eigen 3.4.0
5 条评论