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