Salome HOME
Removed some redundant names.
authordbv <dbv@opencascade.com>
Wed, 17 Oct 2018 14:40:54 +0000 (17:40 +0300)
committermpv <mpv@opencascade.com>
Mon, 19 Nov 2018 08:45:52 +0000 (11:45 +0300)
13 files changed:
src/BuildPlugin/BuildPlugin_Compound.cpp
src/BuildPlugin/BuildPlugin_Edge.cpp
src/BuildPlugin/BuildPlugin_Shell.cpp
src/BuildPlugin/BuildPlugin_Solid.cpp
src/BuildPlugin/BuildPlugin_SubShapes.cpp
src/BuildPlugin/BuildPlugin_Wire.cpp
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp
src/FeaturesPlugin/FeaturesPlugin_FusionFaces.cpp
src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp
src/FeaturesPlugin/FeaturesPlugin_Partition.cpp
src/FeaturesPlugin/FeaturesPlugin_RemoveSubShapes.cpp
src/FeaturesPlugin/FeaturesPlugin_Union.cpp

index 39c136ade64a88c25d4ccaff449d24661fd8ea6f..6d6c0c79f9a3f70b284d5969ba31e5e7fb54cafd 100644 (file)
@@ -77,9 +77,9 @@ void BuildPlugin_Compound::execute()
   if (aCopyCompound) {
     ResultBodyPtr aResultBody = document()->createBody(data(), anIndexToRemove++);
     aResultBody->store(aCopyCompound);
-    aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::VERTEX, "Modified_Vertex");
-    aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::EDGE, "Modified_Edge");
-    aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::FACE, "Modified_Face");
+    aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::VERTEX);
+    aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::EDGE);
+    aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::FACE);
     setResult(aResultBody);
   }
   removeResults(anIndexToRemove);
index 2004281d7783bc2820de073c82dff0d91a6ccd2a..a3a247e30f226e4f613bc43954a3cd887710b00b 100644 (file)
@@ -99,7 +99,7 @@ void BuildPlugin_Edge::execute()
     // Store result.
     ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
     aResultBody->storeModified(aShape, aCopyAlgo->shape());
-    aResultBody->loadModifiedShapes(aCopyAlgo, aShape, GeomAPI_Shape::VERTEX, "Modified_Vertex");
+    aResultBody->loadModifiedShapes(aCopyAlgo, aShape, GeomAPI_Shape::VERTEX);
 
     setResult(aResultBody, aResultIndex);
     ++aResultIndex;
index 9e55284cec355fc841f23b6ccc31ce5a74b3ff49..cc361be5992ace4735b409ceae09bda6426a220c 100644 (file)
@@ -100,12 +100,10 @@ void BuildPlugin_Shell::execute()
           if (aShell->isSubShape(aHistoryShape, false)) {
             aResultBody->loadModifiedShapes(aSewingAlgo,
                                             aFace,
-                                            GeomAPI_Shape::EDGE,
-                                            "Modified_Edge");
+                                            GeomAPI_Shape::EDGE);
             aResultBody->loadModifiedShapes(aSewingAlgo,
                                             aFace,
-                                            GeomAPI_Shape::FACE,
-                                            "Modified_Face");
+                                            GeomAPI_Shape::FACE);
             break;
           }
         }
index 6e79e3b89517d5c007eaefe40fe8598285bd890c..dc0c57ed54d37afb59bca4fb74b1f75aadaa2f36 100644 (file)
@@ -71,7 +71,7 @@ void BuildPlugin_Solid::storeResult(const ListOfShape& theOriginalShapes,
        ++anIt)
   {
     GeomShapePtr aShape = *anIt;
-    aResultBody->loadModifiedShapes(theAlgorithm, aShape, GeomAPI_Shape::FACE, "Modified_Face");
+    aResultBody->loadModifiedShapes(theAlgorithm, aShape, GeomAPI_Shape::FACE);
   }
   setResult(aResultBody);
 }
index bb2fa74c94c37a538cb65dd1c7fa718708c61428..c919828c72c853119dd907ee22e7e15d28f7ee2b 100644 (file)
@@ -127,7 +127,7 @@ void BuildPlugin_SubShapes::execute()
   const int aModEdgeTag = 2;
   ResultBodyPtr aResultBody = document()->createBody(data());
   aResultBody->storeModified(aBaseShape, aResultShape);
-  aResultBody->loadModifiedShapes(aBuilder, aBaseShape, GeomAPI_Shape::EDGE, "Modified_Edge");
+  aResultBody->loadModifiedShapes(aBuilder, aBaseShape, GeomAPI_Shape::EDGE);
   for (ListOfShape::const_iterator anIt = aShapesToAdd.cbegin();
        anIt != aShapesToAdd.cend();
        ++anIt)
@@ -135,9 +135,7 @@ void BuildPlugin_SubShapes::execute()
     GeomAPI_Shape::ShapeType aShType = (*anIt)->shapeType();
     aResultBody->loadModifiedShapes(aBuilder,
                                     *anIt,
-                                    aShType,
-                                    aShType == GeomAPI_Shape::VERTEX ? "Modified_Vertex"
-                                                                     : "Modified_Edge");
+                                    aShType);
   }
   setResult(aResultBody);
 }
