Salome HOME
Added multirotation feature.
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Extrusion.cpp
index 16333c306bb5e8fe98aa113255f0dc5c7e80bd9d..c80171dfdeae11f66c764b41432b4e09fcc2ba03 100644 (file)
@@ -63,7 +63,8 @@ void FeaturesPlugin_Extrusion::execute()
   int aResultIndex = 0;
   ListOfShape::const_iterator aBaseIt = aBaseShapesList.cbegin();
   ListOfMakeShape::const_iterator anAlgoIt = aMakeShapesList.cbegin();
-  for(; aBaseIt != aBaseShapesList.cend() && anAlgoIt != aMakeShapesList.cend(); ++aBaseIt, ++anAlgoIt) {
+  for(; aBaseIt != aBaseShapesList.cend() && anAlgoIt != aMakeShapesList.cend();
+        ++aBaseIt, ++anAlgoIt) {
     storeResult(*aBaseIt, *anAlgoIt, aResultIndex++);
   }
 
@@ -76,9 +77,6 @@ bool FeaturesPlugin_Extrusion::makeExtrusions(ListOfShape& theBaseShapes,
 {
   theMakeShapes.clear();
 
-  /// Sub-feature of the composite should be set in the base list.
-  setSketchObjectToList();
-
   // Getting base shapes.
   getBaseShapes(theBaseShapes);
 
@@ -103,7 +101,7 @@ bool FeaturesPlugin_Extrusion::makeExtrusions(ListOfShape& theBaseShapes,
   double aToSize = 0.0;
   double aFromSize = 0.0;
 
-  if(string(CREATION_METHOD())->value() == "BySizes") {
+  if(string(CREATION_METHOD())->value() == CREATION_METHOD_BY_SIZES()) {
     aToSize = real(TO_SIZE_ID())->value();
     aFromSize = real(FROM_SIZE_ID())->value();
   } else {
@@ -115,7 +113,7 @@ bool FeaturesPlugin_Extrusion::makeExtrusions(ListOfShape& theBaseShapes,
   GeomShapePtr aToShape;
   GeomShapePtr aFromShape;
 
-  if(string(CREATION_METHOD())->value() == "ByPlanesAndOffsets") {
+  if(string(CREATION_METHOD())->value() == CREATION_METHOD_BY_PLANES()) {
     aSelection = selection(TO_OBJECT_ID());
     if(aSelection.get()) {
       aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(aSelection->value());
@@ -133,7 +131,8 @@ bool FeaturesPlugin_Extrusion::makeExtrusions(ListOfShape& theBaseShapes,
   }
 
   // Generating result for each base shape.
-  for(ListOfShape::const_iterator anIter = theBaseShapes.cbegin(); anIter != theBaseShapes.cend(); anIter++) {
+  for(ListOfShape::const_iterator
+      anIter = theBaseShapes.cbegin(); anIter != theBaseShapes.cend(); anIter++) {
     std::shared_ptr<GeomAPI_Shape> aBaseShape = *anIter;
 
     std::shared_ptr<GeomAlgoAPI_Prism> aPrismAlgo(new GeomAlgoAPI_Prism(aBaseShape, aDir,