Salome HOME
0ff5764e8d058afdf06fc128b75a08da87a64c31
[modules/hexablock.git] / src / HEXABLOCK / HexDummyCad.hxx
1 \r
2 // Class : Ecriture d'un dump python\r
3 \r
4 // Copyright (C) 2009-2013  CEA/DEN, EDF R&D\r
5 //\r
6 // This library is free software; you can redistribute it and/or\r
7 // modify it under the terms of the GNU Lesser General Public\r
8 // License as published by the Free Software Foundation; either\r
9 // version 2.1 of the License.\r
10 //\r
11 // This library is distributed in the hope that it will be useful,\r
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
14 // Lesser General Public License for more details.\r
15 //\r
16 // You should have received a copy of the GNU Lesser General Public\r
17 // License along with this library; if not, write to the Free Software\r
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
19 //\r
20 // See http://www.salome-platform.org/\r
21 // or email : webmaster.salome@opencascade.com\r
22 \r
23 #ifndef __DUMMY_CASCAD_\r
24 #define __DUMMY_CASCAD_\r
25 \r
26 class BRepAdaptor_Curve;\r
27 class BRepAlgoAPI_Section;\r
28 class BRepBuilderAPI_MakeEdge;\r
29 class BRepBuilderAPI_MakeVertex;\r
30 class BRepBuilderAPI_Transform;\r
31 class BRepPrimAPI_MakeCylinder;\r
32 class BRepPrimAPI_MakeSphere;\r
33 class BRepTools;\r
34 class BRep_Builder;\r
35 class BRep_Tool;\r
36 class GC_MakeCircle;\r
37 class GeomAdaptor_Curve;\r
38 class GEOMImpl_CircleDriver;\r
39 class GEOMImpl_CylinderDriver;\r
40 class GEOMImpl_ICircle;\r
41 class GEOMImpl_ICylinder;\r
42 class GeomAPI_ProjectPointOnCurve;\r
43 class Geom_Circle;\r
44 class TopExp_Explorer;\r
45 class TopTools_IndexedMapOfShape;\r
46 class TopoDS;\r
47 class TopoDS_Compound;\r
48 class TopoDS_Edge;\r
49 class TopoDS_Iterator;\r
50 class TopoDS_Vertex;\r
51 \r
52 class gp_Circ;\r
53 class gp_Dir;\r
54 class gp_Lin;\r
55 class gp_Pln;\r
56 class gp_Pnt;\r
57 class gp_Vec;\r
58 class gp_Ax2;\r
59 \r
60 // -----------------------------------------------------------\r
61 #define Standard_True true\r
62 #define Handle(x) int\r
63 enum {TopAbs_VERTEX,  TopAbs_EDGE,  TopAbs_FACE };\r
64 // -----------------------------------------------------------\r
65 class gp_Pnt\r
66 {\r
67 public :\r
68 gp_Pnt ()              {}\r
69 gp_Pnt (double, double, double)              {}\r
70 double X () { return 0;   }\r
71 double Y () { return 0;   }\r
72 double Z () { return 0;   }\r
73 };\r
74 // -----------------------------------------------------------\r
75 class gp_Vec\r
76 {\r
77 public :\r
78 gp_Vec (double, double, double)              {}\r
79 };\r
80 // -----------------------------------------------------------\r
81 class gp_Dir\r
82 {\r
83 public :\r
84 gp_Dir (int, int, int)    {}\r
85 };\r
86 // -----------------------------------------------------------\r
87 class gp_Ax2\r
88 {\r
89 public :\r
90 gp_Ax2 (gp_Pnt&, gp_Vec&, gp_Vec&)              {}\r
91 gp_Ax2 (gp_Pnt&, gp_Dir, gp_Dir)    {}\r
92 };\r
93 // -----------------------------------------------------------\r
94 class gp_Trsf\r
95 {\r
96 public :\r
97 void SetTranslation (gp_Vec) {}\r
98 void SetValues (double, double, double, double,\r
99                 double, double, double, double,\r
100                 double, double, double, double,\r
101                 double, double) {}\r
102 gp_Trsf& operator* (gp_Trsf&) { return *this ; }\r
103 };\r
104 // -----------------------------------------------------------\r
105 class TopLoc_Location\r
106 {\r
107 public :\r
108 TopLoc_Location ()         {}\r
109 TopLoc_Location (gp_Trsf&) {}\r
110 gp_Trsf  Transformation() { return tra ; }\r
111 private :\r
112 gp_Trsf  tra;\r
113 };\r
114 // -----------------------------------------------------------\r
115 class TopoDS_Shape\r
116 {\r
117 public :\r
118    TopLoc_Location Location () { return top_loc ; }\r
119    TopoDS_Shape    Located (TopLoc_Location& top_loc) { return *this; }\r
120    int ShapeType () const    { return 0 ; }\r
121 \r
122    bool IsNull () const    { return true ; }\r
123    TopoDS_Shape& operator=(const BRepBuilderAPI_MakeVertex&)\r
124         {  return *this ; }\r
125 \r
126 private :\r
127    TopLoc_Location top_loc;\r
128 };\r
129 // -----------------------------------------------------------\r
130 class gp_Circ\r
131 {\r
132 public :\r
133 gp_Circ (gp_Ax2&, double )              {}\r
134 };\r
135 // -----------------------------------------------------------\r
136 class GCPnts_AbscissaPoint\r
137 {\r
138 public :\r
139 GCPnts_AbscissaPoint (BRepAdaptor_Curve&, double, double) {}\r
140 double Parameter ()                                       {return 1; }\r
141 static double Length (GeomAdaptor_Curve&, double&, double&)  {return 1; }\r
142 gp_Pnt Value (double)  { return point ; }\r
143 \r
144 private :\r
145 gp_Pnt point;\r
146 \r
147 };\r
148 // -----------------------------------------------------------\r
149 class BRepAdaptor_Curve\r
150 {\r
151 public :\r
152 BRepAdaptor_Curve (TopoDS_Edge&) {}\r
153 double FirstParameter ()                                  {return 1; }\r
154 gp_Pnt Value (double)  { return point ; }\r
155 \r
156 private :\r
157 gp_Pnt point;\r
158 };\r
159 // -----------------------------------------------------------\r
160 class GeomAdaptor_Curve\r
161 {\r
162 public :\r
163 GeomAdaptor_Curve (int)   {}\r
164 };\r
165 // -----------------------------------------------------------\r
166 class BRepPrimAPI_MakeCylinder\r
167 {\r
168 public :\r
169   BRepPrimAPI_MakeCylinder (gp_Ax2&, double, double) {}\r
170   void         Build ()   {  }\r
171   bool         IsDone ()  { return true; }\r
172   TopoDS_Shape Shape ()   { return forme ; }\r
173 \r
174 private :\r
175   TopoDS_Shape forme;\r
176 };\r
177 // -----------------------------------------------------------\r
178 class BRepAlgoAPI_Section\r
179 {\r
180 public :\r
181 BRepAlgoAPI_Section (TopoDS_Shape&, TopoDS_Shape&,  bool) {}\r
182   void         Build ()   {  }\r
183   bool         IsDone ()  { return true; }\r
184   void         Approximation (bool)  { }\r
185   TopoDS_Shape Shape ()   { return forme ; }\r
186 \r
187 private :\r
188   TopoDS_Shape forme;\r
189 };\r
190 // -----------------------------------------------------------\r
191 class TopoDS_Vertex {};\r
192 // -----------------------------------------------------------\r
193 class TopoDS_Edge {};\r
194 // -----------------------------------------------------------\r
195 class TopoDS\r
196 {\r
197 public :\r
198    static TopoDS_Edge    Edge   (const TopoDS_Shape&) { return edge ; }\r
199    static TopoDS_Vertex  Vertex (const TopoDS_Shape&) { return vertex ; }\r
200 private :\r
201   static TopoDS_Edge   edge;\r
202   static TopoDS_Vertex vertex;\r
203 };\r
204 // -----------------------------------------------------------\r
205 class BRep_Tool\r
206 {\r
207 public :\r
208    static int Curve (TopoDS_Edge, double, double) { return 0 ; }\r
209    static int Curve (TopoDS_Edge, TopLoc_Location&, double, double) {return 0;}\r
210    static gp_Pnt Pnt(TopoDS_Vertex vertex ) { return point; }\r
211 private :\r
212    static gp_Pnt  point;\r
213 \r
214 };\r
215 // -----------------------------------------------------------\r
216 class GeomAPI_ProjectPointOnCurve\r
217 {\r
218 public :\r
219 GeomAPI_ProjectPointOnCurve (gp_Pnt&, int) {};\r
220 int    NbPoints () {return 0 ;};\r
221 double LowerDistanceParameter () {return 0 ;};\r
222 };\r
223 // -----------------------------------------------------------\r
224 class BRepBuilderAPI_MakeEdge\r
225 {\r
226 public :\r
227 BRepBuilderAPI_MakeEdge (gp_Circ&)  {}\r
228 TopoDS_Edge  Edge () { return edge ; }\r
229 private :\r
230   static TopoDS_Edge edge;\r
231 \r
232 };\r
233 // -----------------------------------------------------------\r
234 class BRep_Builder\r
235 {\r
236 public :\r
237    void MakeCompound (TopoDS_Compound& ) {}\r
238    void Add (TopoDS_Compound&, TopoDS_Shape& ) {}\r
239    void Add (TopoDS_Compound&, TopoDS_Edge& ) {}\r
240 };\r
241 // -----------------------------------------------------------\r
242 class BRepTools\r
243 {\r
244 public :\r
245 static void Write (TopoDS_Edge&, ostringstream&) {}\r
246 static void Write (TopoDS_Shape&, ostringstream&) {}\r
247 static void Read  (TopoDS_Shape&, istringstream&, BRep_Builder&) {}\r
248 static void Clean  (TopoDS_Shape&) {}\r
249 };\r
250 // -----------------------------------------------------------\r
251 class BRepPrimAPI_MakeSphere\r
252 {\r
253 public :\r
254 BRepPrimAPI_MakeSphere(gp_Ax2&, double&) {}\r
255 void         Build ()   {  }\r
256 TopoDS_Shape  Face () { return forme ; }\r
257 private :\r
258   static TopoDS_Shape forme;\r
259 \r
260 };\r
261 // -----------------------------------------------------------\r
262 class BRepBuilderAPI_Transform\r
263 {\r
264 public :\r
265 BRepBuilderAPI_Transform (TopoDS_Shape&, gp_Trsf&, bool)  {}\r
266 TopoDS_Shape  Shape () { return forme ; }\r
267 \r
268 private :\r
269   TopoDS_Shape forme;\r
270 \r
271 };\r
272 \r
273 // -----------------------------------------------------------\r
274 class TopExp_Explorer\r
275 {\r
276 public :\r
277 TopExp_Explorer (TopoDS_Shape&, int)    {}\r
278 bool More()                             { return false ; }\r
279 void Next()                             {}\r
280 TopoDS_Shape& Current()                 { return forme ; }\r
281 private :\r
282   TopoDS_Shape forme;\r
283 };\r
284 // -----------------------------------------------------------\r
285 class TopoDS_Iterator\r
286 {\r
287 public :\r
288 TopoDS_Iterator (const TopoDS_Shape&)   {}\r
289 bool More()                             { return false ; }\r
290 void Next()                             {}\r
291 TopoDS_Shape& Value()                   { return forme ; }\r
292 private :\r
293   TopoDS_Shape forme;\r
294 };\r
295 // -----------------------------------------------------------\r
296 class BRepBuilderAPI_MakeVertex\r
297 {\r
298 public :\r
299 BRepBuilderAPI_MakeVertex (gp_Pnt&) {}\r
300 TopoDS_Shape& Shape()    { return forme ; }\r
301 private :\r
302   TopoDS_Shape forme;\r
303 };\r
304 // -----------------------------------------------------------\r
305 class TopTools_IndexedMapOfShape\r
306 {\r
307 public :\r
308 void Clear()                  {}\r
309 int Add (const TopoDS_Shape&)  { return 0 ; }\r
310 const TopoDS_Shape& FindKey (int id) { return forme ; }\r
311 \r
312 private :\r
313   TopoDS_Shape forme;\r
314 };\r
315 // -----------------------------------------------------------\r
316 class GC_MakeCircle {};\r
317 class GEOMImpl_CircleDriver {};\r
318 class GEOMImpl_CylinderDriver {};\r
319 class GEOMImpl_ICircle {};\r
320 class GEOMImpl_ICylinder {};\r
321 class Geom_Circle {};\r
322 class TopoDS_Compound : public TopoDS_Shape {};\r
323 class gp_Lin {};\r
324 class gp_Pln {};\r
325 #endif\r