-//=================================================================================================
-void FeaturesPlugin_Revolution::LoadNamingDS(GeomAlgoAPI_Revolution& theFeature,
- std::shared_ptr<ModelAPI_ResultBody> theResultBody,
- std::shared_ptr<GeomAPI_Shape> theBasis,
- std::shared_ptr<GeomAPI_Shape> theContext)
-{
- //load result
- if(theBasis->isEqual(theContext))
- theResultBody->store(theFeature.shape());
- else
- theResultBody->storeGenerated(theContext, theFeature.shape());
-
- GeomAPI_DataMapOfShapeShape* aSubShapes = new GeomAPI_DataMapOfShapeShape();
- theFeature.mapOfShapes(*aSubShapes);
-
- std::string aGeneratedName = "LateralFace";
- theResultBody->loadAndOrientGeneratedShapes(theFeature.makeShape(), theBasis, EDGE,_LATERAL_TAG, aGeneratedName, *aSubShapes);
-
- //Insert from face
- std::string aBotName = "FromFace";
- std::shared_ptr<GeomAPI_Shape> aBottomFace = theFeature.firstShape();
- if(!aBottomFace->isNull()) {
- if(aSubShapes->isBound(aBottomFace)) {
- aBottomFace = aSubShapes->find(aBottomFace);
+ // Generating result for each base shape.
+ for(ListOfShape::const_iterator
+ anIter = theBaseShapes.cbegin(); anIter != theBaseShapes.cend(); anIter++) {
+ GeomShapePtr aBaseShape = *anIter;
+
+ std::shared_ptr<GeomAlgoAPI_Revolution> aRevolAlgo(new GeomAlgoAPI_Revolution(
+ aBaseShape, anAxis,
+ aToShape, aToAngle,
+ aFromShape, aFromAngle));
+ if(!isMakeShapeValid(aRevolAlgo)) {
+ return false;