Salome HOME
85fe88d5dfd9c9e924ac7eb7bab04e58ac4d09bd
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_BuilderShape.cxx
1 // Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // File:        GEOMAlgo_BuilderShape.cxx
24 // Created:
25 // Author:      Peter KURNEV
26 //
27 #include <GEOMAlgo_BuilderShape.hxx>
28
29 //=======================================================================
30 //function :
31 //purpose  :
32 //=======================================================================
33   GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape()
34 :
35   GEOMAlgo_Algo()
36 {
37   myHasDeleted=Standard_False;
38   myHasGenerated=Standard_False;
39   myHasModified=Standard_False;
40 }
41 //=======================================================================
42 //function : ~
43 //purpose  :
44 //=======================================================================
45   GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape()
46 {
47 }
48 //=======================================================================
49 //function : Shape
50 //purpose  :
51 //=======================================================================
52   const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const
53 {
54   return myShape;
55 }
56 //
57 //=======================================================================
58 //function : Generated
59 //purpose  :
60 //=======================================================================
61   const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& )
62 {
63   myHistShapes.Clear();
64   return myHistShapes;
65 }
66 //=======================================================================
67 //function : Modified
68 //purpose  :
69 //=======================================================================
70   const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& )
71 {
72   myHistShapes.Clear();
73   return myHistShapes;
74 }
75 //=======================================================================
76 //function : IsDeleted
77 //purpose  :
78 //=======================================================================
79   Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
80 {
81   Standard_Boolean bRet;
82   //
83   bRet=!myMapShape.Contains(theS);
84   return bRet;
85 }
86 //=======================================================================
87 //function : HasDeleted
88 //purpose  :
89 //=======================================================================
90   Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const
91 {
92   return myHasDeleted;
93 }
94 //=======================================================================
95 //function : HasGenerated
96 //purpose  :
97 //=======================================================================
98   Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const
99 {
100   return myHasGenerated;
101 }
102 //=======================================================================
103 //function : HasModified
104 //purpose  :
105 //=======================================================================
106   Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const
107 {
108   return myHasModified;
109 }
110 //=======================================================================
111 //function : PrepareHistory
112 //purpose  :
113 //=======================================================================
114   void GEOMAlgo_BuilderShape::PrepareHistory()
115 {
116   myHistShapes.Clear();
117   myMapShape.Clear();
118   myHasDeleted=Standard_False;
119   myHasGenerated=Standard_False;
120   myHasModified=Standard_False;
121   myImagesResult.Clear();
122 }
123 //=======================================================================
124 //function : ImagesResult
125 //purpose  :
126 //=======================================================================
127   const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
128 {
129   return myImagesResult;
130 }