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.
18 #include <Geom2d_Conic.hxx>
19 #include <gp_Ax2d.hxx>
20 #include <gp_Ax22d.hxx>
21 #include <gp_Dir2d.hxx>
22 #include <gp_Pnt2d.hxx>
23 #include <Standard_ConstructionError.hxx>
24 #include <Standard_DomainError.hxx>
25 #include <Standard_Type.hxx>
27 typedef Geom2d_Conic Conic;
30 typedef gp_Dir2d Dir2d;
31 typedef gp_Pnt2d Pnt2d;
32 typedef gp_Vec2d Vec2d;
34 //=======================================================================
37 //=======================================================================
39 void Geom2d_Conic::SetAxis(const gp_Ax22d& A)
44 //=======================================================================
47 //=======================================================================
49 void Geom2d_Conic::SetXAxis (const Ax2d& A)
54 //=======================================================================
57 //=======================================================================
59 void Geom2d_Conic::SetYAxis (const Ax2d& A)
64 //=======================================================================
65 //function : SetLocation
67 //=======================================================================
69 void Geom2d_Conic::SetLocation (const Pnt2d& P)
74 //=======================================================================
77 //=======================================================================
79 Ax2d Geom2d_Conic::XAxis () const
81 return gp_Ax2d(pos.Location(), pos.XDirection());
84 //=======================================================================
87 //=======================================================================
89 Ax2d Geom2d_Conic::YAxis () const
91 return gp_Ax2d(pos.Location(), pos.YDirection());
94 //=======================================================================
97 //=======================================================================
99 Pnt2d Geom2d_Conic::Location () const
101 return pos.Location();
104 //=======================================================================
105 //function : Position
107 //=======================================================================
109 const gp_Ax22d& Geom2d_Conic::Position () const
115 //=======================================================================
118 //=======================================================================
120 void Geom2d_Conic::Reverse () {
122 Dir2d Temp = pos.YDirection ();
124 pos.SetAxis(gp_Ax22d(pos.Location(), pos.XDirection(), Temp));
127 //=======================================================================
128 //function : Continuity
130 //=======================================================================
132 GeomAbs_Shape Geom2d_Conic::Continuity () const
137 //=======================================================================
140 //=======================================================================
142 Standard_Boolean Geom2d_Conic::IsCN (const Standard_Integer ) const
144 return Standard_True;