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);