]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_Partition.cpp
Salome HOME
Issue #3014: Partition fails
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Partition.cpp
index 96052010d10e07f7489cfdfa4bd6de18a4888a5c..48c7141a2cd1a7908b397199e71352730189a27a 100644 (file)
@@ -153,6 +153,12 @@ void FeaturesPlugin_Partition::execute()
       keepUnusedSubsOfCompound(aFirstShape, anObjects, ObjectHierarchy(), aMakeShapeList);
 
     if (anIt.more()) {
+      if (aResultCompound->shapeType() != GeomAPI_Shape::COMPOUND) {
+        // put the shape into compound
+        ListOfShape aShapes;
+        aShapes.push_back(aResultCompound);
+        aResultCompound = GeomAlgoAPI_CompoundBuilder::compound(aShapes);
+      }
       std::shared_ptr<GeomAlgoAPI_ShapeBuilder> aBuilder(new GeomAlgoAPI_ShapeBuilder);
       for (; anIt.more(); anIt.next())
         aBuilder->add(aResultCompound, anIt.current());