From: dbv Date: Tue, 16 Feb 2016 09:41:40 +0000 (+0300) Subject: Does not make compound if only one shape exported. X-Git-Tag: V_2.2.0~114 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d5e88bbc00dad27b516d42944e3936a6b08ead77;p=modules%2Fshaper.git Does not make compound if only one shape exported. --- diff --git a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp index a399b646e..f4ff3d3ad 100644 --- a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp @@ -90,8 +90,14 @@ void ExchangePlugin_ExportFeature::execute() if (aCurShape.get() != NULL) aShapes.push_back(aCurShape); } - std::shared_ptr aShape = - GeomAlgoAPI_CompoundBuilder::compound(aShapes); + + // Store compound if we have more than one shape. + std::shared_ptr aShape; + if(aShapes.size() == 1) { + aShape = aShapes.front(); + } else { + aShape = GeomAlgoAPI_CompoundBuilder::compound(aShapes); + } exportFile(aFilePath, aFormat, aShape); }