OpenLexocad  27.0
Circ.h
Go to the documentation of this file.
1 //
3 // Copyright(C) 2013-2016 OpenCascade [www.opencascade.org]
4 //
5 // This library is free software; you can redistribute it and / or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street,
18 // Fifth Floor, Boston, MA 02110 - 1301 USA
19 //
21 
22 #pragma once
23 
24 #include <Geom/Ax2.h>
25 #include <Geom/GeomEnums.h>
26 #include <Geom/geom_defines.h>
27 
28 // namespace Geom {
29 //
30 // class Ax1;
31 // class Ax2;
32 // class Trsf;
33 // class Vec;
34 // class Pnt;
35 //
36 //}
37 
38 namespace Geom
39 {
67 {
68 public:
70  // //
71  // --------------------- BEGIN API --------------------- //
72  // //
73  // ATTENTION: DO NOT CHANGE ANY SIGNATURES IN THE API ! //
74  // //
76 
78  Circ();
79 
83  Circ(const Geom::Ax2& A2, const double Radius);
84 
89  void setAxis(const Geom::Ax1& A1);
90 
92  void setLocation(const Geom::Pnt& P);
94  void setPosition(const Geom::Ax2& A2);
99  void setRadius(const double Radius);
101  double area() const;
102 
106  const Geom::Ax1& axis() const;
108  double length() const;
109 
113  const Geom::Pnt& location() const;
114 
117  const Geom::Ax2& position() const;
119  double radius() const;
120 
124  Geom::Ax1 xAxis() const;
125 
129  Geom::Ax1 yAxis() const;
130 
133  double distance(const Geom::Pnt& P) const;
134 
136  double squareDistance(const Geom::Pnt& P) const;
137 
141  bool contains(const Geom::Pnt& P, const double LinearTolerance) const;
142 
143  void mirror(const Geom::Pnt& P);
144 
148  Geom::Circ mirrored(const Geom::Pnt& P) const;
149 
150  void mirror(const Geom::Ax1& A1);
151 
155  Geom::Circ mirrored(const Geom::Ax1& A1) const;
156 
157  void mirror(const Geom::Ax2& A2);
158 
162  Geom::Circ mirrored(const Geom::Ax2& A2) const;
163 
164  void rotate(const Geom::Ax1& A1, const double Ang);
165 
168  Geom::Circ rotated(const Geom::Ax1& A1, const double Ang) const;
169 
170  void scale(const Geom::Pnt& P, const double S);
171 
177  Geom::Circ scaled(const Geom::Pnt& P, const double S) const;
178 
179  void transform(const Geom::Trsf& T);
180 
182  Geom::Circ transformed(const Geom::Trsf& T) const;
183 
184  void translate(const Geom::Vec& V);
185 
188  Geom::Circ translated(const Geom::Vec& V) const;
189 
190  void translate(const Geom::Pnt& P1, const Geom::Pnt& P2);
191 
193  Geom::Circ translated(const Geom::Pnt& P1, const Geom::Pnt& P2) const;
194 
196  // //
197  // ---------------------- END API ---------------------- //
198  // //
200 
201 private:
202  Geom::Ax2 _pos;
203  double _radius;
204 };
205 
206 } // namespace Geom
Definition: Circ.h:66
Definition: Rotation.h:5
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:42
#define GEOM_EXPORT
Definition: geom_defines.h:8
Definition: Ax2.h:69
Definition: Trsf.h:58
Definition: Ax1.h:52
Defines a non-persistent vector in 3D space.
Definition: Vec.h:45