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());