]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_Tools.cpp
Salome HOME
Meet the coding style (line length <= 100)
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Tools.cpp
index 22431b98b62ab11c899b6abfff20a81dfc290b86..6a2db66944aa61279d65b2e28c1d46b01d13fabd 100644 (file)
@@ -13,7 +13,9 @@
 void FeaturesPlugin_Tools::storeModifiedShapes(GeomAlgoAPI_MakeShape& theAlgo,
                                                std::shared_ptr<ModelAPI_ResultBody> theResultBody,
                                                std::shared_ptr<GeomAPI_Shape> theBaseShape,
-                                               int& theTag,
+                                               const int theFaceTag,
+                                               const int theEdgeTag,
+                                               const int theVertexTag,
                                                const std::string theName,
                                                GeomAPI_DataMapOfShapeShape& theSubShapes)
 {
@@ -21,8 +23,14 @@ void FeaturesPlugin_Tools::storeModifiedShapes(GeomAlgoAPI_MakeShape& theAlgo,
     case GeomAPI_Shape::COMPOUND: {
       for(GeomAPI_ShapeIterator anIt(theBaseShape); anIt.more(); anIt.next())
       {
-        storeModifiedShapes(theAlgo, theResultBody, theBaseShape, theTag, theName, theSubShapes);
-        theTag++;
+        storeModifiedShapes(theAlgo,
+                            theResultBody,
+                            anIt.current(),
+                            theFaceTag,
+                            theEdgeTag,
+                            theVertexTag,
+                            theName,
+                            theSubShapes);
       }
       break;
     }
@@ -31,20 +39,22 @@ void FeaturesPlugin_Tools::storeModifiedShapes(GeomAlgoAPI_MakeShape& theAlgo,
     case GeomAPI_Shape::SHELL: {
       theResultBody->loadAndOrientModifiedShapes(&theAlgo,
                                 theBaseShape, GeomAPI_Shape::FACE,
-                                theTag, theName + "_Face", theSubShapes);
+                                theFaceTag, theName + "_Face", theSubShapes, false, true);
       if (theBaseShape->shapeType() == GeomAPI_Shape::COMPSOLID
           || theBaseShape->shapeType() == GeomAPI_Shape::SOLID) {
         break;
       }
     }
     case GeomAPI_Shape::FACE:
-    case GeomAPI_Shape::WIRE:
+    case GeomAPI_Shape::WIRE: {
       theResultBody->loadAndOrientModifiedShapes(&theAlgo,
                                 theBaseShape, GeomAPI_Shape::EDGE,
-                                ++theTag, theName + "_Edge", theSubShapes);
-    case GeomAPI_Shape::EDGE:
+                                theEdgeTag, theName + "_Edge", theSubShapes, false, true);
+    }
+    case GeomAPI_Shape::EDGE: {
       theResultBody->loadAndOrientModifiedShapes(&theAlgo,
                               theBaseShape, GeomAPI_Shape::VERTEX,
-                              ++theTag, theName + "_Vertex", theSubShapes);
+                              theVertexTag, theName + "_Vertex", theSubShapes, false, true);
+    }
   }
 }