index 54ae7a95bac6b5594c4508390b269ee9c90ac8c0..a941765b7d1d0771a3e699995de647c5a1f3b3da 100644 (file)
@@ -88,7 +88,7 @@ void BuildPlugin_Wire::execute()
     for(ListOfShape::const_iterator anIt = anEdges.cbegin(); anIt != anEdges.cend(); ++anIt) {
       std::shared_ptr<GeomAPI_Edge> anEdgeInList(new GeomAPI_Edge(*anIt));
       if(anEdgeInList->isEqual(anEdgeInResult)) {
-        aResultBody->modified(anEdgeInList, anEdgeInResult, "Edge");
+        aResultBody->modified(anEdgeInList, anEdgeInResult);
         break;
       }
     }
index e12238eaa5bc1cc43880aabd984621456e9d1c23..63a7834b008c638ce8d1285f03fc9ff96b4dcdb0 100644 (file)
@@ -581,7 +581,6 @@ void FeaturesPlugin_Boolean::execute()
       }
 
       std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeShapeList;
-      GeomAPI_DataMapOfShapeShape aMapOfShapes;
       if(!aShapesToAdd.empty()) {
         // Cut objects with not used solids.
         std::shared_ptr<GeomAlgoAPI_Boolean> anObjectsCutAlgo(new GeomAlgoAPI_Boolean(
@@ -593,7 +592,6 @@ void FeaturesPlugin_Boolean::execute()
           aShapesToSmash.clear();
           aShapesToSmash.push_back(anObjectsCutAlgo->shape());
           aMakeShapeList->appendAlgo(anObjectsCutAlgo);
-          aMapOfShapes.merge(anObjectsCutAlgo->mapOfSubShapes());
         }
 
         // Cut tools with not used solids.
@@ -605,7 +603,6 @@ void FeaturesPlugin_Boolean::execute()
           aTools.clear();
           aTools.push_back(aToolsCutAlgo->shape());
           aMakeShapeList->appendAlgo(aToolsCutAlgo);
-          aMapOfShapes.merge(aToolsCutAlgo->mapOfSubShapes());
         }
       }
 
@@ -631,7 +628,6 @@ void FeaturesPlugin_Boolean::execute()
         return;
       }
       aMakeShapeList->appendAlgo(aBoolAlgo);
-      aMapOfShapes.merge(aBoolAlgo->mapOfSubShapes());
 
       // Put all (cut result, tools and not used solids) to PaveFiller.
       aShapesToAdd.push_back(aBoolAlgo->shape());
@@ -657,7 +653,6 @@ void FeaturesPlugin_Boolean::execute()
 
       std::shared_ptr<GeomAPI_Shape> aShape = aFillerAlgo->shape();
       aMakeShapeList->appendAlgo(aFillerAlgo);
-      aMapOfShapes.merge(aFillerAlgo->mapOfSubShapes());
 
       std::shared_ptr<GeomAPI_Shape> aFrontShape = anOriginalShapes.front();
       anOriginalShapes.pop_front();
@@ -694,26 +689,19 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> t
 
   theResultBody->storeModified(theBaseShape, theResultShape);
 
-  const std::string aModEName = "Modified_Edge";
-  const std::string aModFName = "Modified_Face";
-
-  theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::EDGE, aModEName);
-  theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::FACE, aModFName);
+  theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::EDGE);
+  theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::FACE);
 
   theResultBody->loadDeletedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::FACE);
 
-  std::string aName;
   for (ListOfShape::const_iterator anIter = theTools.begin();
        anIter != theTools.end();
        ++anIter)
   {
-    aName = (*anIter)->shapeType() <= GeomAPI_Shape::FACE ? aModFName
-                                                          : aModEName;
-    theResultBody->loadModifiedShapes(theMakeShape,
-                                      *anIter,
-                                      aName == aModEName ? GeomAPI_Shape::EDGE
-                                                         : GeomAPI_Shape::FACE,
-                                      aName);
+    GeomAPI_Shape::ShapeType aShapeType =
+      (*anIter)->shapeType() <= GeomAPI_Shape::FACE ? GeomAPI_Shape::FACE
+                                                    : GeomAPI_Shape::EDGE;
+    theResultBody->loadModifiedShapes(theMakeShape, *anIter, aShapeType);
 
     theResultBody->loadDeletedShapes(theMakeShape, *anIter, GeomAPI_Shape::FACE);
   }
