Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_FinderShapeOn1.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 //
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
8 //
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19
20 #ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
21 #define _GEOMAlgo_FinderShapeOn1_HeaderFile
22
23 #ifndef _Handle_Geom_Surface_HeaderFile
24 #include <Handle_Geom_Surface.hxx>
25 #endif
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 _GeomAdaptor_Surface_HeaderFile
36 #include <GeomAdaptor_Surface.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 #ifndef _TopAbs_State_HeaderFile
48 #include <TopAbs_State.hxx>
49 #endif
50 class Geom_Surface;
51 class TopTools_ListOfShape;
52 class TopoDS_Face;
53 class GEOMAlgo_ListOfPnt;
54 class TopoDS_Edge;
55 class GEOMAlgo_IndexedDataMapOfShapeState;
56 class gp_Pnt;
57
58
59 #ifndef _Standard_HeaderFile
60 #include <Standard.hxx>
61 #endif
62 #ifndef _Standard_Macro_HeaderFile
63 #include <Standard_Macro.hxx>
64 #endif
65
66
67 class GEOMAlgo_FinderShapeOn1  : public GEOMAlgo_ShapeAlgo {
68
69 public:
70
71     void* operator new(size_t,void* anAddress) 
72       {
73         return anAddress;
74       }
75     void* operator new(size_t size) 
76       { 
77         return Standard::Allocate(size); 
78       }
79     void  operator delete(void *anAddress) 
80       { 
81         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
82       }
83  // Methods PUBLIC
84  // 
85
86
87 Standard_EXPORT GEOMAlgo_FinderShapeOn1();
88 Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();
89
90
91 Standard_EXPORT   void SetSurface(const Handle(Geom_Surface)& aS) ;
92
93
94 Standard_EXPORT   void SetShapeType(const TopAbs_ShapeEnum aST) ;
95
96
97 Standard_EXPORT   void SetState(const GEOMAlgo_State aSF) ;
98
99
100 Standard_EXPORT   void SetNbPntsMin(const Standard_Integer aNb) ;
101
102
103 Standard_EXPORT   Standard_Integer NbPntsMin() const;
104
105
106 Standard_EXPORT   void SetNbPntsMax(const Standard_Integer aNb) ;
107
108
109 Standard_EXPORT   Standard_Integer NbPntsMax() const;
110
111
112 Standard_EXPORT  const Handle_Geom_Surface& Surface() const;
113
114
115 Standard_EXPORT   TopAbs_ShapeEnum ShapeType() const;
116
117
118 Standard_EXPORT   GEOMAlgo_State State() const;
119
120
121 Standard_EXPORT virtual  void Perform() ;
122
123
124 Standard_EXPORT  const TopTools_ListOfShape& Shapes() const;
125
126
127 Standard_EXPORT  const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
128
129
130
131
132
133 protected:
134
135  // Methods PROTECTED
136  // 
137
138
139 Standard_EXPORT virtual  void CheckData() ;
140
141
142 Standard_EXPORT   void ProcessVertices() ;
143
144
145 Standard_EXPORT   void ProcessEdges() ;
146
147
148 Standard_EXPORT   void ProcessFaces() ;
149
150
151 Standard_EXPORT   void ProcessSolids() ;
152
153
154 Standard_EXPORT   void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
155
156
157 Standard_EXPORT   void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
158
159
160 Standard_EXPORT   void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
161
162
163 Standard_EXPORT virtual  TopAbs_State GetPointState(const gp_Pnt& aP) ;
164
165
166  // Fields PROTECTED
167  //
168 Handle_Geom_Surface mySurface;
169 TopAbs_ShapeEnum myShapeType;
170 GEOMAlgo_State myState;
171 Standard_Integer myNbPntsMin;
172 Standard_Integer myNbPntsMax;
173 GeomAdaptor_Surface myGAS;
174 TopTools_ListOfShape myLS;
175 GEOMAlgo_IndexedDataMapOfShapeState myMSS;
176
177
178 private: 
179
180  // Methods PRIVATE
181  // 
182
183
184  // Fields PRIVATE
185  //
186
187
188 };
189
190
191
192
193
194 // other Inline functions and methods (like "C++: function call" methods)
195 //
196
197
198 #endif