From e39cbc6d0060c4bd2af4351aeb8432f57eab33d5 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 f88029cc23..2bd43886f1 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -126,7 +126,9 @@ bool IfcGeom::is_compound(const TopoDS_Shape& shape) { const TopoDS_Shape& IfcGeom::ensure_fit_for_subtraction(const TopoDS_Shape& shape, TopoDS_Shape& solid) { const bool is_comp = IfcGeom::is_compound(shape); - if ( ! is_comp ) return shape; + if (!is_comp) { + return solid = shape; + } IfcGeom::create_solid_from_compound(shape, solid); // If the SEW_SHELLS option had been set this precision had been applied