1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_MakeShapeCustom.cpp
4 // Created: 4 September 2015
5 // Author: Dmitry Bobylev
7 #include <GeomAlgoAPI_MakeShapeCustom.h>
9 //=================================================================================================
10 GeomAlgoAPI_MakeShapeCustom::GeomAlgoAPI_MakeShapeCustom()
11 : GeomAlgoAPI_MakeShape()
14 //=================================================================================================
15 void GeomAlgoAPI_MakeShapeCustom::setResult(const std::shared_ptr<GeomAPI_Shape> theShape)
20 //=================================================================================================
21 bool GeomAlgoAPI_MakeShapeCustom::addModified(const std::shared_ptr<GeomAPI_Shape> theBase,
22 const std::shared_ptr<GeomAPI_Shape> theResult)
24 return myModified.add(theBase, theResult);
27 //=================================================================================================
28 bool GeomAlgoAPI_MakeShapeCustom::addGenerated(const std::shared_ptr<GeomAPI_Shape> theBase,
29 const std::shared_ptr<GeomAPI_Shape> theResult)
31 return myGenerated.add(theBase, theResult);
34 //=================================================================================================
35 bool GeomAlgoAPI_MakeShapeCustom::addDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
37 return myDeleted.bind(theShape, theShape);
40 //=================================================================================================
41 const std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_MakeShapeCustom::shape() const
46 //=================================================================================================
47 void GeomAlgoAPI_MakeShapeCustom::generated(const std::shared_ptr<GeomAPI_Shape> theShape,
48 ListOfShape& theHistory)
50 ListOfShape aGenerated;
51 myGenerated.find(theShape, aGenerated);
52 theHistory.insert(theHistory.end(), aGenerated.begin(), aGenerated.end());
55 //=================================================================================================
56 void GeomAlgoAPI_MakeShapeCustom::modified(const std::shared_ptr<GeomAPI_Shape> theShape,
57 ListOfShape& theHistory)
59 ListOfShape aModified;
60 myModified.find(theShape, aModified);
61 theHistory.insert(theHistory.end(), aModified.begin(), aModified.end());
64 //=================================================================================================
65 bool GeomAlgoAPI_MakeShapeCustom::isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
67 return myDeleted.isBound(theShape);