1 // Created on: 1993-03-24
3 // Copyright (c) 1993-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 <Geom2d_Conic.ixx>
18 #include <gp_Dir2d.hxx>
20 typedef Geom2d_Conic Conic;
21 typedef Handle(Geom2d_Conic) Handle(Conic);
24 typedef gp_Dir2d Dir2d;
25 typedef gp_Pnt2d Pnt2d;
26 typedef gp_Vec2d Vec2d;
33 //=======================================================================
36 //=======================================================================
38 void Geom2d_Conic::SetAxis(const gp_Ax22d& A)
43 //=======================================================================
46 //=======================================================================
48 void Geom2d_Conic::SetXAxis (const Ax2d& A)
53 //=======================================================================
56 //=======================================================================
58 void Geom2d_Conic::SetYAxis (const Ax2d& A)
63 //=======================================================================
64 //function : SetLocation
66 //=======================================================================
68 void Geom2d_Conic::SetLocation (const Pnt2d& P)
73 //=======================================================================
76 //=======================================================================
78 Ax2d Geom2d_Conic::XAxis () const
80 return gp_Ax2d(pos.Location(), pos.XDirection());
83 //=======================================================================
86 //=======================================================================
88 Ax2d Geom2d_Conic::YAxis () const
90 return gp_Ax2d(pos.Location(), pos.YDirection());
93 //=======================================================================
96 //=======================================================================
98 Pnt2d Geom2d_Conic::Location () const
100 return pos.Location();
103 //=======================================================================
104 //function : Position
106 //=======================================================================
108 const gp_Ax22d& Geom2d_Conic::Position () const
114 //=======================================================================
117 //=======================================================================
119 void Geom2d_Conic::Reverse () {
121 Dir2d Temp = pos.YDirection ();
123 pos.SetAxis(gp_Ax22d(pos.Location(), pos.XDirection(), Temp));
126 //=======================================================================
127 //function : Continuity
129 //=======================================================================
131 GeomAbs_Shape Geom2d_Conic::Continuity () const
136 //=======================================================================
139 //=======================================================================
141 Standard_Boolean Geom2d_Conic::IsCN (const Standard_Integer ) const
143 return Standard_True;