b311480e |
1 | // Created by: Peter KURNEV |
4e57c75e |
2 | // Copyright (c) 2010-2012 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 |
b311480e |
6 | // |
7 | // The content of this file is subject to the Open CASCADE Technology Public |
8 | // License Version 6.5 (the "License"). You may not use the content of this file |
9 | // except in compliance with the License. Please obtain a copy of the License |
10 | // at http://www.opencascade.org and read it completely before using this file. |
11 | // |
12 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
13 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
14 | // |
15 | // The Original Code and all software distributed under the License is |
16 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
17 | // Initial Developer hereby disclaims all such warranties, including without |
18 | // limitation, any warranties of merchantability, fitness for a particular |
19 | // purpose or non-infringement. Please see the License for the specific terms |
20 | // and conditions governing the rights and limitations under the License. |
21 | |
7fd59977 |
22 | |
4e57c75e |
23 | #include <BOPAlgo_BuilderShape.ixx> |
7fd59977 |
24 | //======================================================================= |
4e57c75e |
25 | //function : |
26 | //purpose : |
7fd59977 |
27 | //======================================================================= |
4e57c75e |
28 | BOPAlgo_BuilderShape::BOPAlgo_BuilderShape() |
7fd59977 |
29 | : |
4e57c75e |
30 | BOPAlgo_Algo() |
7fd59977 |
31 | { |
4e57c75e |
32 | myHasDeleted=Standard_False; |
33 | myHasGenerated=Standard_False; |
34 | myHasModified=Standard_False; |
35 | myFlagHistory=Standard_False; |
7fd59977 |
36 | } |
37 | //======================================================================= |
4e57c75e |
38 | //function : |
39 | //purpose : |
7fd59977 |
40 | //======================================================================= |
4e57c75e |
41 | BOPAlgo_BuilderShape::BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator) |
42 | : |
43 | BOPAlgo_Algo(theAllocator) |
7fd59977 |
44 | { |
4e57c75e |
45 | myHasDeleted=Standard_False; |
46 | myHasGenerated=Standard_False; |
47 | myHasModified=Standard_False; |
48 | myFlagHistory=Standard_False; |
7fd59977 |
49 | } |
7fd59977 |
50 | //======================================================================= |
4e57c75e |
51 | //function : ~ |
52 | //purpose : |
7fd59977 |
53 | //======================================================================= |
4e57c75e |
54 | BOPAlgo_BuilderShape::~BOPAlgo_BuilderShape() |
7fd59977 |
55 | { |
7fd59977 |
56 | } |
7fd59977 |
57 | //======================================================================= |
4e57c75e |
58 | //function : Shape |
59 | //purpose : |
7fd59977 |
60 | //======================================================================= |
4e57c75e |
61 | const TopoDS_Shape& BOPAlgo_BuilderShape::Shape() const |
7fd59977 |
62 | { |
4e57c75e |
63 | return myShape; |
7fd59977 |
64 | } |
4e57c75e |
65 | // |
7fd59977 |
66 | //======================================================================= |
4e57c75e |
67 | //function : Generated |
68 | //purpose : |
7fd59977 |
69 | //======================================================================= |
4e57c75e |
70 | const TopTools_ListOfShape& BOPAlgo_BuilderShape::Generated(const TopoDS_Shape& ) |
7fd59977 |
71 | { |
4e57c75e |
72 | myHistShapes.Clear(); |
73 | return myHistShapes; |
7fd59977 |
74 | } |
75 | //======================================================================= |
4e57c75e |
76 | //function : Modified |
77 | //purpose : |
7fd59977 |
78 | //======================================================================= |
4e57c75e |
79 | const TopTools_ListOfShape& BOPAlgo_BuilderShape::Modified(const TopoDS_Shape& ) |
7fd59977 |
80 | { |
4e57c75e |
81 | myHistShapes.Clear(); |
82 | return myHistShapes; |
7fd59977 |
83 | } |
7fd59977 |
84 | //======================================================================= |
4e57c75e |
85 | //function : IsDeleted |
86 | //purpose : |
7fd59977 |
87 | //======================================================================= |
4e57c75e |
88 | Standard_Boolean BOPAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS) |
7fd59977 |
89 | { |
4e57c75e |
90 | Standard_Boolean bRet; |
91 | // |
92 | bRet=!myMapShape.Contains(theS); |
93 | return bRet; |
7fd59977 |
94 | } |
95 | //======================================================================= |
4e57c75e |
96 | //function : HasDeleted |
97 | //purpose : |
7fd59977 |
98 | //======================================================================= |
4e57c75e |
99 | Standard_Boolean BOPAlgo_BuilderShape::HasDeleted()const |
7fd59977 |
100 | { |
4e57c75e |
101 | return myHasDeleted; |
7fd59977 |
102 | } |
103 | //======================================================================= |
4e57c75e |
104 | //function : HasGenerated |
105 | //purpose : |
7fd59977 |
106 | //======================================================================= |
4e57c75e |
107 | Standard_Boolean BOPAlgo_BuilderShape::HasGenerated()const |
7fd59977 |
108 | { |
4e57c75e |
109 | return myHasGenerated; |
7fd59977 |
110 | } |
111 | //======================================================================= |
4e57c75e |
112 | //function : HasModified |
113 | //purpose : |
7fd59977 |
114 | //======================================================================= |
4e57c75e |
115 | Standard_Boolean BOPAlgo_BuilderShape::HasModified()const |
7fd59977 |
116 | { |
4e57c75e |
117 | return myHasModified; |
7fd59977 |
118 | } |
119 | //======================================================================= |
4e57c75e |
120 | //function : PrepareHistory |
121 | //purpose : |
7fd59977 |
122 | //======================================================================= |
4e57c75e |
123 | void BOPAlgo_BuilderShape::PrepareHistory() |
7fd59977 |
124 | { |
4e57c75e |
125 | myHistShapes.Clear(); |
126 | myMapShape.Clear(); |
127 | myHasDeleted=Standard_False; |
128 | myHasGenerated=Standard_False; |
129 | myHasModified=Standard_False; |
130 | myFlagHistory=Standard_False; |
7fd59977 |
131 | } |
132 | |
133 | //======================================================================= |
4e57c75e |
134 | //function : ImagesResult |
135 | //purpose : |
7fd59977 |
136 | //======================================================================= |
4e57c75e |
137 | const BOPCol_IndexedDataMapOfShapeListOfShape& |
138 | BOPAlgo_BuilderShape::ImagesResult()const |
7fd59977 |
139 | { |
4e57c75e |
140 | return myImagesResult; |
7fd59977 |
141 | } |
142 | |