1 // Created by: Peter KURNEV
2 // Copyright (c) 2010-2014 OPEN CASCADE SAS
3 // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
4 // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
5 // EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
7 // This file is part of Open CASCADE Technology software library.
9 // This library is free software; you can redistribute it and/or modify it under
10 // the terms of the GNU Lesser General Public License version 2.1 as published
11 // by the Free Software Foundation, with special exception defined in the file
12 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
13 // distribution for complete text of the license and disclaimer of any warranty.
15 // Alternatively, this file may be used under the terms of Open CASCADE
16 // commercial license or contractual agreement.
19 #include <BOPAlgo_BuilderShape.hxx>
20 #include <TopoDS_Shape.hxx>
22 //=======================================================================
25 //=======================================================================
26 BOPAlgo_BuilderShape::BOPAlgo_BuilderShape()
30 myHasDeleted=Standard_False;
31 myHasGenerated=Standard_False;
32 myHasModified=Standard_False;
33 myFlagHistory=Standard_False;
35 //=======================================================================
38 //=======================================================================
39 BOPAlgo_BuilderShape::BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator)
41 BOPAlgo_Algo(theAllocator)
43 myHasDeleted=Standard_False;
44 myHasGenerated=Standard_False;
45 myHasModified=Standard_False;
46 myFlagHistory=Standard_False;
48 //=======================================================================
51 //=======================================================================
52 BOPAlgo_BuilderShape::~BOPAlgo_BuilderShape()
55 //=======================================================================
58 //=======================================================================
59 const TopoDS_Shape& BOPAlgo_BuilderShape::Shape() const
64 //=======================================================================
65 //function : Generated
67 //=======================================================================
68 const TopTools_ListOfShape& BOPAlgo_BuilderShape::Generated(const TopoDS_Shape& )
73 //=======================================================================
76 //=======================================================================
77 const TopTools_ListOfShape& BOPAlgo_BuilderShape::Modified(const TopoDS_Shape& )
82 //=======================================================================
83 //function : IsDeleted
85 //=======================================================================
86 Standard_Boolean BOPAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
88 Standard_Boolean bRet;
90 bRet=!myMapShape.Contains(theS);
93 //=======================================================================
94 //function : HasDeleted
96 //=======================================================================
97 Standard_Boolean BOPAlgo_BuilderShape::HasDeleted()const
101 //=======================================================================
102 //function : HasGenerated
104 //=======================================================================
105 Standard_Boolean BOPAlgo_BuilderShape::HasGenerated()const
107 return myHasGenerated;
109 //=======================================================================
110 //function : HasModified
112 //=======================================================================
113 Standard_Boolean BOPAlgo_BuilderShape::HasModified()const
115 return myHasModified;
117 //=======================================================================
118 //function : PrepareHistory
120 //=======================================================================
121 void BOPAlgo_BuilderShape::PrepareHistory()
123 myHistShapes.Clear();
125 myHasDeleted=Standard_False;
126 myHasGenerated=Standard_False;
127 myHasModified=Standard_False;
128 myFlagHistory=Standard_False;
131 //=======================================================================
132 //function : ImagesResult
134 //=======================================================================
135 const BOPCol_IndexedDataMapOfShapeListOfShape&
136 BOPAlgo_BuilderShape::ImagesResult()const
138 return myImagesResult;