Don't try and solve 2d bools in cgal-simple #7503

This commit is contained in:
Thomas Krijnen
2026-01-23 10:12:33 +01:00
parent ac128e3395
commit 6b7b834ac0
+4
View File
@@ -1835,6 +1835,9 @@ bool CgalKernel::convert_impl(const taxonomy::boolean_result::ptr br, Conversion
CGAL::Polygon_with_holes_2<Kernel_> pwh(p, ++it, loops.end()); CGAL::Polygon_with_holes_2<Kernel_> pwh(p, ++it, loops.end());
CGAL::Gps_segment_traits_2<Kernel_> traits; CGAL::Gps_segment_traits_2<Kernel_> traits;
if (!CGAL::are_holes_and_boundary_pairwise_disjoint(pwh, traits)) { if (!CGAL::are_holes_and_boundary_pairwise_disjoint(pwh, traits)) {
#ifdef IFOPSH_SIMPLE_KERNEL
throw std::runtime_error("Holes are not disjoint - use a different geometry kernel");
#else
// this is very slow. // this is very slow.
// the check is also slow... // the check is also slow...
@@ -1851,6 +1854,7 @@ bool CgalKernel::convert_impl(const taxonomy::boolean_result::ptr br, Conversion
result.difference(*it); result.difference(*it);
} }
result.polygons_with_holes(std::back_inserter(pwhs)); result.polygons_with_holes(std::back_inserter(pwhs));
#endif
} else { } else {
pwhs.push_back(pwh); pwhs.push_back(pwh);
} }