- GeomAPI_ShapeIterator aShapeIt(aResultCompound);
- if (aShapeIt.more()) {
- std::shared_ptr<ModelAPI_ResultBody> aResultBody =
- document()->createBody(data(), aResultIndex);
-
- ListOfShape anObjectList = anObjects.Objects();
- ListOfShape aToolsList = aTools.Objects();
- FeaturesPlugin_Tools::loadModifiedShapes(aResultBody,
- anObjectList,
- aToolsList,
- aMakeShapeList,
- aResultCompound);
- setResult(aResultBody, aResultIndex++);
-
- // merge algorithms
- FeaturesPlugin_Tools::ResultBaseAlgo aRBA;
- aRBA.resultBody = aResultBody;
- aRBA.baseShape = anObjectList.front();
- for (std::vector<FeaturesPlugin_Tools::ResultBaseAlgo>::iterator
- aRBAIt = aResultBaseAlgoList.begin();
- aRBAIt != aResultBaseAlgoList.end(); ++aRBAIt) {
- aMakeShapeList->appendAlgo(aRBAIt->makeShape);
- }
- aRBA.makeShape = aMakeShapeList;
- aResultBaseAlgoList.clear();
- aResultBaseAlgoList.push_back(aRBA);
- }
+ storeResult(anObjects.objects(), aTools.objects(), aResultCompound, aResultIndex,
+ aMakeShapeList, aResultBaseAlgoList);