From 04ae29759b2f00f194b81aa31a65e5c72b9f44f1 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 28 Sep 2020 15:38:19 +0200 Subject: [PATCH] Re-enable are_holes_and_boundary_pairwise_disjoint() check --- src/ifcgeom/kernels/cgal/CgalKernel.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/kernels/cgal/CgalKernel.cpp b/src/ifcgeom/kernels/cgal/CgalKernel.cpp index 8913185431..7df985f6a0 100644 --- a/src/ifcgeom/kernels/cgal/CgalKernel.cpp +++ b/src/ifcgeom/kernels/cgal/CgalKernel.cpp @@ -1453,9 +1453,16 @@ bool CgalKernel::convert_impl(const taxonomy::boolean_result* br, ifcopenshell:: CGAL::Polygon_with_holes_2 pwh(p, ++it, loops.end()); CGAL::Gps_segment_traits_2 traits; - if (false && !CGAL::are_holes_and_boundary_pairwise_disjoint(pwh, traits)) { + if (!CGAL::are_holes_and_boundary_pairwise_disjoint(pwh, traits)) { // this is very slow. // the check is also slow... + + // It is enabled because in case of overlapping openings the + // even-odd fill rule will result in incorrect results. + // See for example the Duplex model roof. + + Logger::Notice("Holes are not disjoint"); + CGAL::Polygon_set_2 result; auto it = loops.begin(); result.insert(*it++);