1 // Created on: 1994-07-25
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <DrawTrSurf.hxx>
18 #include <GeomTools.hxx>
19 #include <GeomTools_SurfaceSet.hxx>
20 #include <GeomTools_CurveSet.hxx>
21 #include <GeomTools_Curve2dSet.hxx>
23 #include <gp_Pnt2d.hxx>
25 // method to call with dbx
28 void DrawTrSurf_Set(char* name, const Handle(Standard_Transient)& G)
30 Handle(Geom_Geometry) GG = Handle(Geom_Geometry)::DownCast(G);
32 DrawTrSurf::Set(name,GG);
35 Handle(Geom2d_Curve) GC = Handle(Geom2d_Curve)::DownCast(G);
37 DrawTrSurf::Set(name,GC);
41 cout << "*** Not a geometric object ***" << endl;
44 void DrawTrSurf_Get(const char* name, Handle(Standard_Transient)& G)
46 Handle(Geom_Geometry) GG = DrawTrSurf::Get(name);
47 cout << "Nom : " << name << endl;
53 Handle(Geom2d_Curve) GC = DrawTrSurf::GetCurve2d(name);
59 cout << "*** Not a geometric object ***" << endl;
62 void DrawTrSurf_Dump(const Handle(Standard_Transient)& G)
66 Handle(Geom_Surface) GS = Handle(Geom_Surface)::DownCast(G);
68 GeomTools_SurfaceSet::PrintSurface(GS,cout);
73 Handle(Geom_Curve) GC = Handle(Geom_Curve)::DownCast(G);
75 GeomTools_CurveSet::PrintCurve(GC,cout);
80 Handle(Geom2d_Curve) GC2d = Handle(Geom2d_Curve)::DownCast(G);
82 GeomTools_Curve2dSet::PrintCurve2d(GC2d,cout);
88 void DrawTrSurf_Set(char* name, const gp_Pnt& P)
90 cout<<"point "<<name<<" "<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<endl;
91 DrawTrSurf::Set(name,P);
94 void DrawTrSurf_Set(char* name, const gp_Pnt2d& P)
96 cout<<"point "<<name<<" "<<P.X()<<" "<<P.Y()<<endl;
97 DrawTrSurf::Set(name,P);