0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual
[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
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>
26
27 typedef Geom2d_Conic         Conic;
28
29 typedef gp_Ax2d  Ax2d;
30 typedef gp_Dir2d Dir2d;
31 typedef gp_Pnt2d Pnt2d;
32 typedef gp_Vec2d Vec2d;
33
34 //=======================================================================
35 //function : SetAxis
36 //purpose  : 
37 //=======================================================================
38
39 void Geom2d_Conic::SetAxis(const gp_Ax22d& A)
40 {
41   pos.SetAxis(A); 
42 }
43
44 //=======================================================================
45 //function : SetXAxis
46 //purpose  : 
47 //=======================================================================
48
49 void Geom2d_Conic::SetXAxis (const Ax2d& A) 
50
51   pos.SetXAxis(A); 
52 }
53
54 //=======================================================================
55 //function : SetYAxis
56 //purpose  : 
57 //=======================================================================
58
59 void Geom2d_Conic::SetYAxis (const Ax2d& A)
60
61   pos.SetYAxis(A);
62 }
63
64 //=======================================================================
65 //function : SetLocation
66 //purpose  : 
67 //=======================================================================
68
69 void Geom2d_Conic::SetLocation (const Pnt2d& P) 
70 {
71   pos.SetLocation (P); 
72 }
73
74 //=======================================================================
75 //function : XAxis
76 //purpose  : 
77 //=======================================================================
78
79 Ax2d Geom2d_Conic::XAxis () const 
80
81   return gp_Ax2d(pos.Location(), pos.XDirection()); 
82 }
83
84 //=======================================================================
85 //function : YAxis
86 //purpose  : 
87 //=======================================================================
88
89 Ax2d Geom2d_Conic::YAxis () const 
90 {
91    return gp_Ax2d(pos.Location(), pos.YDirection());
92 }
93
94 //=======================================================================
95 //function : Location
96 //purpose  : 
97 //=======================================================================
98
99 Pnt2d Geom2d_Conic::Location () const 
100 {
101  return pos.Location(); 
102 }
103
104 //=======================================================================
105 //function : Position
106 //purpose  : 
107 //=======================================================================
108
109 const gp_Ax22d& Geom2d_Conic::Position () const 
110 {
111   return pos; 
112 }
113
114
115 //=======================================================================
116 //function : Reverse
117 //purpose  : 
118 //=======================================================================
119
120 void Geom2d_Conic::Reverse () { 
121
122   Dir2d Temp = pos.YDirection ();
123   Temp.Reverse ();
124   pos.SetAxis(gp_Ax22d(pos.Location(), pos.XDirection(), Temp));
125 }
126
127 //=======================================================================
128 //function : Continuity
129 //purpose  : 
130 //=======================================================================
131
132 GeomAbs_Shape Geom2d_Conic::Continuity () const 
133 {
134   return GeomAbs_CN; 
135 }
136
137 //=======================================================================
138 //function : IsCN
139 //purpose  : 
140 //=======================================================================
141
142 Standard_Boolean Geom2d_Conic::IsCN (const Standard_Integer ) const 
143 {
144   return Standard_True; 
145 }