Salome HOME
Bugs 20300 and 20361: Error occured during check of geometric coincidence.
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_FinderShapeOn2.hxx
1 //  Copyright (C) 2007-2008  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.
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 #ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile
23 #define _GEOMAlgo_FinderShapeOn2_HeaderFile
24
25 #ifndef _TopAbs_ShapeEnum_HeaderFile
26 #include <TopAbs_ShapeEnum.hxx>
27 #endif
28 #ifndef _GEOMAlgo_State_HeaderFile
29 #include <GEOMAlgo_State.hxx>
30 #endif
31 #ifndef _Standard_Integer_HeaderFile
32 #include <Standard_Integer.hxx>
33 #endif
34 #ifndef _Handle_GEOMAlgo_Clsf_HeaderFile
35 #include <Handle_GEOMAlgo_Clsf.hxx>
36 #endif
37 #ifndef _TopTools_ListOfShape_HeaderFile
38 #include <TopTools_ListOfShape.hxx>
39 #endif
40 #ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
41 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
42 #endif
43 #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
44 #include <GEOMAlgo_ShapeAlgo.hxx>
45 #endif
46 class GEOMAlgo_Clsf;
47 class TopTools_ListOfShape;
48 class TopoDS_Face;
49 class GEOMAlgo_ListOfPnt;
50 class TopoDS_Edge;
51 class GEOMAlgo_IndexedDataMapOfShapeState;
52
53
54 #ifndef _Standard_HeaderFile
55 #include <Standard.hxx>
56 #endif
57 #ifndef _Standard_Macro_HeaderFile
58 #include <Standard_Macro.hxx>
59 #endif
60
61
62 class GEOMAlgo_FinderShapeOn2  : public GEOMAlgo_ShapeAlgo {
63
64 public:
65
66     void* operator new(size_t,void* anAddress) 
67       {
68         return anAddress;
69       }
70     void* operator new(size_t size) 
71       { 
72         return Standard::Allocate(size); 
73       }
74     void  operator delete(void *anAddress) 
75       { 
76         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
77       }
78  // Methods PUBLIC
79  // 
80
81
82 Standard_EXPORT GEOMAlgo_FinderShapeOn2();
83 Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn2();
84
85
86 Standard_EXPORT   void SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) ;
87
88
89 Standard_EXPORT  const Handle_GEOMAlgo_Clsf& Clsf() const;
90
91
92 Standard_EXPORT   void SetShapeType(const TopAbs_ShapeEnum aST) ;
93
94
95 Standard_EXPORT   TopAbs_ShapeEnum ShapeType() const;
96
97
98 Standard_EXPORT   void SetState(const GEOMAlgo_State aSF) ;
99
100
101 Standard_EXPORT   GEOMAlgo_State State() const;
102
103
104 Standard_EXPORT   void SetNbPntsMin(const Standard_Integer aNb) ;
105
106
107 Standard_EXPORT   Standard_Integer NbPntsMin() const;
108
109
110 Standard_EXPORT   void SetNbPntsMax(const Standard_Integer aNb) ;
111
112
113 Standard_EXPORT   Standard_Integer NbPntsMax() const;
114
115
116 Standard_EXPORT virtual  void Perform() ;
117
118
119 Standard_EXPORT  const TopTools_ListOfShape& Shapes() const;
120
121
122 Standard_EXPORT  const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
123
124
125
126
127
128 protected:
129
130  // Methods PROTECTED
131  // 
132
133
134 Standard_EXPORT virtual  void CheckData() ;
135
136
137 Standard_EXPORT   void ProcessVertices() ;
138
139
140 Standard_EXPORT   void ProcessEdges() ;
141
142
143 Standard_EXPORT   void ProcessFaces() ;
144
145
146 Standard_EXPORT   void ProcessSolids() ;
147
148
149 Standard_EXPORT   void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
150
151
152 Standard_EXPORT   void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
153
154
155 Standard_EXPORT   void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
156
157
158  // Fields PROTECTED
159  //
160 TopAbs_ShapeEnum myShapeType;
161 GEOMAlgo_State myState;
162 Standard_Integer myNbPntsMin;
163 Standard_Integer myNbPntsMax;
164 Handle_GEOMAlgo_Clsf myClsf;
165 TopTools_ListOfShape myLS;
166 GEOMAlgo_IndexedDataMapOfShapeState myMSS;
167
168
169 private: 
170
171  // Methods PRIVATE
172  // 
173
174
175  // Fields PRIVATE
176  //
177
178
179 };
180
181
182
183
184
185 // other Inline functions and methods (like "C++: function call" methods)
186 //
187
188
189 #endif