Salome HOME
Merge Dev_2.1.0 with PythonAPI branch
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeShapeCustom.cpp
index 318f9b6e5b01afbfdab97825fab51dcfa488bc16..7e3985d25d6a1a9e200d1c607392382bd1c0d693 100644 (file)
@@ -8,13 +8,12 @@
 
 //=================================================================================================
 GeomAlgoAPI_MakeShapeCustom::GeomAlgoAPI_MakeShapeCustom()
-: GeomAlgoAPI_MakeShape()
 {}
 
 //=================================================================================================
 void GeomAlgoAPI_MakeShapeCustom::setResult(const std::shared_ptr<GeomAPI_Shape> theShape)
 {
-  myShape = theShape;
+  setShape(theShape);
 }
 
 //=================================================================================================
@@ -37,19 +36,14 @@ bool GeomAlgoAPI_MakeShapeCustom::addDeleted(const std::shared_ptr<GeomAPI_Shape
   return myDeleted.bind(theShape, theShape);
 }
 
-//=================================================================================================
-const std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_MakeShapeCustom::shape() const
-{
-  return myShape;
-}
-
 //=================================================================================================
 void GeomAlgoAPI_MakeShapeCustom::generated(const std::shared_ptr<GeomAPI_Shape> theShape,
                                             ListOfShape& theHistory)
 {
   ListOfShape aGenerated;
-  myGenerated.find(theShape, aGenerated);
-  theHistory.insert(theHistory.end(), aGenerated.begin(), aGenerated.end());
+  if(myGenerated.find(theShape, aGenerated)) {
+    theHistory.insert(theHistory.end(), aGenerated.begin(), aGenerated.end());
+  }
 }
 
 //=================================================================================================
@@ -57,8 +51,9 @@ void GeomAlgoAPI_MakeShapeCustom::modified(const std::shared_ptr<GeomAPI_Shape>
                                            ListOfShape& theHistory)
 {
   ListOfShape aModified;
-  myModified.find(theShape, aModified);
-  theHistory.insert(theHistory.end(), aModified.begin(), aModified.end());
+  if(myModified.find(theShape, aModified)) {
+    theHistory.insert(theHistory.end(), aModified.begin(), aModified.end());
+  }
 }
 
 //=================================================================================================