Salome HOME
Fix Makefile.am
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_ShapeInfoFiller.hxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
21 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
22
23 #ifndef _TopoDS_Shape_HeaderFile
24 #include <TopoDS_Shape.hxx>
25 #endif
26 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
27 #include <GEOMAlgo_ShapeInfo.hxx>
28 #endif
29 #ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
30 #include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
31 #endif
32 #ifndef _Standard_Real_HeaderFile
33 #include <Standard_Real.hxx>
34 #endif
35 #ifndef _GEOMAlgo_Algo_HeaderFile
36 #include <GEOMAlgo_Algo.hxx>
37 #endif
38 class TopoDS_Shape;
39 class GEOMAlgo_ShapeInfo;
40 class TopoDS_Face;
41 class gp_Pln;
42 class gp_Sphere;
43 class gp_Cylinder;
44 class gp_Cone;
45 class gp_Torus;
46 class TopoDS_Solid;
47
48
49 #ifndef _Standard_HeaderFile
50 #include <Standard.hxx>
51 #endif
52 #ifndef _Standard_Macro_HeaderFile
53 #include <Standard_Macro.hxx>
54 #endif
55
56
57 class GEOMAlgo_ShapeInfoFiller  : public GEOMAlgo_Algo {
58
59 public:
60
61     void* operator new(size_t,void* anAddress) 
62       {
63         return anAddress;
64       }
65     void* operator new(size_t size) 
66       { 
67         return Standard::Allocate(size); 
68       }
69     void  operator delete(void *anAddress) 
70       { 
71         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
72       }
73  // Methods PUBLIC
74  // 
75
76
77 Standard_EXPORT GEOMAlgo_ShapeInfoFiller();
78 Standard_EXPORT virtual ~GEOMAlgo_ShapeInfoFiller();
79
80
81 Standard_EXPORT   void SetShape(const TopoDS_Shape& aS) ;
82
83
84 Standard_EXPORT  const TopoDS_Shape& Shape() const;
85
86
87 Standard_EXPORT   void SetTolerance(const Standard_Real aT) ;
88
89
90 Standard_EXPORT   Standard_Real Tolerance() const;
91
92
93 Standard_EXPORT  const GEOMAlgo_ShapeInfo& Info() const;
94
95
96 Standard_EXPORT  const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
97
98
99 Standard_EXPORT virtual  void Perform() ;
100
101
102
103
104
105 protected:
106
107  // Methods PROTECTED
108  // 
109
110
111 Standard_EXPORT virtual  void CheckData() ;
112
113
114 Standard_EXPORT   void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
115
116
117 Standard_EXPORT   void FillSubShapes(const TopoDS_Shape& aS) ;
118
119
120 Standard_EXPORT   void FillShape(const TopoDS_Shape& aS) ;
121
122
123 Standard_EXPORT   void FillVertex(const TopoDS_Shape& aS) ;
124
125
126 Standard_EXPORT   void FillEdge(const TopoDS_Shape& aS) ;
127
128
129 Standard_EXPORT   void FillFace(const TopoDS_Shape& aS) ;
130
131
132 Standard_EXPORT   void FillSolid(const TopoDS_Shape& aS) ;
133
134
135 Standard_EXPORT   void FillContainer(const TopoDS_Shape& aS) ;
136
137
138 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
139
140
141 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
142
143
144 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
145
146
147 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
148
149
150 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
151
152
153 Standard_EXPORT   void FillDetails(const TopoDS_Solid& aS) ;
154
155
156  // Fields PROTECTED
157  //
158 TopoDS_Shape myShape;
159 GEOMAlgo_ShapeInfo myEmptyInfo;
160 GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
161 Standard_Real myTolerance;
162
163
164 private: 
165
166  // Methods PRIVATE
167  // 
168
169
170  // Fields PRIVATE
171  //
172
173
174 };
175
176
177
178
179
180 // other Inline functions and methods (like "C++: function call" methods)
181 //
182
183
184 #endif