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