Salome HOME
NPAL18111: Bad shape build by partition.
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_FinderShapeOn.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_FinderShapeOn_HeaderFile
21 #define _GEOMAlgo_FinderShapeOn_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 _TopoDS_Shape_HeaderFile
33 #include <TopoDS_Shape.hxx>
34 #endif
35 #ifndef _TopTools_ListOfShape_HeaderFile
36 #include <TopTools_ListOfShape.hxx>
37 #endif
38 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
39 #include <TopTools_DataMapOfShapeShape.hxx>
40 #endif
41 #ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
42 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
43 #endif
44 #ifndef _Standard_Boolean_HeaderFile
45 #include <Standard_Boolean.hxx>
46 #endif
47 #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
48 #include <GEOMAlgo_ShapeAlgo.hxx>
49 #endif
50 class Geom_Surface;
51 class TopTools_ListOfShape;
52 class TopoDS_Shape;
53 class TopTools_DataMapOfShapeShape;
54
55
56 #ifndef _Standard_HeaderFile
57 #include <Standard.hxx>
58 #endif
59 #ifndef _Standard_Macro_HeaderFile
60 #include <Standard_Macro.hxx>
61 #endif
62
63
64 class GEOMAlgo_FinderShapeOn  : public GEOMAlgo_ShapeAlgo {
65
66 public:
67
68     void* operator new(size_t,void* anAddress) 
69       {
70         return anAddress;
71       }
72     void* operator new(size_t size) 
73       { 
74         return Standard::Allocate(size); 
75       }
76     void  operator delete(void *anAddress) 
77       { 
78         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
79       }
80  // Methods PUBLIC
81  // 
82
83
84 Standard_EXPORT GEOMAlgo_FinderShapeOn();
85 Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn();
86
87
88 Standard_EXPORT virtual  void Perform() ;
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  const Handle_Geom_Surface& Surface() const;
101
102
103 Standard_EXPORT   TopAbs_ShapeEnum ShapeType() const;
104
105
106 Standard_EXPORT   GEOMAlgo_State State() const;
107
108
109 Standard_EXPORT  const TopTools_ListOfShape& Shapes() const;
110
111
112 Standard_EXPORT static  void CopySource(const TopoDS_Shape& aS,TopTools_DataMapOfShapeShape& aImages,TopTools_DataMapOfShapeShape& aOriginals,TopoDS_Shape& aSC) ;
113
114 Standard_EXPORT static  bool BuildTriangulation (const TopoDS_Shape& theShape);
115
116 protected:
117
118  // Methods PROTECTED
119  // 
120
121
122 Standard_EXPORT virtual  void CheckData() ;
123
124
125 Standard_EXPORT   void MakeArgument1() ;
126
127
128 Standard_EXPORT   void MakeArgument2() ;
129
130
131 Standard_EXPORT   void Find() ;
132
133
134 Standard_EXPORT   void Find(const TopoDS_Shape& aS) ;
135
136
137 Standard_EXPORT   void FindVertices() ;
138
139
140  // Fields PROTECTED
141  //
142 Handle_Geom_Surface mySurface;
143 TopAbs_ShapeEnum myShapeType;
144 GEOMAlgo_State myState;
145 TopoDS_Shape myArg1;
146 TopoDS_Shape myArg2;
147 TopTools_ListOfShape myLS;
148 TopTools_DataMapOfShapeShape myImages;
149 GEOMAlgo_IndexedDataMapOfShapeState myMSS;
150 Standard_Boolean myIsAnalytic;
151
152
153 private: 
154
155  // Methods PRIVATE
156  // 
157
158
159  // Fields PRIVATE
160  //
161
162
163 };
164
165
166
167
168
169 // other Inline functions and methods (like "C++: function call" methods)
170 //
171
172
173 #endif