Salome HOME
Merge branch 'master' of ssh://git.salome-platform.org/modules/shaper
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Revolution.cpp
index 12e053e324da48bab8f9b41016bf42da0fe62b40..d4005402a11e03423a98419ebc4fbf0666f77df6 100644 (file)
@@ -61,7 +61,8 @@ void FeaturesPlugin_Revolution::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++);
   }
 
@@ -103,7 +104,7 @@ bool FeaturesPlugin_Revolution::makeRevolutions(ListOfShape& theBaseShapes,
   double aToAngle = 0.0;
   double aFromAngle = 0.0;
 
-  if(string(CREATION_METHOD())->value() == "ByAngles") {
+  if(string(CREATION_METHOD())->value() == CREATION_METHOD_BY_ANGLES()) {
     aToAngle = real(TO_ANGLE_ID())->value();
     aFromAngle = real(FROM_ANGLE_ID())->value();
   } else {
@@ -115,7 +116,7 @@ bool FeaturesPlugin_Revolution::makeRevolutions(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,12 +134,14 @@ bool FeaturesPlugin_Revolution::makeRevolutions(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++) {
     GeomShapePtr aBaseShape = *anIter;
 
-    std::shared_ptr<GeomAlgoAPI_Revolution> aRevolAlgo(new GeomAlgoAPI_Revolution(aBaseShape, anAxis,
-                                                                                  aToShape, aToAngle,
-                                                                                  aFromShape, aFromAngle));
+    std::shared_ptr<GeomAlgoAPI_Revolution> aRevolAlgo(new GeomAlgoAPI_Revolution(
+                                                       aBaseShape, anAxis,
+                                                       aToShape, aToAngle,
+                                                       aFromShape, aFromAngle));
     if(!isMakeShapeValid(aRevolAlgo)) {
       return false;
     }