OpenLexocad  27.0
GeomToolsOCC.h
Go to the documentation of this file.
1 #pragma warning(disable : 4251)
2 
3 #pragma once
4 
5 #include <Geom/Ax1.h>
6 #include <Geom/Ax2.h>
7 #include <Geom/Ax22d.h>
8 #include <Geom/Ax3.h>
9 #include <Geom/Bnd_Box.h>
10 #include <Geom/Circ.h>
11 #include <Geom/Circ2d.h>
12 #include <Geom/Dir.h>
13 #include <Geom/Dir2d.h>
14 #include <Geom/GTrsf.h>
15 #include <Geom/GeomTools.h>
16 #include <Geom/Lin.h>
17 #include <Geom/Lin2d.h>
18 #include <Geom/Pln.h>
19 #include <Geom/Pnt.h>
20 #include <Geom/Pnt2d.h>
21 #include <Geom/Trsf.h>
22 #include <Geom/Vec.h>
23 #include <Geom/Vec2d.h>
24 #include <Geom/XY.h>
25 #include <Geom/geom_defines.h>
26 #include <Geom/xyz.h>
27 
28 #include <gp_Ax1.hxx>
29 #include <gp_Ax2.hxx>
30 #include <gp_Ax22d.hxx>
31 #include <gp_Ax3.hxx>
32 #include <gp_Circ.hxx>
33 #include <gp_Dir.hxx>
34 #include <gp_Dir2d.hxx>
35 #include <gp_GTrsf.hxx>
36 #include <gp_Lin.hxx>
37 #include <gp_Lin2d.hxx>
38 #include <gp_Pln.hxx>
39 #include <gp_Pnt.hxx>
40 #include <gp_Pnt2d.hxx>
41 #include <gp_Vec.hxx>
42 #include <gp_Vec2d.hxx>
43 #include <gp_XYZ.hxx>
44 #include <vector>
45 
46 #ifndef M_PI
47 #define M_PI 3.1415926535897932384626433832795029
48 #endif
49 
50 namespace Geom
51 {
53 {
54 public:
55  GeomToolsOCC(void);
56  ~GeomToolsOCC(void);
57 
58  static bool isEqual(const gp_XYZ& v1, const gp_XYZ& v2, double tolerance = 1E-06);
59  static bool isEqual(const gp_XY& v1, const gp_XY& v2, double tolerance = 1E-06);
60  static bool isEqual(const gp_Dir& d1, const gp_Dir& d2, double tolerance = 1E-06);
61  static bool isEqual(const gp_Dir2d& d1, const gp_Dir2d& d2, double tolerance = 1E-06);
62  static bool isEqual(const gp_Vec& v1, const gp_Vec& v2, double tolerance = 1E-06);
63  static bool isEqual(const gp_Vec2d& v1, const gp_Vec2d& v2, double tolerance = 1E-06);
64  static bool isEqual(const gp_Pnt& p1, const gp_Pnt& p2, double tolerance = 1E-06);
65  static bool isEqual(const gp_Pnt2d& p1, const gp_Pnt2d& p2, double tolerance = 1E-06);
66  static bool isEqual(const gp_Ax1& a1, const gp_Ax1& a2, double tolerance = 1E-06);
67  static bool isEqual(const gp_Ax2& a1, const gp_Ax2& a2, double tolerance = 1E-06);
68  static bool isEqual(const gp_Ax3& a1, const gp_Ax3& a2, double tolerance = 1E-06);
69  static bool isEqual(const gp_Ax22d& a1, const gp_Ax22d& a2, double tolerance = 1E-06);
70  static bool isEqual(const gp_Trsf& t1, const gp_Trsf& t2, double tolerance = 1E-06);
71  static bool isEqual(const gp_GTrsf& t1, const gp_GTrsf& t2, double tolerance = 1E-06);
72 
73 
74 
75  static Geom::Ax1 to_CA_Axis1(const gp_Ax1& value);
76  static gp_Ax2 to_gp_Ax2(const Geom::Ax2& value);
77  static Geom::Ax2 to_CA_Axis2(const gp_Ax2& value);
78  static Geom::Ax22d to_CA_Ax22d(const gp_Ax22d& value);
79  static gp_Ax2d to_gp_Ax2d(const Geom::Ax2d& value);
80  static gp_Ax22d to_gp_Ax22d(const Geom::Ax22d& value);
81  static gp_Pnt to_gp_Pnt(const Geom::Pnt& value);
82  static gp_Pnt to_gp_Pnt(const Geom::XYZ& value);
83  static Geom::Pnt to_CA_Point(const gp_Pnt& value);
84  static Geom::Pnt to_CA_Point(const gp_Pnt2d& value, const Geom::Pln& pln);
85  static gp_Vec to_gp_Vec(const Geom::Vec& value);
86  static gp_Vec to_gp_Vec(const Geom::XYZ& value);
87  static Geom::Vec to_CA_Vector(const gp_Vec& value);
88  static gp_Dir to_gp_Dir(const Geom::Dir& value);
89  static gp_Pnt2d to_gp_Pnt2d(const Geom::Pnt2d& value);
90  static Geom::Pnt2d to_CA_Pnt2d(const gp_Pnt2d& value);
91  static gp_Vec2d to_gp_Vec2d(const Geom::Vec2d& value);
92  static gp_Dir2d to_gp_Dir2d(const Geom::Dir2d& value);
93  static gp_Lin2d to_gp_Lin2d(const Geom::Lin2d& value);
94  static Geom::Dir to_CA_Direction(const gp_Dir& value);
95  static gp_Trsf to_gp_Trsf(const Geom::Trsf& value);
96  static gp_GTrsf to_gp_GTrsf(const Geom::GTrsf& value);
97  static gp_Mat to_gp_Mat(const Geom::Mat& value);
98  static Geom::Trsf to_CA_Transform(const gp_Trsf& value);
99  static gp_Pln to_gp_Pln(const Geom::Pln& value);
100  static Geom::Pln to_CA_Plane(const gp_Pln& value);
101  static gp_Lin to_gp_Lin(const Geom::Lin& value);
102  static Geom::Lin to_CA_Line(const gp_Lin& value);
103  static Geom::Circ to_CA_Circle(const gp_Circ& value);
104  static Geom::Circ2d to_CA_Circle2d(const gp_Circ2d& value);
105  static gp_Ax1 to_gp_Ax1(const Geom::Ax1& value);
106  static gp_Circ to_gp_Circ(const Geom::Circ& value);
107  static gp_Circ2d to_gp_Circ2d(const Geom::Circ2d& value);
108  static gp_Lin2d to_gp_Lin2d(const Geom::Lin& lin, const Geom::Pln& pln);
109  static gp_Lin to_gp_Lin(const gp_Lin2d& gpLin2d, const gp_Pln& gpPln);
110  static gp_Pnt2d to_gp_Pnt2d(const Geom::Pnt& pnt, const Geom::Pln& pln);
111  static gp_Circ to_gp_Circ(const gp_Circ2d& gpCirc2d, const gp_Pln& gpPln);
112  static gp_Circ to_gp_Circ(const gp_Circ2d& gpCirc2d, const Geom::Pln& pln);
113  static void debugOccTransform(const gp_Trsf& transform, const std::string& msg = "");
114  static void debugOccTransform(const gp_GTrsf& transform, const std::string& msg = "");
115 
116 private:
117 };
118 
119 } // namespace Geom
120 
121 
122 GEOM_EXPORT std::ostream& operator<<(std::ostream& o, const gp_Vec& vec);
123 GEOM_EXPORT std::ostream& operator<<(std::ostream& o, const gp_Dir& dir);
124 GEOM_EXPORT std::ostream& operator<<(std::ostream& o, const gp_Pln& dir);
125 GEOM_EXPORT std::ostream& operator<<(std::ostream& o, const gp_Pnt& pnt);
126 GEOM_EXPORT std::ostream& operator<<(std::ostream& o, const gp_XYZ& xyz);
127 GEOM_EXPORT std::ostream& operator<<(std::ostream& o, const gp_Ax2& placement);
128 GEOM_EXPORT std::ostream& operator<<(std::ostream& o, const gp_Vec2d& vec);
129 GEOM_EXPORT std::ostream& operator<<(std::ostream& o, const gp_Trsf& t);
Definition: Circ.h:66
Definition: Rotation.h:5
Definition: Lin2d.h:51
Definition: Circ2d.h:57
Definition: GeomToolsOCC.h:52
Definition: Pln.h:59
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:42
Definition: Mat.h:41
Definition: Ax2d.h:48
GEOM_EXPORT std::ostream & operator<<(std::ostream &o, const gp_Vec &vec)
Definition: Dir2d.h:38
#define GEOM_EXPORT
Definition: geom_defines.h:8
Definition: Ax2.h:69
Definition: XYZ.h:46
Definition: Lin.h:50
Definition: Trsf.h:58
Definition: Dir.h:46
Defines a non-persistent vector in 2D space.
Definition: Vec2d.h:34
Definition: Ax1.h:52
Defines a non-persistent vector in 3D space.
Definition: Vec.h:45
Definition: GTrsf.h:49
Definition: Ax22d.h:50
Defines a non-persistent 2D cartesian point.
Definition: Pnt2d.h:33