]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Does not make compound if only one shape exported.
authordbv <dbv@opencascade.com>
Tue, 16 Feb 2016 09:41:40 +0000 (12:41 +0300)
committerdbv <dbv@opencascade.com>
Tue, 16 Feb 2016 14:04:49 +0000 (17:04 +0300)
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp

index a399b646ee9ac6108fad65f45bfc9896a973ec7e..f4ff3d3ad9fa976278264117b9b8005ad04e6db5 100644 (file)
@@ -90,8 +90,14 @@ void ExchangePlugin_ExportFeature::execute()
     if (aCurShape.get() != NULL)
       aShapes.push_back(aCurShape);
   }
-  std::shared_ptr<GeomAPI_Shape> aShape =
-      GeomAlgoAPI_CompoundBuilder::compound(aShapes);
+
+  // Store compound if we have more than one shape.
+  std::shared_ptr<GeomAPI_Shape> aShape;
+  if(aShapes.size() == 1) {
+    aShape = aShapes.front();
+  } else {
+    aShape = GeomAlgoAPI_CompoundBuilder::compound(aShapes);
+  }
 
   exportFile(aFilePath, aFormat, aShape);
 }