From cd17419ca5768beaafc5b343dcf658f13394bb58 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 21 Sep 2018 14:53:39 +0200 Subject: [PATCH] Check for empty list of boolean operands --- src/ifcgeom/IfcGeomFunctions.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 155136a744..e58254729a 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -3385,13 +3385,19 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a, const TopTools_Li bounding_box_overlap(getValue(GV_PRECISION), a, b_, b); } else if (op == BOPAlgo_COMMON) { builder = new BRepAlgoAPI_Common(); - bounding_box_overlap(getValue(GV_PRECISION), a, b_, b); + b = b_; } else if (op == BOPAlgo_FUSE) { builder = new BRepAlgoAPI_Fuse(); b = b_; } else { return false; } + + if (b.Extent() == 0) { + result = a; + return true; + } + if (fuzziness < 0.) { fuzziness = getValue(GV_PRECISION); }