- ResultBodyPtr aResultBody = document()->createBody(data(), anIndex);
- aResultBody->store(aShell);
- for(ListOfShape::const_iterator anIt = aShapes.cbegin(); anIt != aShapes.cend(); ++anIt) {
- for (GeomAPI_ShapeExplorer aFaceExp(*anIt, GeomAPI_Shape::FACE);
- aFaceExp.more();
- aFaceExp.next())
- {
- GeomShapePtr aFace = aFaceExp.current();
- ListOfShape aHistory;
- aSewingAlgo->modified(aFace, aHistory);
- for (ListOfShape::const_iterator aHistoryIt = aHistory.cbegin();
- aHistoryIt != aHistory.cend();
- ++aHistoryIt)
- {
- GeomShapePtr aHistoryShape = *aHistoryIt;
- if (aShell->isSubShape(aHistoryShape, false)) {
- aResultBody->loadModifiedShapes(aSewingAlgo,
- aFace,
- GeomAPI_Shape::EDGE);
- aResultBody->loadModifiedShapes(aSewingAlgo,
- aFace,
- GeomAPI_Shape::FACE);
- break;
- }
- }
- }
- }
- setResult(aResultBody, anIndex);
- ++anIndex;
+ storeResult(aSewingAlgo, aShapes, aContexts, aShell, anIndex++);