From f4971da42eadb2e244dfd0c1d03047c4f4ed1627 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 17 Aug 2023 11:28:02 +0200 Subject: [PATCH] #3429 Fix b operand non-planar face check --- src/ifcgeom_schema_agnostic/boolean_utils.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom_schema_agnostic/boolean_utils.cpp b/src/ifcgeom_schema_agnostic/boolean_utils.cpp index e7548b0d82..b58d061a30 100644 --- a/src/ifcgeom_schema_agnostic/boolean_utils.cpp +++ b/src/ifcgeom_schema_agnostic/boolean_utils.cpp @@ -467,13 +467,19 @@ int IfcGeom::util::eliminate_touching_operands(double prec, const TopoDS_Shape & // Check if any of the faces in b are non-planar, which is // not supported by this quick check. + bool non_planar = false; for (int i = 1; i <= b_faces.Extent(); ++i) { auto surf = BRep_Tool::Surface(TopoDS::Face(b_faces(i))); if (surf->DynamicType() != STANDARD_TYPE(Geom_Plane)) { - continue; + non_planar = true; + break; } } + if (non_planar) { + continue; + } + TopTools_IndexedMapOfShape b_vertices; TopExp::MapShapes(b, TopAbs_VERTEX, b_vertices);