diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 4fbd154d39..51e6584e12 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -776,8 +776,14 @@ bool IfcGeom::Kernel::flatten_shape_list(const IfcGeom::IfcRepresentationShapeIt _trsf = trsf.Trsf(); trsf_valid = true; } catch (...) {} - const TopoDS_Shape moved_shape = trsf_valid ? merged.Moved(_trsf) : - BRepBuilderAPI_GTransform(merged,trsf,true).Shape(); + + const TopoDS_Shape moved_shape = trsf.Form() == gp_Identity + ? merged + : ( + trsf_valid + ? merged.Moved(_trsf) + : BRepBuilderAPI_GTransform(merged,trsf,true).Shape() + ); if (shapes.size() == 1) { result = moved_shape; @@ -809,6 +815,10 @@ bool IfcGeom::Kernel::flatten_shape_list(const IfcGeom::IfcRepresentationShapeIt } } + if (!fuse) { + result = compound; + } + const bool success = !result.IsNull(); if (success) { const double precision = getValue(GV_PRECISION);