diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CGALRenderer.cc | 6 | ||||
-rw-r--r-- | src/csgterm.cc | 20 | ||||
-rw-r--r-- | src/csgterm.h | 1 | ||||
-rw-r--r-- | src/dxfdata.h | 7 | ||||
-rw-r--r-- | src/mainwin.cc | 13 | ||||
-rw-r--r-- | src/openscad.cc | 1 |
6 files changed, 45 insertions, 3 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/csgterm.cc b/src/csgterm.cc index 16ef75f..0f56b82 100644 --- a/src/csgterm.cc +++ b/src/csgterm.cc @@ -227,6 +227,26 @@ std::string CSGChain::dump() return dump.str(); } + +std::string CSGChain::fulldump() +{ + std::stringstream dump; + dump << "\nsizes: \n"; + dump << " polysets: " << polysets.size(); + dump << " matrices: " << matrices.size(); + dump << " colors: " << colors.size(); + dump << " types: " << types.size(); + dump << " labels: " << labels.size(); + dump << "\ndata: \n"; + for (size_t i = 0; i < polysets.size(); i++) dump << (*polysets[i]).polygons.size() << "\n"; + for (size_t i = 0; i < matrices.size(); i++) dump << *matrices[i] << "\n"; + for (size_t i = 0; i < colors.size(); i++) dump << *colors[i] << "\n"; + for (size_t i = 0; i < types.size(); i++) dump << types[i] << "\n"; + for (size_t i = 0; i < labels.size(); i++) dump << labels[i] << "\n"; + dump << "\n"; + return dump.str(); +} + BoundingBox CSGChain::getBoundingBox() const { BoundingBox bbox; diff --git a/src/csgterm.h b/src/csgterm.h index 1d9d9fd..b09b2d2 100644 --- a/src/csgterm.h +++ b/src/csgterm.h @@ -52,6 +52,7 @@ public: void add(const shared_ptr<PolySet> &polyset, const Transform3d &m, double *color, CSGTerm::type_e type, std::string label); void import(CSGTerm *term, CSGTerm::type_e type = CSGTerm::TYPE_UNION); std::string dump(); + std::string fulldump(); BoundingBox getBoundingBox() const; }; diff --git a/src/dxfdata.h b/src/dxfdata.h index d24541c..d8dc3dd 100644 --- a/src/dxfdata.h +++ b/src/dxfdata.h @@ -1,8 +1,13 @@ #ifndef DXFDATA_H_ #define DXFDATA_H_ -#include <vector> +#ifndef __APPLE__ +#define EIGEN_DONT_VECTORIZE 1 +#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT 1 +#endif + #include <Eigen/Dense> +#include <vector> using Eigen::Vector2d; diff --git a/src/mainwin.cc b/src/mainwin.cc index 238bd10..fafe8ed 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -92,6 +92,8 @@ using namespace boost::lambda; #endif // ENABLE_CGAL +using std::cerr; + // Global application state unsigned int GuiLocker::gui_locked = 0; @@ -872,6 +874,17 @@ void MainWindow::compileCSG(bool procevents) this->highlights_chain, this->background_chain); + fprintf(stderr, "Dump root chain\n"); + cerr << this->root_chain->fulldump(); + cerr << this->highlights_chain; + cerr << this->background_chain; +/* fprintf(stderr, "dump highlights\n"); + this->highlights_chain->dump(); + fprintf(stderr, "dump background\n"); + this->background_chain->dump();*/ + fprintf(stderr, "end dump\n"); + + 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 878cb22..fd74de4 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -415,3 +415,4 @@ int main(int argc, char **argv) return rc; } + |