extend convertTo function to also support SbRotation/Base::Rotation

This commit is contained in:
wmayer
2019-09-06 21:29:51 +02:00
parent 48aa182287
commit b14cf8a00d
16 changed files with 162 additions and 64 deletions

View File

@@ -28,6 +28,7 @@
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Sequencer.h>
#include <Base/Converter.h>
#include "Core/Algorithm.h"
#include "Core/Evaluation.h"

View File

@@ -27,6 +27,7 @@
#include <CXX/Objects.hxx>
#include <Base/Console.h>
#include <Base/Converter.h>
#include <Base/Exception.h>
#include <Base/Writer.h>
#include <Base/Reader.h>

View File

@@ -26,6 +26,7 @@
#include <Base/VectorPy.h>
#include <Base/Handle.h>
#include <Base/Builder3D.h>
#include <Base/Converter.h>
#include <Base/GeometryPyCXX.h>
#include <Base/MatrixPy.h>
#include <Base/Tools.h>

View File

@@ -33,6 +33,7 @@
#include <Base/PyObjectBase.h>
#include <Base/Console.h>
#include <Base/Vector3D.h>
#include <Base/Converter.h>
#include <Base/VectorPy.h>
#include <Base/GeometryPyCXX.h>
#include <Mod/Part/App/TopoShapePy.h>

View File

@@ -30,6 +30,7 @@
#include <Mod/Mesh/App/MeshFeature.h>
#include <Base/Converter.h>
#include <App/Application.h>
#include <App/Document.h>
#include <Gui/Application.h>

View File

@@ -44,6 +44,7 @@
#endif
#include "CurveOnMesh.h"
#include <Base/Converter.h>
#include <App/Document.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>

View File

@@ -24,6 +24,7 @@
#ifndef PART_TOOLS_H
#define PART_TOOLS_H
#include <Base/Converter.h>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
@@ -41,9 +42,9 @@ struct vec_traits<gp_Pnt> {
typedef gp_Pnt vec_type;
typedef double float_type;
vec_traits(const vec_type& v) : v(v){}
inline float_type x() { return v.X(); }
inline float_type y() { return v.Y(); }
inline float_type z() { return v.Z(); }
inline std::tuple<float_type,float_type,float_type> get() const {
return std::make_tuple(v.X(), v.Y(), v.Z());
}
private:
const vec_type& v;
};
@@ -53,9 +54,9 @@ struct vec_traits<gp_Vec> {
typedef gp_Vec vec_type;
typedef double float_type;
vec_traits(const vec_type& v) : v(v){}
inline float_type x() { return v.X(); }
inline float_type y() { return v.Y(); }
inline float_type z() { return v.Z(); }
inline std::tuple<float_type,float_type,float_type> get() const {
return std::make_tuple(v.X(), v.Y(), v.Z());
}
private:
const vec_type& v;
};
@@ -65,9 +66,9 @@ struct vec_traits<gp_Dir> {
typedef gp_Dir vec_type;
typedef double float_type;
vec_traits(const vec_type& v) : v(v){}
inline float_type x() { return v.X(); }
inline float_type y() { return v.Y(); }
inline float_type z() { return v.Z(); }
inline std::tuple<float_type,float_type,float_type> get() const {
return std::make_tuple(v.X(), v.Y(), v.Z());
}
private:
const vec_type& v;
};
@@ -77,9 +78,9 @@ struct vec_traits<gp_XYZ> {
typedef gp_XYZ vec_type;
typedef double float_type;
vec_traits(const vec_type& v) : v(v){}
inline float_type x() { return v.X(); }
inline float_type y() { return v.Y(); }
inline float_type z() { return v.Z(); }
inline std::tuple<float_type,float_type,float_type> get() const {
return std::make_tuple(v.X(), v.Y(), v.Z());
}
private:
const vec_type& v;
};

View File

@@ -33,6 +33,7 @@
#include "PointsAlgos.h"
#include "Points.h"
#include <Base/Converter.h>
#include <Base/Exception.h>
#include <Base/FileInfo.h>
#include <Base/Console.h>

View File

@@ -28,6 +28,7 @@
# include <algorithm>
#endif
#include <Base/Converter.h>
#include <Base/Exception.h>
#include <Base/Matrix.h>
#include <Base/Persistence.h>

View File

@@ -29,6 +29,7 @@
#endif
#include <Base/Console.h>
#include <Base/Converter.h>
#include <Base/Interpreter.h>
#include <Base/PyObjectBase.h>
#include <Base/GeometryPyCXX.h>

View File

@@ -42,6 +42,7 @@
#include <Gui/FileDialog.h>
#include <Gui/Selection.h>
#include <Base/CoordinateSystem.h>
#include <Base/Converter.h>
#include "../App/ApproxSurface.h"
#include "FitBSplineSurface.h"

View File

@@ -80,6 +80,7 @@
/// Here the FreeCAD includes sorted by Base,App,Gui......
#include <Base/Converter.h>
#include <Base/Tools.h>
#include <Base/Parameter.h>
#include <Base/Console.h>