Test for 0022778: Bug in BRepMesh
[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-2012 OPEN CASCADE SAS
5 //
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.
10 //
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.
13 //
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.
20
21
22
23 #include <Geom2d_Conic.ixx>
24 #include <gp_Dir2d.hxx>
25
26 typedef Geom2d_Conic         Conic;
27 typedef Handle(Geom2d_Conic) Handle(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
36
37
38
39 //=======================================================================
40 //function : SetAxis
41 //purpose  : 
42 //=======================================================================
43
44 void Geom2d_Conic::SetAxis(const gp_Ax22d& A)
45 {
46   pos.SetAxis(A); 
47 }
48
49 //=======================================================================
50 //function : SetXAxis
51 //purpose  : 
52 //=======================================================================
53
54 void Geom2d_Conic::SetXAxis (const Ax2d& A) 
55
56   pos.SetXAxis(A); 
57 }
58
59 //=======================================================================
60 //function : SetYAxis
61 //purpose  : 
62 //=======================================================================
63
64 void Geom2d_Conic::SetYAxis (const Ax2d& A)
65
66   pos.SetYAxis(A);
67 }
68
69 //=======================================================================
70 //function : SetLocation
71 //purpose  : 
72 //=======================================================================
73
74 void Geom2d_Conic::SetLocation (const Pnt2d& P) 
75 {
76   pos.SetLocation (P); 
77 }
78
79 //=======================================================================
80 //function : XAxis
81 //purpose  : 
82 //=======================================================================
83
84 Ax2d Geom2d_Conic::XAxis () const 
85
86   return gp_Ax2d(pos.Location(), pos.XDirection()); 
87 }
88
89 //=======================================================================
90 //function : YAxis
91 //purpose  : 
92 //=======================================================================
93
94 Ax2d Geom2d_Conic::YAxis () const 
95 {
96    return gp_Ax2d(pos.Location(), pos.YDirection());
97 }
98
99 //=======================================================================
100 //function : Location
101 //purpose  : 
102 //=======================================================================
103
104 Pnt2d Geom2d_Conic::Location () const 
105 {
106  return pos.Location(); 
107 }
108
109 //=======================================================================
110 //function : Position
111 //purpose  : 
112 //=======================================================================
113
114 const gp_Ax22d& Geom2d_Conic::Position () const 
115 {
116   return pos; 
117 }
118
119
120 //=======================================================================
121 //function : Reverse
122 //purpose  : 
123 //=======================================================================
124
125 void Geom2d_Conic::Reverse () { 
126
127   Dir2d Temp = pos.YDirection ();
128   Temp.Reverse ();
129   pos.SetAxis(gp_Ax22d(pos.Location(), pos.XDirection(), Temp));
130 }
131
132 //=======================================================================
133 //function : Continuity
134 //purpose  : 
135 //=======================================================================
136
137 GeomAbs_Shape Geom2d_Conic::Continuity () const 
138 {
139   return GeomAbs_CN; 
140 }
141
142 //=======================================================================
143 //function : IsCN
144 //purpose  : 
145 //=======================================================================
146
147 Standard_Boolean Geom2d_Conic::IsCN (const Standard_Integer ) const 
148 {
149   return Standard_True; 
150 }