diff options
author | Marius Kintel <marius@kintel.net> | 2011-10-30 01:47:21 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-10-30 01:47:21 (GMT) |
commit | f64dc11d330a50c901facfd1cf5e22b2ca2d5ead (patch) | |
tree | 534b55591fc02c7776a1355a609bc979e210c5a8 /src | |
parent | 9c95cd4c52d649f77169a7481669a5d384968ead (diff) | |
parent | 56979129695ca12ae86bc9b3ea988f7a720d4c8a (diff) |
Merge branch 'visitortests'
Diffstat (limited to 'src')
-rw-r--r-- | src/CGALRenderer.cc | 6 | ||||
-rw-r--r-- | src/CSGTermEvaluator.cc | 1 | ||||
-rw-r--r-- | src/dxfdata.h | 8 | ||||
-rw-r--r-- | src/lexer.l | 7 | ||||
-rw-r--r-- | src/linalg.h | 2 | ||||
-rw-r--r-- | src/linearextrude.cc | 1 | ||||
-rw-r--r-- | src/mainwin.cc | 1 | ||||
-rw-r--r-- | src/openscad.cc | 1 | ||||
-rw-r--r-- | src/openscad.h | 6 |
9 files changed, 19 insertions, 14 deletions
diff --git a/src/CGALRenderer.cc b/src/CGALRenderer.cc index 4d165ce..95bcba1 100644 --- a/src/CGALRenderer.cc +++ b/src/CGALRenderer.cc @@ -24,10 +24,12 @@ * */ -#include "CGALRenderer.h" +// dxfdata.h must come first for Eigen SIMD alignment issues +#include "dxfdata.h" #include "polyset.h" + +#include "CGALRenderer.h" #include "CGAL_renderer.h" -#include "dxfdata.h" #include "dxftess.h" #include "CGAL_Nef_polyhedron.h" #include "cgal.h" diff --git a/src/CSGTermEvaluator.cc b/src/CSGTermEvaluator.cc index d1af987..0c7bca7 100644 --- a/src/CSGTermEvaluator.cc +++ b/src/CSGTermEvaluator.cc @@ -17,6 +17,7 @@ #include <sstream> #include <iostream> #include <assert.h> +#include <cstddef> /*! \class CSGTermEvaluator diff --git a/src/dxfdata.h b/src/dxfdata.h index d24541c..7eea6a9 100644 --- a/src/dxfdata.h +++ b/src/dxfdata.h @@ -1,10 +1,8 @@ #ifndef DXFDATA_H_ #define DXFDATA_H_ +#include "linalg.h" #include <vector> -#include <Eigen/Dense> - -using Eigen::Vector2d; class DxfData { @@ -30,7 +28,11 @@ public: } }; +#ifdef __APPLE__ std::vector<Vector2d, Eigen::aligned_allocator<Vector2d> > points; +#else + std::vector<Vector2d> points; +#endif std::vector<Path> paths; std::vector<Dim> dims; diff --git a/src/lexer.l b/src/lexer.l index 3cd4a19..cf5cb6d 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -35,8 +35,11 @@ #include <QDir> #include <assert.h> -//isatty for visual c++ -#ifdef _MSC_VER +//isatty for visual c++ and mingw-cross-env +#if defined __WIN32__ && ! defined _MSC_VER +#include "unistd.h" +#endif +#if defined __WIN32__ || defined _MSC_VER extern "C" int __cdecl _isatty(int _FileHandle); #define isatty _isatty #endif diff --git a/src/linalg.h b/src/linalg.h index 06991cf..e20d8d8 100644 --- a/src/linalg.h +++ b/src/linalg.h @@ -3,7 +3,9 @@ #include <Eigen/Core> #include <Eigen/Geometry> +#include <Eigen/Dense> +using Eigen::Vector2d; using Eigen::Vector3d; typedef Eigen::AlignedBox<double, 3> BoundingBox; using Eigen::Matrix3f; 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> diff --git a/src/mainwin.cc b/src/mainwin.cc index f9c3ac6..9944f67 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -876,7 +876,6 @@ void MainWindow::compileCSG(bool procevents) this->thrownTogetherRenderer = new ThrownTogetherRenderer(this->root_chain, this->highlights_chain, this->background_chain); - PRINT("CSG generation finished."); int s = t.elapsed() / 1000; PRINTF("Total rendering time: %d hours, %d minutes, %d seconds", s / (60*60), (s / 60) % 60, s % 60); diff --git a/src/openscad.cc b/src/openscad.cc index f3d28a6..4ff250d 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -427,3 +427,4 @@ int main(int argc, char **argv) return rc; } + diff --git a/src/openscad.h b/src/openscad.h index e6b9b9f..61aec0e 100644 --- a/src/openscad.h +++ b/src/openscad.h @@ -27,12 +27,6 @@ #ifndef OPENSCAD_H #define OPENSCAD_H -// for win32 and maybe others.. -#ifndef M_PI -# define M_PI 3.14159265358979323846 -#endif - - extern class AbstractModule *parse(const char *text, const char *path, int debug); extern int get_fragments_from_r(double r, double fn, double fs, double fa); |