]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Partition naming fix.
authordbv <dbv@opencascade.com>
Thu, 17 Dec 2015 14:49:56 +0000 (17:49 +0300)
committerdbv <dbv@opencascade.com>
Thu, 17 Dec 2015 14:50:26 +0000 (17:50 +0300)
src/FeaturesPlugin/FeaturesPlugin_Partition.cpp

index 5b0591708e4b79e2d278b5df21798f4ab52a6641..52ee4eaf6eea70b37dc346435991711d50236f3e 100755 (executable)
@@ -116,9 +116,12 @@ void FeaturesPlugin_Partition::execute()
 
   if(isCombine) {
     // Create single result.
-    std::shared_ptr<GeomAPI_Shape> aCompoud = GeomAlgoAPI_CompoundBuilder::compound(anObjects);
-    anObjects.clear();
-    anObjects.push_back(aCompoud);
+    if(!aTools.empty()) {
+      // This is a workaround for naming. Passing compound of objects as argument instead each object separately.
+      std::shared_ptr<GeomAPI_Shape> aCompoud = GeomAlgoAPI_CompoundBuilder::compound(anObjects);
+      anObjects.clear();
+      anObjects.push_back(aCompoud);
+    }
     GeomAlgoAPI_Partition aPartitionAlgo(anObjects, aTools);
 
     // Checking that the algorithm worked properly.