Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Fillet.cpp
index 8b0fdab8130349a2b35a6160557a2a2124f6565f..b4ce7d588badd97d7926ae166f79477979a264f5 100644 (file)
@@ -165,7 +165,7 @@ void FeaturesPlugin_Fillet::execute()
     std::shared_ptr<ModelAPI_ResultBody> aResultBody =
         document()->createBody(data(), aResultIndex);
 
-    loadNamingDS(aResultBody, aSolid, aFilletEdgesAndVertices, aResult, aFilletBuilder);
+    loadNamingDS(aResultBody, aSolid, aResult, aFilletBuilder);
     setResult(aResultBody, aResultIndex);
     aResultIndex++;
   }
@@ -196,7 +196,6 @@ bool FeaturesPlugin_Fillet::isFailed(
 void FeaturesPlugin_Fillet::loadNamingDS(
     std::shared_ptr<ModelAPI_ResultBody> theResultBody,
     const std::shared_ptr<GeomAPI_Shape> theBaseShape,
-    const ListOfShape& theFilletShapes,
     const std::shared_ptr<GeomAPI_Shape> theResultShape,
     const std::shared_ptr<GeomAlgoAPI_MakeShape>& theMakeShape)
 {
@@ -206,32 +205,24 @@ void FeaturesPlugin_Fillet::loadNamingDS(
     return;
   }
 
-  std::shared_ptr<GeomAPI_DataMapOfShapeShape> aMapOfShapes = theMakeShape->mapOfSubShapes();
+  theResultBody->storeModified(theBaseShape, theResultShape);
 
-  const int aDeletedTag = 1;
-  const int aModifyTag = 2;
-  const int aGeneratedTag = 3;
-  /// sub solids will be placed at labels 4, 5, etc. if result is compound of solids
-  const int aSubsolidsTag = 4;
-
-  theResultBody->storeModified(theBaseShape, theResultShape, aSubsolidsTag);
-
-  const std::string aModFaceName = "Modified_Face";
   const std::string aFilletFaceName = "Fillet_Face";
 
   // Store modified faces
-  theResultBody->loadAndOrientModifiedShapes(theMakeShape.get(), theBaseShape,
-      GeomAPI_Shape::FACE, aModifyTag, aModFaceName, *aMapOfShapes);
+  theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::FACE);
 
   // Store new faces generated from edges and vertices
-  theResultBody->loadAndOrientGeneratedShapes(theMakeShape.get(), theBaseShape,
-      GeomAPI_Shape::EDGE, aGeneratedTag, aFilletFaceName, *aMapOfShapes);
-  theResultBody->loadAndOrientGeneratedShapes(theMakeShape.get(), theBaseShape,
-      GeomAPI_Shape::VERTEX, aGeneratedTag, aFilletFaceName, *aMapOfShapes);
+  theResultBody->loadGeneratedShapes(theMakeShape,
+                                     theBaseShape,
+                                     GeomAPI_Shape::EDGE,
+                                     aFilletFaceName);
+  theResultBody->loadGeneratedShapes(theMakeShape,
+                                     theBaseShape,
+                                     GeomAPI_Shape::VERTEX,
+                                     aFilletFaceName);
 
   // Deleted shapes
-  theResultBody->loadDeletedShapes(theMakeShape.get(), theBaseShape,
-                                   GeomAPI_Shape::EDGE, aDeletedTag);
-  theResultBody->loadDeletedShapes(theMakeShape.get(), theBaseShape,
-                                   GeomAPI_Shape::FACE, aDeletedTag);
+  theResultBody->loadDeletedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::EDGE);
+  theResultBody->loadDeletedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::FACE);
 }