+ AttributeSelectionPtr anAttrSelection = aSelectionListAttr->value(i);
+ std::shared_ptr<GeomAPI_Shape> aCurShape = anAttrSelection->value();
+ if (aCurShape.get() == NULL)
+ aCurShape = anAttrSelection->context()->shape();
+ if (aCurShape.get() != NULL)
+ aShapes.push_back(aCurShape);
+ }
+
+ // 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);