b311480e |
1 | // Created by: Peter KURNEV |
973c2be1 |
2 | // Copyright (c) 2010-2014 OPEN CASCADE SAS |
4e57c75e |
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 |
b311480e |
6 | // |
973c2be1 |
7 | // This file is part of Open CASCADE Technology software library. |
b311480e |
8 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
14 | // |
973c2be1 |
15 | // Alternatively, this file may be used under the terms of Open CASCADE |
16 | // commercial license or contractual agreement. |
7fd59977 |
17 | |
4e57c75e |
18 | #include <BOPAlgo_BuilderShape.ixx> |
7fd59977 |
19 | //======================================================================= |
4e57c75e |
20 | //function : |
21 | //purpose : |
7fd59977 |
22 | //======================================================================= |
4e57c75e |
23 | BOPAlgo_BuilderShape::BOPAlgo_BuilderShape() |
7fd59977 |
24 | : |
4e57c75e |
25 | BOPAlgo_Algo() |
7fd59977 |
26 | { |
4e57c75e |
27 | myHasDeleted=Standard_False; |
28 | myHasGenerated=Standard_False; |
29 | myHasModified=Standard_False; |
30 | myFlagHistory=Standard_False; |
7fd59977 |
31 | } |
32 | //======================================================================= |
4e57c75e |
33 | //function : |
34 | //purpose : |
7fd59977 |
35 | //======================================================================= |
4e57c75e |
36 | BOPAlgo_BuilderShape::BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator) |
37 | : |
38 | BOPAlgo_Algo(theAllocator) |
7fd59977 |
39 | { |
4e57c75e |
40 | myHasDeleted=Standard_False; |
41 | myHasGenerated=Standard_False; |
42 | myHasModified=Standard_False; |
43 | myFlagHistory=Standard_False; |
7fd59977 |
44 | } |
7fd59977 |
45 | //======================================================================= |
4e57c75e |
46 | //function : ~ |
47 | //purpose : |
7fd59977 |
48 | //======================================================================= |
4e57c75e |
49 | BOPAlgo_BuilderShape::~BOPAlgo_BuilderShape() |
7fd59977 |
50 | { |
7fd59977 |
51 | } |
7fd59977 |
52 | //======================================================================= |
4e57c75e |
53 | //function : Shape |
54 | //purpose : |
7fd59977 |
55 | //======================================================================= |
4e57c75e |
56 | const TopoDS_Shape& BOPAlgo_BuilderShape::Shape() const |
7fd59977 |
57 | { |
4e57c75e |
58 | return myShape; |
7fd59977 |
59 | } |
4e57c75e |
60 | // |
7fd59977 |
61 | //======================================================================= |
4e57c75e |
62 | //function : Generated |
63 | //purpose : |
7fd59977 |
64 | //======================================================================= |
4e57c75e |
65 | const TopTools_ListOfShape& BOPAlgo_BuilderShape::Generated(const TopoDS_Shape& ) |
7fd59977 |
66 | { |
4e57c75e |
67 | myHistShapes.Clear(); |
68 | return myHistShapes; |
7fd59977 |
69 | } |
70 | //======================================================================= |
4e57c75e |
71 | //function : Modified |
72 | //purpose : |
7fd59977 |
73 | //======================================================================= |
4e57c75e |
74 | const TopTools_ListOfShape& BOPAlgo_BuilderShape::Modified(const TopoDS_Shape& ) |
7fd59977 |
75 | { |
4e57c75e |
76 | myHistShapes.Clear(); |
77 | return myHistShapes; |
7fd59977 |
78 | } |
7fd59977 |
79 | //======================================================================= |
4e57c75e |
80 | //function : IsDeleted |
81 | //purpose : |
7fd59977 |
82 | //======================================================================= |
4e57c75e |
83 | Standard_Boolean BOPAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS) |
7fd59977 |
84 | { |
4e57c75e |
85 | Standard_Boolean bRet; |
86 | // |
87 | bRet=!myMapShape.Contains(theS); |
88 | return bRet; |
7fd59977 |
89 | } |
90 | //======================================================================= |
4e57c75e |
91 | //function : HasDeleted |
92 | //purpose : |
7fd59977 |
93 | //======================================================================= |
4e57c75e |
94 | Standard_Boolean BOPAlgo_BuilderShape::HasDeleted()const |
7fd59977 |
95 | { |
4e57c75e |
96 | return myHasDeleted; |
7fd59977 |
97 | } |
98 | //======================================================================= |
4e57c75e |
99 | //function : HasGenerated |
100 | //purpose : |
7fd59977 |
101 | //======================================================================= |
4e57c75e |
102 | Standard_Boolean BOPAlgo_BuilderShape::HasGenerated()const |
7fd59977 |
103 | { |
4e57c75e |
104 | return myHasGenerated; |
7fd59977 |
105 | } |
106 | //======================================================================= |
4e57c75e |
107 | //function : HasModified |
108 | //purpose : |
7fd59977 |
109 | //======================================================================= |
4e57c75e |
110 | Standard_Boolean BOPAlgo_BuilderShape::HasModified()const |
7fd59977 |
111 | { |
4e57c75e |
112 | return myHasModified; |
7fd59977 |
113 | } |
114 | //======================================================================= |
4e57c75e |
115 | //function : PrepareHistory |
116 | //purpose : |
7fd59977 |
117 | //======================================================================= |
4e57c75e |
118 | void BOPAlgo_BuilderShape::PrepareHistory() |
7fd59977 |
119 | { |
4e57c75e |
120 | myHistShapes.Clear(); |
121 | myMapShape.Clear(); |
122 | myHasDeleted=Standard_False; |
123 | myHasGenerated=Standard_False; |
124 | myHasModified=Standard_False; |
125 | myFlagHistory=Standard_False; |
7fd59977 |
126 | } |
127 | |
128 | //======================================================================= |
4e57c75e |
129 | //function : ImagesResult |
130 | //purpose : |
7fd59977 |
131 | //======================================================================= |
4e57c75e |
132 | const BOPCol_IndexedDataMapOfShapeListOfShape& |
133 | BOPAlgo_BuilderShape::ImagesResult()const |
7fd59977 |
134 | { |
4e57c75e |
135 | return myImagesResult; |
7fd59977 |
136 | } |
137 | |