- removeResults(aResultIndex);
-}
-
-//=================================================================================================
-void FeaturesPlugin_Revolution::loadNamingDS(GeomAlgoAPI_Revolution& theRevolAlgo,
- std::shared_ptr<ModelAPI_ResultBody> theResultBody,
- std::shared_ptr<GeomAPI_Shape> theBasis)
-{
- //load result
- theResultBody->storeGenerated(theBasis, theRevolAlgo.shape());
-
- std::shared_ptr<GeomAPI_DataMapOfShapeShape> aSubShapes = theRevolAlgo.mapOfSubShapes();
-
- //Insert lateral face : Face from Edge
- const std::string aLatName = "LateralFace";
- const int aLatTag = 1;
- theResultBody->loadAndOrientGeneratedShapes(&theRevolAlgo, theBasis, GeomAPI_Shape::EDGE, aLatTag, aLatName, *aSubShapes);
-
- //Insert to faces
- const std::string aToName = "ToFace";
- int aToTag = 2;
- const ListOfShape& aToFaces = theRevolAlgo.toFaces();
- for(ListOfShape::const_iterator anIt = aToFaces.cbegin(); anIt != aToFaces.cend(); anIt++) {
- std::shared_ptr<GeomAPI_Shape> aToFace = *anIt;
- if(aSubShapes->isBound(aToFace)) {
- aToFace = aSubShapes->find(aToFace);
- }
- theResultBody->generated(aToFace, aToName, aToTag++);
- }
-
- //Insert from faces
- const std::string aFromName = "FromFace";
- int aFromTag = aToTag > 10000 ? aToTag : 10000;
- const ListOfShape& aFromFaces = theRevolAlgo.fromFaces();
- for(ListOfShape::const_iterator anIt = aFromFaces.cbegin(); anIt != aFromFaces.cend(); anIt++) {
- std::shared_ptr<GeomAPI_Shape> aFromFace = *anIt;
- if(aSubShapes->isBound(aFromFace)) {
- aFromFace = aSubShapes->find(aFromFace);
- }
- theResultBody->generated(aFromFace, aFromName, aFromTag++);
- }