0024682: Move out B-spline cache from curves and surfaces to dedicated classes BSplCL...
[occt.git] / src / Geom2d / Geom2d_Conic.cxx
1 // Created on: 1993-03-24
2 // Created by: JCV
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <Geom2d_Conic.ixx>
18 #include <gp_Dir2d.hxx>
19
20 typedef Geom2d_Conic         Conic;
21 typedef Handle(Geom2d_Conic) Handle(Conic);
22
23 typedef gp_Ax2d  Ax2d;
24 typedef gp_Dir2d Dir2d;
25 typedef gp_Pnt2d Pnt2d;
26 typedef gp_Vec2d Vec2d;
27
28
29
30
31
32
33 //=======================================================================
34 //function : SetAxis
35 //purpose  : 
36 //=======================================================================
37
38 void Geom2d_Conic::SetAxis(const gp_Ax22d& A)
39 {
40   pos.SetAxis(A); 
41 }
42
43 //=======================================================================
44 //function : SetXAxis
45 //purpose  : 
46 //=======================================================================
47
48 void Geom2d_Conic::SetXAxis (const Ax2d& A) 
49
50   pos.SetXAxis(A); 
51 }
52
53 //=======================================================================
54 //function : SetYAxis
55 //purpose  : 
56 //=======================================================================
57
58 void Geom2d_Conic::SetYAxis (const Ax2d& A)
59
60   pos.SetYAxis(A);
61 }
62
63 //=======================================================================
64 //function : SetLocation
65 //purpose  : 
66 //=======================================================================
67
68 void Geom2d_Conic::SetLocation (const Pnt2d& P) 
69 {
70   pos.SetLocation (P); 
71 }
72
73 //=======================================================================
74 //function : XAxis
75 //purpose  : 
76 //=======================================================================
77
78 Ax2d Geom2d_Conic::XAxis () const 
79
80   return gp_Ax2d(pos.Location(), pos.XDirection()); 
81 }
82
83 //=======================================================================
84 //function : YAxis
85 //purpose  : 
86 //=======================================================================
87
88 Ax2d Geom2d_Conic::YAxis () const 
89 {
90    return gp_Ax2d(pos.Location(), pos.YDirection());
91 }
92
93 //=======================================================================
94 //function : Location
95 //purpose  : 
96 //=======================================================================
97
98 Pnt2d Geom2d_Conic::Location () const 
99 {
100  return pos.Location(); 
101 }
102
103 //=======================================================================
104 //function : Position
105 //purpose  : 
106 //=======================================================================
107
108 const gp_Ax22d& Geom2d_Conic::Position () const 
109 {
110   return pos; 
111 }
112
113
114 //=======================================================================
115 //function : Reverse
116 //purpose  : 
117 //=======================================================================
118
119 void Geom2d_Conic::Reverse () { 
120
121   Dir2d Temp = pos.YDirection ();
122   Temp.Reverse ();
123   pos.SetAxis(gp_Ax22d(pos.Location(), pos.XDirection(), Temp));
124 }
125
126 //=======================================================================
127 //function : Continuity
128 //purpose  : 
129 //=======================================================================
130
131 GeomAbs_Shape Geom2d_Conic::Continuity () const 
132 {
133   return GeomAbs_CN; 
134 }
135
136 //=======================================================================
137 //function : IsCN
138 //purpose  : 
139 //=======================================================================
140
141 Standard_Boolean Geom2d_Conic::IsCN (const Standard_Integer ) const 
142 {
143   return Standard_True; 
144 }