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