Salome HOME
Removed some redundant names.
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_Edge.cpp
index 62a036a4b83c5fe99503bb395864c7cb68033cd4..a3a247e30f226e4f613bc43954a3cd887710b00b 100644 (file)
@@ -76,34 +76,30 @@ void BuildPlugin_Edge::execute()
     }
 
     // Copy shape.
-    GeomAlgoAPI_Copy aCopyAlgo(aShape);
+    GeomMakeShapePtr aCopyAlgo(new GeomAlgoAPI_Copy(aShape));
 
     // Check that algo is done.
-    if(!aCopyAlgo.isDone()) {
+    if(!aCopyAlgo->isDone()) {
       setError("Error: " + getKind() + " algorithm failed.");
       return;
     }
 
     // Check if shape is not null.
-    if(!aCopyAlgo.shape().get() || aCopyAlgo.shape()->isNull()) {
+    if(!aCopyAlgo->shape().get() || aCopyAlgo->shape()->isNull()) {
       setError("Error: Resulting shape is null.");
       return;
     }
 
     // Check that resulting shape is valid.
-    if(!aCopyAlgo.isValid()) {
+    if(!aCopyAlgo->isValid()) {
       setError("Error: Resulting shape is not valid.");
       return;
     }
 
     // Store result.
     ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
-    aResultBody->storeModified(aShape, aCopyAlgo.shape());
-    std::shared_ptr<GeomAPI_DataMapOfShapeShape> aSubShapes = aCopyAlgo.mapOfSubShapes();
-    int aModVertexTag = 1;
-    std::string aModVertexName = "Modified_Vertex";
-    aResultBody->loadAndOrientModifiedShapes(&aCopyAlgo, aShape, GeomAPI_Shape::VERTEX,
-                                             aModVertexTag, aModVertexName, *aSubShapes.get());
+    aResultBody->storeModified(aShape, aCopyAlgo->shape());
+    aResultBody->loadModifiedShapes(aCopyAlgo, aShape, GeomAPI_Shape::VERTEX);
 
     setResult(aResultBody, aResultIndex);
     ++aResultIndex;