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()
13 //=================================================================================================
14 void GeomAlgoAPI_MakeShapeCustom::setResult(const std::shared_ptr<GeomAPI_Shape> theShape)
19 //=================================================================================================
20 bool GeomAlgoAPI_MakeShapeCustom::addModified(const std::shared_ptr<GeomAPI_Shape> theBase,
21 const std::shared_ptr<GeomAPI_Shape> theResult)
23 return myModified.add(theBase, theResult);
26 //=================================================================================================
27 bool GeomAlgoAPI_MakeShapeCustom::addGenerated(const std::shared_ptr<GeomAPI_Shape> theBase,
28 const std::shared_ptr<GeomAPI_Shape> theResult)
30 return myGenerated.add(theBase, theResult);
33 //=================================================================================================
34 bool GeomAlgoAPI_MakeShapeCustom::addDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
36 return myDeleted.bind(theShape, theShape);
39 //=================================================================================================
40 void GeomAlgoAPI_MakeShapeCustom::generated(const std::shared_ptr<GeomAPI_Shape> theShape,
41 ListOfShape& theHistory)
43 ListOfShape aGenerated;
44 if(myGenerated.find(theShape, aGenerated)) {
45 theHistory.insert(theHistory.end(), aGenerated.begin(), aGenerated.end());
49 //=================================================================================================
50 void GeomAlgoAPI_MakeShapeCustom::modified(const std::shared_ptr<GeomAPI_Shape> theShape,
51 ListOfShape& theHistory)
53 ListOfShape aModified;
54 if(myModified.find(theShape, aModified)) {
55 theHistory.insert(theHistory.end(), aModified.begin(), aModified.end());
59 //=================================================================================================
60 bool GeomAlgoAPI_MakeShapeCustom::isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
62 return myDeleted.isBound(theShape);