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