Salome HOME
Bug moteur + ajout cas test
[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 GeomAPI_ProjectPointOnCurve;\r
39 class Geom_Circle;\r
40 class TopExp_Explorer;\r
41 class TopTools_IndexedMapOfShape;\r
42 class TopoDS;\r
43 class TopoDS_Compound;\r
44 class TopoDS_Edge;\r
45 class TopoDS_Iterator;\r
46 class TopoDS_Vertex;\r
47 \r
48 class gp_Circ;\r
49 class gp_Dir;\r
50 class gp_Lin;\r
51 class gp_Pln;\r
52 class gp_Pnt;\r
53 class gp_Vec;\r
54 class gp_Ax2;\r
55 \r
56 // -----------------------------------------------------------\r
57 #define Standard_True true\r
58 #define Handle(x) int\r
59                         // Extrait de TopAbs_ShapeEnum.hxx \r
60 enum TopAbs_ShapeEnum {\r
61   TopAbs_COMPOUND, TopAbs_COMPSOLID, TopAbs_SOLID, TopAbs_SHELL,\r
62   TopAbs_FACE, TopAbs_WIRE, TopAbs_EDGE, TopAbs_VERTEX,\r
63   TopAbs_SHAPE\r
64 };\r
65 \r
66 // -----------------------------------------------------------\r
67 class gp_Pnt\r
68 {\r
69 public :\r
70 gp_Pnt ()              {}\r
71 gp_Pnt (double, double, double)              {}\r
72 double X () { return 0;   }\r
73 double Y () { return 0;   }\r
74 double Z () { return 0;   }\r
75 };\r
76 // -----------------------------------------------------------\r
77 class gp_Vec\r
78 {\r
79 public :\r
80 gp_Vec (double, double, double)              {}\r
81 };\r
82 // -----------------------------------------------------------\r
83 class gp_Dir\r
84 {\r
85 public :\r
86 gp_Dir (int, int, int)    {}\r
87 };\r
88 // -----------------------------------------------------------\r
89 class gp_Ax2\r
90 {\r
91 public :\r
92 gp_Ax2 (gp_Pnt&, gp_Vec&, gp_Vec&)              {}\r
93 gp_Ax2 (gp_Pnt&, gp_Dir, gp_Dir)    {}\r
94 };\r
95 // -----------------------------------------------------------\r
96 class gp_Trsf\r
97 {\r
98 public :\r
99 void SetTranslation (gp_Vec) {}\r
100 void SetValues (double, double, double, double,\r
101                 double, double, double, double,\r
102                 double, double, double, double,\r
103                 double, double) {}\r
104 gp_Trsf& operator* (gp_Trsf&) { return *this ; }\r
105 };\r
106 // -----------------------------------------------------------\r
107 class TopLoc_Location\r
108 {\r
109 public :\r
110 TopLoc_Location ()         {}\r
111 TopLoc_Location (gp_Trsf&) {}\r
112 gp_Trsf  Transformation() { return tra ; }\r
113 private :\r
114 gp_Trsf  tra;\r
115 };\r
116 // -----------------------------------------------------------\r
117 class TopoDS_Shape\r
118 {\r
119 public :\r
120    TopLoc_Location Location () { return top_loc ; }\r
121    TopoDS_Shape    Located (TopLoc_Location& top_loc) { return *this; }\r
122    int ShapeType () const    { return 0 ; }\r
123 \r
124    bool IsNull () const    { return true ; }\r
125    TopoDS_Shape& operator=(const BRepBuilderAPI_MakeVertex&)\r
126         {  return *this ; }\r
127 \r
128 private :\r
129    TopLoc_Location top_loc;\r
130 };\r
131 // -----------------------------------------------------------\r
132 class gp_Circ\r
133 {\r
134 public :\r
135 gp_Circ (gp_Ax2&, double )              {}\r
136 };\r
137 // -----------------------------------------------------------\r
138 class GCPnts_AbscissaPoint\r
139 {\r
140 public :\r
141 GCPnts_AbscissaPoint (BRepAdaptor_Curve&, double, double) {}\r
142 double Parameter ()                                       {return 1; }\r
143 static double Length (GeomAdaptor_Curve&, double&, double&)  {return 1; }\r
144 gp_Pnt Value (double)  { return point ; }\r
145 \r
146 private :\r
147 gp_Pnt point;\r
148 \r
149 };\r
150 // -----------------------------------------------------------\r
151 class BRepAdaptor_Curve\r
152 {\r
153 public :\r
154 BRepAdaptor_Curve (TopoDS_Edge&) {}\r
155 double FirstParameter ()                                  {return 1; }\r
156 gp_Pnt Value (double)  { return point ; }\r
157 \r
158 private :\r
159 gp_Pnt point;\r
160 };\r
161 // -----------------------------------------------------------\r
162 class GeomAdaptor_Curve\r
163 {\r
164 public :\r
165 GeomAdaptor_Curve (int)   {}\r
166 int GetType ()   { return 0 ;}\r
167 };\r
168 // -----------------------------------------------------------\r
169 class BRepPrimAPI_MakeCylinder\r
170 {\r
171 public :\r
172   BRepPrimAPI_MakeCylinder (gp_Ax2&, double, double) {}\r
173   void         Build ()   {  }\r
174   bool         IsDone ()  { return true; }\r
175   TopoDS_Shape Shape ()   { return forme ; }\r
176 \r
177 private :\r
178   TopoDS_Shape forme;\r
179 };\r
180 // -----------------------------------------------------------\r
181 class BRepAlgoAPI_Section\r
182 {\r
183 public :\r
184 BRepAlgoAPI_Section (TopoDS_Shape&, TopoDS_Shape&,  bool) {}\r
185   void         Build ()   {  }\r
186   bool         IsDone ()  { return true; }\r
187   void         Approximation (bool)  { }\r
188   TopoDS_Shape Shape ()   { return forme ; }\r
189 \r
190 private :\r
191   TopoDS_Shape forme;\r
192 };\r
193 // -----------------------------------------------------------\r
194 class TopoDS_Vertex {};\r
195 // -----------------------------------------------------------\r
196 class TopoDS_Edge {};\r
197 // -----------------------------------------------------------\r
198 class TopoDS\r
199 {\r
200 public :\r
201    static TopoDS_Edge    Edge   (const TopoDS_Shape&) { return edge ; }\r
202    static TopoDS_Vertex  Vertex (const TopoDS_Shape&) { return vertex ; }\r
203 private :\r
204   static TopoDS_Edge   edge;\r
205   static TopoDS_Vertex vertex;\r
206 };\r
207 // -----------------------------------------------------------\r
208 class BRep_Tool\r
209 {\r
210 public :\r
211    static int Curve (TopoDS_Edge, double, double) { return 0 ; }\r
212    static int Curve (TopoDS_Edge, TopLoc_Location&, double, double) {return 0;}\r
213    static gp_Pnt Pnt(TopoDS_Vertex vertex ) { return point; }\r
214 private :\r
215    static gp_Pnt  point;\r
216 \r
217 };\r
218 // -----------------------------------------------------------\r
219 class GeomAPI_ProjectPointOnCurve\r
220 {\r
221 public :\r
222 GeomAPI_ProjectPointOnCurve (gp_Pnt&, int) {};\r
223 int    NbPoints () {return 0 ;};\r
224 double LowerDistanceParameter () {return 0 ;};\r
225 };\r
226 // -----------------------------------------------------------\r
227 class BRepBuilderAPI_MakeEdge\r
228 {\r
229 public :\r
230 BRepBuilderAPI_MakeEdge (gp_Circ&)  {}\r
231 TopoDS_Edge  Edge () { return edge ; }\r
232 private :\r
233   static TopoDS_Edge edge;\r
234 \r
235 };\r
236 // -----------------------------------------------------------\r
237 class BRep_Builder\r
238 {\r
239 public :\r
240    void MakeCompound (TopoDS_Compound& ) {}\r
241    void Add (TopoDS_Compound&, TopoDS_Shape& ) {}\r
242    void Add (TopoDS_Compound&, TopoDS_Edge& ) {}\r
243 };\r
244 // -----------------------------------------------------------\r
245 class BRepTools\r
246 {\r
247 public :\r
248 static void Write (TopoDS_Edge&, ostringstream&) {}\r
249 static void Write (TopoDS_Shape&, ostringstream&) {}\r
250 static void Read  (TopoDS_Shape&, istringstream&, BRep_Builder&) {}\r
251 static void Clean  (TopoDS_Shape&) {}\r
252 };\r
253 // -----------------------------------------------------------\r
254 class BRepPrimAPI_MakeSphere\r
255 {\r
256 public :\r
257 BRepPrimAPI_MakeSphere(gp_Ax2&, double&) {}\r
258 void         Build ()   {  }\r
259 TopoDS_Shape  Face () { return forme ; }\r
260 private :\r
261   static TopoDS_Shape forme;\r
262 \r
263 };\r
264 // -----------------------------------------------------------\r
265 class BRepBuilderAPI_Transform\r
266 {\r
267 public :\r
268 BRepBuilderAPI_Transform (TopoDS_Shape&, gp_Trsf&, bool)  {}\r
269 TopoDS_Shape  Shape () { return forme ; }\r
270 \r
271 private :\r
272   TopoDS_Shape forme;\r
273 \r
274 };\r
275 \r
276 // -----------------------------------------------------------\r
277 class TopExp_Explorer\r
278 {\r
279 public :\r
280 TopExp_Explorer (TopoDS_Shape&, int)    {}\r
281 bool More()                             { return false ; }\r
282 void Next()                             {}\r
283 TopoDS_Shape& Current()                 { return forme ; }\r
284 private :\r
285   TopoDS_Shape forme;\r
286 };\r
287 // -----------------------------------------------------------\r
288 class TopoDS_Iterator\r
289 {\r
290 public :\r
291 TopoDS_Iterator (const TopoDS_Shape&)   {}\r
292 bool More()                             { return false ; }\r
293 void Next()                             {}\r
294 TopoDS_Shape& Value()                   { return forme ; }\r
295 private :\r
296   TopoDS_Shape forme;\r
297 };\r
298 // -----------------------------------------------------------\r
299 class BRepBuilderAPI_MakeVertex\r
300 {\r
301 public :\r
302 BRepBuilderAPI_MakeVertex (gp_Pnt&) {}\r
303 TopoDS_Shape& Shape()    { return forme ; }\r
304 private :\r
305   TopoDS_Shape forme;\r
306 };\r
307 // -----------------------------------------------------------\r
308 class TopTools_IndexedMapOfShape\r
309 {\r
310 public :\r
311 void Clear()                  {}\r
312 int Add (const TopoDS_Shape&)  { return 0 ; }\r
313 const TopoDS_Shape& FindKey (int id) { return forme ; }\r
314 \r
315 private :\r
316   TopoDS_Shape forme;\r
317 };\r
318 // -----------------------------------------------------------\r
319 class GC_MakeCircle {};\r
320 class Geom_Circle {};\r
321 class TopoDS_Compound : public TopoDS_Shape {};\r
322 class gp_Lin {};\r
323 class gp_Pln {};\r
324 #endif\r