2 // Class : Ecriture d'un dump python
\r
4 // Copyright (C) 2009-2013 CEA/DEN, EDF R&D
\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
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
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
20 // See http://www.salome-platform.org/
\r
21 // or email : webmaster.salome@opencascade.com
\r
23 #ifndef __DUMMY_CASCAD_
\r
24 #define __DUMMY_CASCAD_
\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
36 class GC_MakeCircle;
\r
37 class GeomAdaptor_Curve;
\r
38 class GeomAPI_ProjectPointOnCurve;
\r
40 class TopExp_Explorer;
\r
41 class TopTools_IndexedMapOfShape;
\r
43 class TopoDS_Compound;
\r
45 class TopoDS_Iterator;
\r
46 class TopoDS_Vertex;
\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
66 // -----------------------------------------------------------
\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
76 // -----------------------------------------------------------
\r
80 gp_Vec (double, double, double) {}
\r
82 // -----------------------------------------------------------
\r
86 gp_Dir (int, int, int) {}
\r
88 // -----------------------------------------------------------
\r
92 gp_Ax2 (gp_Pnt&, gp_Vec&, gp_Vec&) {}
\r
93 gp_Ax2 (gp_Pnt&, gp_Dir, gp_Dir) {}
\r
95 // -----------------------------------------------------------
\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
104 gp_Trsf& operator* (gp_Trsf&) { return *this ; }
\r
106 // -----------------------------------------------------------
\r
107 class TopLoc_Location
\r
110 TopLoc_Location () {}
\r
111 TopLoc_Location (gp_Trsf&) {}
\r
112 gp_Trsf Transformation() { return tra ; }
\r
116 // -----------------------------------------------------------
\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
124 bool IsNull () const { return true ; }
\r
125 TopoDS_Shape& operator=(const BRepBuilderAPI_MakeVertex&)
\r
129 TopLoc_Location top_loc;
\r
131 // -----------------------------------------------------------
\r
135 gp_Circ (gp_Ax2&, double ) {}
\r
137 // -----------------------------------------------------------
\r
138 class GCPnts_AbscissaPoint
\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
150 // -----------------------------------------------------------
\r
151 class BRepAdaptor_Curve
\r
154 BRepAdaptor_Curve (TopoDS_Edge&) {}
\r
155 double FirstParameter () {return 1; }
\r
156 gp_Pnt Value (double) { return point ; }
\r
161 // -----------------------------------------------------------
\r
162 class GeomAdaptor_Curve
\r
165 GeomAdaptor_Curve (int) {}
\r
166 int GetType () { return 0 ;}
\r
168 // -----------------------------------------------------------
\r
169 class BRepPrimAPI_MakeCylinder
\r
172 BRepPrimAPI_MakeCylinder (gp_Ax2&, double, double) {}
\r
174 bool IsDone () { return true; }
\r
175 TopoDS_Shape Shape () { return forme ; }
\r
178 TopoDS_Shape forme;
\r
180 // -----------------------------------------------------------
\r
181 class BRepAlgoAPI_Section
\r
184 BRepAlgoAPI_Section (TopoDS_Shape&, TopoDS_Shape&, bool) {}
\r
186 bool IsDone () { return true; }
\r
187 void Approximation (bool) { }
\r
188 TopoDS_Shape Shape () { return forme ; }
\r
191 TopoDS_Shape forme;
\r
193 // -----------------------------------------------------------
\r
194 class TopoDS_Vertex {};
\r
195 // -----------------------------------------------------------
\r
196 class TopoDS_Edge {};
\r
197 // -----------------------------------------------------------
\r
201 static TopoDS_Edge Edge (const TopoDS_Shape&) { return edge ; }
\r
202 static TopoDS_Vertex Vertex (const TopoDS_Shape&) { return vertex ; }
\r
204 static TopoDS_Edge edge;
\r
205 static TopoDS_Vertex vertex;
\r
207 // -----------------------------------------------------------
\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
215 static gp_Pnt point;
\r
218 // -----------------------------------------------------------
\r
219 class GeomAPI_ProjectPointOnCurve
\r
222 GeomAPI_ProjectPointOnCurve (gp_Pnt&, int) {};
\r
223 int NbPoints () {return 0 ;};
\r
224 double LowerDistanceParameter () {return 0 ;};
\r
226 // -----------------------------------------------------------
\r
227 class BRepBuilderAPI_MakeEdge
\r
230 BRepBuilderAPI_MakeEdge (gp_Circ&) {}
\r
231 TopoDS_Edge Edge () { return edge ; }
\r
233 static TopoDS_Edge edge;
\r
236 // -----------------------------------------------------------
\r
240 void MakeCompound (TopoDS_Compound& ) {}
\r
241 void Add (TopoDS_Compound&, TopoDS_Shape& ) {}
\r
242 void Add (TopoDS_Compound&, TopoDS_Edge& ) {}
\r
244 // -----------------------------------------------------------
\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
253 // -----------------------------------------------------------
\r
254 class BRepPrimAPI_MakeSphere
\r
257 BRepPrimAPI_MakeSphere(gp_Ax2&, double&) {}
\r
259 TopoDS_Shape Face () { return forme ; }
\r
261 static TopoDS_Shape forme;
\r
264 // -----------------------------------------------------------
\r
265 class BRepBuilderAPI_Transform
\r
268 BRepBuilderAPI_Transform (TopoDS_Shape&, gp_Trsf&, bool) {}
\r
269 TopoDS_Shape Shape () { return forme ; }
\r
272 TopoDS_Shape forme;
\r
276 // -----------------------------------------------------------
\r
277 class TopExp_Explorer
\r
280 TopExp_Explorer (TopoDS_Shape&, int) {}
\r
281 bool More() { return false ; }
\r
283 TopoDS_Shape& Current() { return forme ; }
\r
285 TopoDS_Shape forme;
\r
287 // -----------------------------------------------------------
\r
288 class TopoDS_Iterator
\r
291 TopoDS_Iterator (const TopoDS_Shape&) {}
\r
292 bool More() { return false ; }
\r
294 TopoDS_Shape& Value() { return forme ; }
\r
296 TopoDS_Shape forme;
\r
298 // -----------------------------------------------------------
\r
299 class BRepBuilderAPI_MakeVertex
\r
302 BRepBuilderAPI_MakeVertex (gp_Pnt&) {}
\r
303 TopoDS_Shape& Shape() { return forme ; }
\r
305 TopoDS_Shape forme;
\r
307 // -----------------------------------------------------------
\r
308 class TopTools_IndexedMapOfShape
\r
312 int Add (const TopoDS_Shape&) { return 0 ; }
\r
313 const TopoDS_Shape& FindKey (int id) { return forme ; }
\r
316 TopoDS_Shape forme;
\r
318 // -----------------------------------------------------------
\r
319 class GC_MakeCircle {};
\r
320 class Geom_Circle {};
\r
321 class TopoDS_Compound : public TopoDS_Shape {};
\r