index 1c486f59e9309496f7bc62f3d0cb8b46f4a85520..f1b693c5bd005bce3f87cf806297fac7453d82dc 100644 (file)
@@ -380,8 +380,6 @@ void FeaturesPlugin_CompositeBoolean::storeModificationHistory(ResultBodyPtr the
                                 const ListOfShape& theTools,
                                 const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape)
 {
-  const std::string aModName = "Modfied";
-
   ListOfShape aTools = theTools;
   aTools.push_back(theObject);
 
index 12e0325e0752471bf6b5335acfc4fd26be4fd52e..d9973525da8cf60ea7335fa4682c27474fb2b460 100644 (file)
@@ -81,10 +81,8 @@ void FeaturesPlugin_FusionFaces::execute()
   } else {
     aResultBody->storeModified(aBaseShape, aResultShape);
 
-    const std::string aModEName = "Modified_Edge";
-    const std::string aModFName = "Modified_Face";
-    aResultBody->loadModifiedShapes(anAlgo, aBaseShape, GeomAPI_Shape::EDGE, aModEName);
-    aResultBody->loadModifiedShapes(anAlgo, aBaseShape, GeomAPI_Shape::FACE, aModFName);
+    aResultBody->loadModifiedShapes(anAlgo, aBaseShape, GeomAPI_Shape::EDGE);
+    aResultBody->loadModifiedShapes(anAlgo, aBaseShape, GeomAPI_Shape::FACE);
   }
   setResult(aResultBody);
 }
index 73dec6b8a6fd486a3ee8ce9c1540277764c28c68..b5fd9982b875dbafe8d635575e5724b9f3af1791 100644 (file)
@@ -142,12 +142,7 @@ void FeaturesPlugin_Intersection::loadNamingDS(std::shared_ptr<ModelAPI_ResultBo
         continue;
       }
       if(aShapesMap.isBound(aSubShape)) {
-        theResultBody->modified(aShapesMap.find(aSubShape),
-          aSubShape,
-          std::string("Modified_")
-            + (anIndex == 0 ? "Vertex_" : "Edge_")
-            + std::to_string((long long)(anIndex == 0 ? aModifiedVertexIndex++
-                                                      : aModifiedEdgeIndex++)));
+        theResultBody->modified(aShapesMap.find(aSubShape), aSubShape);
       } else {
         theResultBody->generated(
           aSubShape,
index f8b1bfdb2250f0133e6a966010b7bf91d45356d7..ca91f21b63008e36e0cb6c115c9b09cd225a6b60 100755 (executable)
@@ -213,8 +213,8 @@ void FeaturesPlugin_Partition::storeResult(
        ++anIt)
   {
     GeomShapePtr aShape = *anIt;
-    aResultBody->loadModifiedShapes(theMakeShape, aShape, GeomAPI_Shape::EDGE, "Modified_Edge");
-    aResultBody->loadModifiedShapes(theMakeShape, aShape, GeomAPI_Shape::FACE, "Modified_Face");
+    aResultBody->loadModifiedShapes(theMakeShape, aShape, GeomAPI_Shape::EDGE);
+    aResultBody->loadModifiedShapes(theMakeShape, aShape, GeomAPI_Shape::FACE);
     aResultBody->loadDeletedShapes(theMakeShape, aShape, GeomAPI_Shape::FACE);
   }
 
index b53eca256376717e238d8c725fc31ef4ff180d0a..d2bd7e5dea977411440b3e49077b9165b450b8cb 100644 (file)
@@ -293,15 +293,12 @@ void FeaturesPlugin_RemoveSubShapes::execute()
 
   aResultBody->loadModifiedShapes(aMakeShapeList,
                                   aBaseShape,
-                                  GeomAPI_Shape::FACE,
-                                  "Modified_Face");
+                                  GeomAPI_Shape::FACE);
   aResultBody->loadModifiedShapes(aMakeShapeList,
                                   aBaseShape,
-                                  GeomAPI_Shape::EDGE,
-                                  "Modified_Edge");
+                                  GeomAPI_Shape::EDGE);
   aResultBody->loadModifiedShapes(aMakeShapeList,
                                   aBaseShape,
-                                  GeomAPI_Shape::VERTEX,
-                                  "Modified_Vertex");
+                                  GeomAPI_Shape::VERTEX);
   setResult(aResultBody);
 }
index 9c9cfdc5aa0ef9663490b3ee2cc76e753e25d7ab..e9cbaee7de9a13a1aaa3a2d56001da00a5becfaf 100644 (file)
@@ -169,15 +169,13 @@ void FeaturesPlugin_Union::execute()
   // workaround: make copy to name edges correctly
 
   // Store result and naming.
-  const std::string aModEName = "Modified_Edge";
-  const std::string aModFName = "Modified_Face";
 
   std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
   aResultBody->storeModified(anObjects.front(), aShape);
 
   for(ListOfShape::const_iterator anIter = anObjects.begin(); anIter != anObjects.end(); ++anIter) {
-    aResultBody->loadModifiedShapes(aMakeShapeList, *anIter, GeomAPI_Shape::EDGE, aModEName);
-    aResultBody->loadModifiedShapes(aMakeShapeList, *anIter, GeomAPI_Shape::FACE, aModFName);
+    aResultBody->loadModifiedShapes(aMakeShapeList, *anIter, GeomAPI_Shape::EDGE);
+    aResultBody->loadModifiedShapes(aMakeShapeList, *anIter, GeomAPI_Shape::FACE);
     //aResultBody->loadDeletedShapes(&aMakeShapeList, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
   }