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 | |
42cf5bc1 |
18 | |
19 | #include <BOPAlgo_BuilderShape.hxx> |
20 | #include <TopoDS_Shape.hxx> |
21 | |
7fd59977 |
22 | //======================================================================= |
4e57c75e |
23 | //function : |
24 | //purpose : |
7fd59977 |
25 | //======================================================================= |
4e57c75e |
26 | BOPAlgo_BuilderShape::BOPAlgo_BuilderShape() |
7fd59977 |
27 | : |
4e57c75e |
28 | BOPAlgo_Algo() |
7fd59977 |
29 | { |
4e57c75e |
30 | myHasDeleted=Standard_False; |
31 | myHasGenerated=Standard_False; |
32 | myHasModified=Standard_False; |
33 | myFlagHistory=Standard_False; |
7fd59977 |
34 | } |
35 | //======================================================================= |
4e57c75e |
36 | //function : |
37 | //purpose : |
7fd59977 |
38 | //======================================================================= |
4e57c75e |
39 | BOPAlgo_BuilderShape::BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator) |
40 | : |
41 | BOPAlgo_Algo(theAllocator) |
7fd59977 |
42 | { |
4e57c75e |
43 | myHasDeleted=Standard_False; |
44 | myHasGenerated=Standard_False; |
45 | myHasModified=Standard_False; |
46 | myFlagHistory=Standard_False; |
7fd59977 |
47 | } |
7fd59977 |
48 | //======================================================================= |
4e57c75e |
49 | //function : ~ |
50 | //purpose : |
7fd59977 |
51 | //======================================================================= |
4e57c75e |
52 | BOPAlgo_BuilderShape::~BOPAlgo_BuilderShape() |
7fd59977 |
53 | { |
7fd59977 |
54 | } |
7fd59977 |
55 | //======================================================================= |
4e57c75e |
56 | //function : Shape |
57 | //purpose : |
7fd59977 |
58 | //======================================================================= |
4e57c75e |
59 | const TopoDS_Shape& BOPAlgo_BuilderShape::Shape() const |
7fd59977 |
60 | { |
4e57c75e |
61 | return myShape; |
7fd59977 |
62 | } |
4e57c75e |
63 | // |
7fd59977 |
64 | //======================================================================= |
4e57c75e |
65 | //function : Generated |
66 | //purpose : |
7fd59977 |
67 | //======================================================================= |
4e57c75e |
68 | const TopTools_ListOfShape& BOPAlgo_BuilderShape::Generated(const TopoDS_Shape& ) |
7fd59977 |
69 | { |
4e57c75e |
70 | myHistShapes.Clear(); |
71 | return myHistShapes; |
7fd59977 |
72 | } |
73 | //======================================================================= |
4e57c75e |
74 | //function : Modified |
75 | //purpose : |
7fd59977 |
76 | //======================================================================= |
4e57c75e |
77 | const TopTools_ListOfShape& BOPAlgo_BuilderShape::Modified(const TopoDS_Shape& ) |
7fd59977 |
78 | { |
4e57c75e |
79 | myHistShapes.Clear(); |
80 | return myHistShapes; |
7fd59977 |
81 | } |
7fd59977 |
82 | //======================================================================= |
4e57c75e |
83 | //function : IsDeleted |
84 | //purpose : |
7fd59977 |
85 | //======================================================================= |
4e57c75e |
86 | Standard_Boolean BOPAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS) |
7fd59977 |
87 | { |
4e57c75e |
88 | Standard_Boolean bRet; |
89 | // |
90 | bRet=!myMapShape.Contains(theS); |
91 | return bRet; |
7fd59977 |
92 | } |
93 | //======================================================================= |
4e57c75e |
94 | //function : HasDeleted |
95 | //purpose : |
7fd59977 |
96 | //======================================================================= |
4e57c75e |
97 | Standard_Boolean BOPAlgo_BuilderShape::HasDeleted()const |
7fd59977 |
98 | { |
4e57c75e |
99 | return myHasDeleted; |
7fd59977 |
100 | } |
101 | //======================================================================= |
4e57c75e |
102 | //function : HasGenerated |
103 | //purpose : |
7fd59977 |
104 | //======================================================================= |
4e57c75e |
105 | Standard_Boolean BOPAlgo_BuilderShape::HasGenerated()const |
7fd59977 |
106 | { |
4e57c75e |
107 | return myHasGenerated; |
7fd59977 |
108 | } |
109 | //======================================================================= |
4e57c75e |
110 | //function : HasModified |
111 | //purpose : |
7fd59977 |
112 | //======================================================================= |
4e57c75e |
113 | Standard_Boolean BOPAlgo_BuilderShape::HasModified()const |
7fd59977 |
114 | { |
4e57c75e |
115 | return myHasModified; |
7fd59977 |
116 | } |
117 | //======================================================================= |
4e57c75e |
118 | //function : PrepareHistory |
119 | //purpose : |
7fd59977 |
120 | //======================================================================= |
4e57c75e |
121 | void BOPAlgo_BuilderShape::PrepareHistory() |
7fd59977 |
122 | { |
4e57c75e |
123 | myHistShapes.Clear(); |
124 | myMapShape.Clear(); |
125 | myHasDeleted=Standard_False; |
126 | myHasGenerated=Standard_False; |
127 | myHasModified=Standard_False; |
128 | myFlagHistory=Standard_False; |
7fd59977 |
129 | } |
130 | |
131 | //======================================================================= |
4e57c75e |
132 | //function : ImagesResult |
133 | //purpose : |
7fd59977 |
134 | //======================================================================= |
4e57c75e |
135 | const BOPCol_IndexedDataMapOfShapeListOfShape& |
136 | BOPAlgo_BuilderShape::ImagesResult()const |
7fd59977 |
137 | { |
4e57c75e |
138 | return myImagesResult; |
7fd59977 |
139 | } |
140 | |