diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dxfdata.h | 8 | ||||
-rw-r--r-- | src/func.cc | 1 | ||||
-rw-r--r-- | src/linalg.h | 4 | ||||
-rw-r--r-- | src/linearextrude.cc | 1 |
4 files changed, 14 insertions, 0 deletions
diff --git a/src/dxfdata.h b/src/dxfdata.h index d8dc3dd..04bcdd0 100644 --- a/src/dxfdata.h +++ b/src/dxfdata.h @@ -1,10 +1,14 @@ #ifndef DXFDATA_H_ #define DXFDATA_H_ +// workaround Eigen SIMD alignment problems #ifndef __APPLE__ #define EIGEN_DONT_VECTORIZE 1 #define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT 1 #endif +#ifdef _MSC_VER +#define EIGEN_DONT_ALIGN +#endif #include <Eigen/Dense> #include <vector> @@ -35,7 +39,11 @@ public: } }; +#ifdef _MSC_VER + std::vector<Vector2d> points; +#else std::vector<Vector2d, Eigen::aligned_allocator<Vector2d> > points; +#endif std::vector<Path> paths; std::vector<Dim> dims; diff --git a/src/func.cc b/src/func.cc index b011a27..75e90df 100644 --- a/src/func.cc +++ b/src/func.cc @@ -34,6 +34,7 @@ #include <algorithm> #include "stl-utils.h" #include <boost/foreach.hpp> +#include "openscad.h" //M_PI AbstractFunction::~AbstractFunction() { diff --git a/src/linalg.h b/src/linalg.h index 02fa17f..b1e1409 100644 --- a/src/linalg.h +++ b/src/linalg.h @@ -1,10 +1,14 @@ #ifndef LINALG_H_ #define LINALG_H_ +// workaround Eigen SIMD alignment problems #ifndef __APPLE__ #define EIGEN_DONT_VECTORIZE 1 #define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT 1 #endif +#ifdef _MSC_VER +#define EIGEN_DONT_ALIGN +#endif #include <Eigen/Core> #include <Eigen/Geometry> diff --git a/src/linearextrude.cc b/src/linearextrude.cc index 5c3b684..9c3557b 100644 --- a/src/linearextrude.cc +++ b/src/linearextrude.cc @@ -32,6 +32,7 @@ #include "builtin.h" #include "PolySetEvaluator.h" #include "openscad.h" // get_fragments_from_r() +#include "mathc99.h" #include <sstream> #include <boost/assign/std/vector.hpp> |