Salome HOME
Issue 1299 Angle presentation: complementary angle.
[modules/shaper.git] / 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);
 }