1 // Created on: 1993-03-24
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
23 #include <Geom2d_Conic.ixx>
24 #include <gp_Dir2d.hxx>
26 typedef Geom2d_Conic Conic;
27 typedef Handle(Geom2d_Conic) Handle(Conic);
30 typedef gp_Dir2d Dir2d;
31 typedef gp_Pnt2d Pnt2d;
32 typedef gp_Vec2d Vec2d;
39 //=======================================================================
42 //=======================================================================
44 void Geom2d_Conic::SetAxis(const gp_Ax22d& A)
49 //=======================================================================
52 //=======================================================================
54 void Geom2d_Conic::SetXAxis (const Ax2d& A)
59 //=======================================================================
62 //=======================================================================
64 void Geom2d_Conic::SetYAxis (const Ax2d& A)
69 //=======================================================================
70 //function : SetLocation
72 //=======================================================================
74 void Geom2d_Conic::SetLocation (const Pnt2d& P)
79 //=======================================================================
82 //=======================================================================
84 Ax2d Geom2d_Conic::XAxis () const
86 return gp_Ax2d(pos.Location(), pos.XDirection());
89 //=======================================================================
92 //=======================================================================
94 Ax2d Geom2d_Conic::YAxis () const
96 return gp_Ax2d(pos.Location(), pos.YDirection());
99 //=======================================================================
100 //function : Location
102 //=======================================================================
104 Pnt2d Geom2d_Conic::Location () const
106 return pos.Location();
109 //=======================================================================
110 //function : Position
112 //=======================================================================
114 const gp_Ax22d& Geom2d_Conic::Position () const
120 //=======================================================================
123 //=======================================================================
125 void Geom2d_Conic::Reverse () {
127 Dir2d Temp = pos.YDirection ();
129 pos.SetAxis(gp_Ax22d(pos.Location(), pos.XDirection(), Temp));
132 //=======================================================================
133 //function : Continuity
135 //=======================================================================
137 GeomAbs_Shape Geom2d_Conic::Continuity () const
142 //=======================================================================
145 //=======================================================================
147 Standard_Boolean Geom2d_Conic::IsCN (const Standard_Integer ) const
149 return Standard_True;