From: dbv Date: Tue, 16 Feb 2016 09:41:40 +0000 (+0300) Subject: Does not make compound if only one shape exported. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1c6ebd100a9ce55958828ba4801c0c6f690657bd;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); }