2 // Class : Ecriture d'un dump python
4 // Copyright (C) 2009-2016 CEA/DEN, EDF R&D
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef __DUMMY_CASCAD_
24 #define __DUMMY_CASCAD_
26 class BRepAdaptor_Curve;
27 class BRepAlgoAPI_Section;
28 class BRepBuilderAPI_MakeEdge;
29 class BRepBuilderAPI_MakeVertex;
30 class BRepBuilderAPI_Transform;
31 class BRepPrimAPI_MakeCylinder;
32 class BRepPrimAPI_MakeSphere;
37 class GeomAdaptor_Curve;
38 class GeomAPI_ProjectPointOnCurve;
40 class TopExp_Explorer;
41 class TopTools_IndexedMapOfShape;
43 class TopoDS_Compound;
45 class TopoDS_Iterator;
56 // -----------------------------------------------------------
57 #define Standard_True true
59 // Extrait de TopAbs_ShapeEnum.hxx
60 enum TopAbs_ShapeEnum {
61 TopAbs_COMPOUND, TopAbs_COMPSOLID, TopAbs_SOLID, TopAbs_SHELL,
62 TopAbs_FACE, TopAbs_WIRE, TopAbs_EDGE, TopAbs_VERTEX,
66 // -----------------------------------------------------------
71 gp_Pnt (double, double, double) {}
72 double X () { return 0; }
73 double Y () { return 0; }
74 double Z () { return 0; }
76 // -----------------------------------------------------------
80 gp_Vec (double, double, double) {}
82 // -----------------------------------------------------------
86 gp_Dir (int, int, int) {}
88 // -----------------------------------------------------------
92 gp_Ax2 (gp_Pnt&, gp_Vec&, gp_Vec&) {}
93 gp_Ax2 (gp_Pnt&, gp_Dir, gp_Dir) {}
95 // -----------------------------------------------------------
99 void SetTranslation (gp_Vec) {}
100 void SetValues (double, double, double, double,
101 double, double, double, double,
102 double, double, double, double,
104 gp_Trsf& operator* (gp_Trsf&) { return *this ; }
106 // -----------------------------------------------------------
107 class TopLoc_Location
110 TopLoc_Location () {}
111 TopLoc_Location (gp_Trsf&) {}
112 gp_Trsf Transformation() { return tra ; }
116 // -----------------------------------------------------------
120 TopLoc_Location Location () { return top_loc ; }
121 TopoDS_Shape Located (TopLoc_Location& top_loc) { return *this; }
122 int ShapeType () const { return 0 ; }
124 bool IsNull () const { return true ; }
125 TopoDS_Shape& operator=(const BRepBuilderAPI_MakeVertex&)
129 TopLoc_Location top_loc;
131 // -----------------------------------------------------------
135 gp_Circ (gp_Ax2&, double ) {}
137 // -----------------------------------------------------------
138 class GCPnts_AbscissaPoint
141 GCPnts_AbscissaPoint (BRepAdaptor_Curve&, double, double) {}
142 double Parameter () {return 1; }
143 static double Length (GeomAdaptor_Curve&, double&, double&) {return 1; }
144 gp_Pnt Value (double) { return point ; }
150 // -----------------------------------------------------------
151 class BRepAdaptor_Curve
154 BRepAdaptor_Curve (TopoDS_Edge&) {}
155 double FirstParameter () {return 1; }
156 gp_Pnt Value (double) { return point ; }
161 // -----------------------------------------------------------
162 class GeomAdaptor_Curve
165 GeomAdaptor_Curve (int) {}
166 int GetType () { return 0 ;}
168 // -----------------------------------------------------------
169 class BRepPrimAPI_MakeCylinder
172 BRepPrimAPI_MakeCylinder (gp_Ax2&, double, double) {}
174 bool IsDone () { return true; }
175 TopoDS_Shape Shape () { return forme ; }
180 // -----------------------------------------------------------
181 class BRepAlgoAPI_Section
184 BRepAlgoAPI_Section (TopoDS_Shape&, TopoDS_Shape&, bool) {}
186 bool IsDone () { return true; }
187 void Approximation (bool) { }
188 TopoDS_Shape Shape () { return forme ; }
193 // -----------------------------------------------------------
194 class TopoDS_Vertex {};
195 // -----------------------------------------------------------
196 class TopoDS_Edge {};
197 // -----------------------------------------------------------
201 static TopoDS_Edge Edge (const TopoDS_Shape&) { return edge ; }
202 static TopoDS_Vertex Vertex (const TopoDS_Shape&) { return vertex ; }
204 static TopoDS_Edge edge;
205 static TopoDS_Vertex vertex;
207 // -----------------------------------------------------------
211 static int Curve (TopoDS_Edge, double, double) { return 0 ; }
212 static int Curve (TopoDS_Edge, TopLoc_Location&, double, double) {return 0;}
213 static gp_Pnt Pnt(TopoDS_Vertex vertex ) { return point; }
218 // -----------------------------------------------------------
219 class GeomAPI_ProjectPointOnCurve
222 GeomAPI_ProjectPointOnCurve (gp_Pnt&, int) {};
223 int NbPoints () {return 0 ;};
224 double LowerDistanceParameter () {return 0 ;};
226 // -----------------------------------------------------------
227 class BRepBuilderAPI_MakeEdge
230 BRepBuilderAPI_MakeEdge (gp_Circ&) {}
231 TopoDS_Edge Edge () { return edge ; }
233 static TopoDS_Edge edge;
236 // -----------------------------------------------------------
240 void MakeCompound (TopoDS_Compound& ) {}
241 void Add (TopoDS_Compound&, TopoDS_Shape& ) {}
242 void Add (TopoDS_Compound&, TopoDS_Edge& ) {}
244 // -----------------------------------------------------------
248 static void Write (TopoDS_Edge&, ostringstream&) {}
249 static void Write (TopoDS_Shape&, ostringstream&) {}
250 static void Read (TopoDS_Shape&, istringstream&, BRep_Builder&) {}
251 static void Clean (TopoDS_Shape&) {}
253 // -----------------------------------------------------------
254 class BRepPrimAPI_MakeSphere
257 BRepPrimAPI_MakeSphere(gp_Ax2&, double&) {}
259 TopoDS_Shape Face () { return forme ; }
261 static TopoDS_Shape forme;
264 // -----------------------------------------------------------
265 class BRepBuilderAPI_Transform
268 BRepBuilderAPI_Transform (TopoDS_Shape&, gp_Trsf&, bool) {}
269 TopoDS_Shape Shape () { return forme ; }
276 // -----------------------------------------------------------
277 class TopExp_Explorer
280 TopExp_Explorer (TopoDS_Shape&, int) {}
281 bool More() { return false ; }
283 TopoDS_Shape& Current() { return forme ; }
287 // -----------------------------------------------------------
288 class TopoDS_Iterator
291 TopoDS_Iterator (const TopoDS_Shape&) {}
292 bool More() { return false ; }
294 TopoDS_Shape& Value() { return forme ; }
298 // -----------------------------------------------------------
299 class BRepBuilderAPI_MakeVertex
302 BRepBuilderAPI_MakeVertex (gp_Pnt&) {}
303 TopoDS_Shape& Shape() { return forme ; }
307 // -----------------------------------------------------------
308 class TopTools_IndexedMapOfShape
312 int Add (const TopoDS_Shape&) { return 0 ; }
313 const TopoDS_Shape& FindKey (int id) { return forme ; }
318 // -----------------------------------------------------------
319 class GC_MakeCircle {};
320 class Geom_Circle {};
321 class TopoDS_Compound : public TopoDS_Shape {};