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 if(myGenerated.find(theShape, aGenerated)) {
52 theHistory.insert(theHistory.end(), aGenerated.begin(), aGenerated.end());
56 //=================================================================================================
57 void GeomAlgoAPI_MakeShapeCustom::modified(const std::shared_ptr<GeomAPI_Shape> theShape,
58 ListOfShape& theHistory)
60 ListOfShape aModified;
61 if(myModified.find(theShape, aModified)) {
62 theHistory.insert(theHistory.end(), aModified.begin(), aModified.end());
66 //=================================================================================================
67 bool GeomAlgoAPI_MakeShapeCustom::isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
69 return myDeleted.isBound(theShape);