From e9eb7db6208e8945972c8540a0e1a259cdab4c23 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sun, 21 Jun 2015 16:14:37 +0000 Subject: [PATCH] Fix ensure_fit_for_subtraction() function when input shape is a solid --- src/ifcgeom/IfcGeomFunctions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index e612d18fac..1a77cde6a9 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -134,7 +134,9 @@ bool IfcGeom::Kernel::is_compound(const TopoDS_Shape& shape) { const TopoDS_Shape& IfcGeom::Kernel::ensure_fit_for_subtraction(const TopoDS_Shape& shape, TopoDS_Shape& solid) { const bool is_comp = is_compound(shape); - if ( ! is_comp ) return shape; + if (!is_comp) { + return solid = shape; + } create_solid_from_compound(shape, solid); // If the SEW_SHELLS option had been set this precision had been applied