1 // File: Model_ResultGroup.cpp
2 // Created: 08 Jul 2014
3 // Author: Mikhail PONIKAROV
5 #include <Model_ResultGroup.h>
6 #include <ModelAPI_AttributeSelectionList.h>
7 #include <GeomAlgoAPI_CompoundBuilder.h>
9 Model_ResultGroup::Model_ResultGroup(boost::shared_ptr<ModelAPI_Data> theOwnerData)
11 setIsConcealed(false);
12 myOwnerData = theOwnerData;
15 boost::shared_ptr<GeomAPI_Shape> Model_ResultGroup::shape() const
17 boost::shared_ptr<GeomAPI_Shape> aResult;
19 AttributeSelectionListPtr aList = myOwnerData->selectionList("group_list");
21 std::list<boost::shared_ptr<GeomAPI_Shape> > aSubs;
22 for(int a = aList->size(); a >= 0; a--) {
23 boost::shared_ptr<GeomAPI_Shape> aSelection = aList->value(a)->value();
24 if (aSelection && !aSelection->isNull()) {
25 aSubs.push_back(aSelection);
29 aResult = GeomAlgoAPI_CompoundBuilder::compound(aSubs);