summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-08-19 04:02:39 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-08-19 04:02:39 (GMT)
commitd656f556b85fb25903d5f18c6a9557d6ed0e6f7d (patch)
treedc28c5a2ee8fbad8fd1480a2f67a0e9fe5298f14
parentaa2c67d24925a8b9465d5a908662091b705cf7cc (diff)
debugging failed test: throwntogethertest polygons
-rw-r--r--src/ThrownTogetherRenderer.cc6
-rw-r--r--src/dxfdata.cc6
-rw-r--r--src/dxfdim.cc8
-rw-r--r--src/dxfdim.h9
-rw-r--r--src/dxftess-cgal.cc15
-rw-r--r--src/handle_dep.cc4
-rw-r--r--src/surface.cc4
-rw-r--r--tests/csgtestcore.cc7
8 files changed, 42 insertions, 17 deletions
diff --git a/src/ThrownTogetherRenderer.cc b/src/ThrownTogetherRenderer.cc
index 146d2e1..b22c6a5 100644
--- a/src/ThrownTogetherRenderer.cc
+++ b/src/ThrownTogetherRenderer.cc
@@ -30,7 +30,8 @@
#include "system-gl.h"
-#include <boost/unordered_map.hpp>
+//#include <boost/unordered_map.hpp>
+#include <map>
ThrownTogetherRenderer::ThrownTogetherRenderer(CSGChain *root_chain,
CSGChain *highlights_chain,
@@ -62,7 +63,8 @@ void ThrownTogetherRenderer::renderCSGChain(CSGChain *chain, bool highlight,
bool fberror) const
{
glDepthFunc(GL_LEQUAL);
- boost::unordered_map<std::pair<PolySet*,Transform3d*>,int> polySetVisitMark;
+ //boost::unordered_map<std::pair<PolySet*,Transform3d*>,int> polySetVisitMark;
+ std::map<std::pair<PolySet*,Transform3d*>,int> polySetVisitMark;
for (size_t i = 0; i < chain->polysets.size(); i++) {
if (polySetVisitMark[std::make_pair(chain->polysets[i].get(), &chain->matrices[i])]++ > 0)
continue;
diff --git a/src/dxfdata.cc b/src/dxfdata.cc
index 4258a4c..080e780 100644
--- a/src/dxfdata.cc
+++ b/src/dxfdata.cc
@@ -85,7 +85,8 @@ DxfData::DxfData(double fn, double fs, double fa,
Grid2d< std::vector<int> > grid(GRID_COARSE);
std::vector<Line> lines; // Global lines
- boost::unordered_map< std::string, std::vector<Line> > blockdata; // Lines in blocks
+ //boost::unordered_map< std::string, std::vector<Line> > blockdata; // Lines in blocks
+ std::map< std::string, std::vector<Line> > blockdata; // Lines in blocks
bool in_entities_section = false;
bool in_blocks_section = false;
@@ -123,7 +124,8 @@ DxfData::DxfData(double fn, double fs, double fa,
for (int j = 0; j < 2; j++)
coords[i][j] = 0;
- typedef boost::unordered_map<std::string, int> EntityList;
+ //typedef boost::unordered_map<std::string, int> EntityList;
+ typedef std::map<std::string, int> EntityList;
EntityList unsupported_entities_list;
//
diff --git a/src/dxfdim.cc b/src/dxfdim.cc
index dfe8c13..6f1b0ab 100644
--- a/src/dxfdim.cc
+++ b/src/dxfdim.cc
@@ -36,9 +36,11 @@
#include <sstream>
#include <boost/filesystem.hpp>
-
-boost::unordered_map<std::string,Value> dxf_dim_cache;
-boost::unordered_map<std::string,Value> dxf_cross_cache;
+//boost::unordered_map<std::string,Value> dxf_dim_cache;
+//boost::unordered_map<std::string,Value> dxf_cross_cache;
+#include <map>
+std::map<std::string,Value> dxf_dim_cache;
+std::map<std::string,Value> dxf_cross_cache;
namespace fs = boost::filesystem;
Value builtin_dxf_dim(const Context *ctx, const std::vector<std::string> &argnames, const std::vector<Value> &args)
diff --git a/src/dxfdim.h b/src/dxfdim.h
index bd42109..5dc0ae0 100644
--- a/src/dxfdim.h
+++ b/src/dxfdim.h
@@ -1,10 +1,13 @@
#ifndef DXFDIM_H_
#define DXFDIM_H_
-#include <boost/unordered_map.hpp>
+//#include <boost/unordered_map.hpp>
+#include <map>
#include "value.h"
-extern boost::unordered_map<std::string,Value> dxf_dim_cache;
-extern boost::unordered_map<std::string,Value> dxf_cross_cache;
+//extern boost::unordered_map<std::string,Value> dxf_dim_cache;
+//extern boost::unordered_map<std::string,Value> dxf_cross_cache;
+extern std::map<std::string,Value> dxf_dim_cache;
+extern std::map<std::string,Value> dxf_cross_cache;
#endif
diff --git a/src/dxftess-cgal.cc b/src/dxftess-cgal.cc
index f221e3a..d19ef61 100644
--- a/src/dxftess-cgal.cc
+++ b/src/dxftess-cgal.cc
@@ -30,7 +30,8 @@ typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
typedef CDT::Vertex_handle Vertex_handle;
typedef CDT::Point CDTPoint;
-#include <boost/unordered_map.hpp>
+//#include <boost/unordered_map.hpp>
+#include <map>
template <class T> class DummyCriteria {
public:
@@ -71,8 +72,10 @@ struct point_info_t
typedef std::pair<point_info_t*,point_info_t*> edge_t;
void mark_inner_outer(std::vector<struct triangle> &tri, Grid2d<point_info_t> &point_info,
- boost::unordered_map<edge_t,int> &edge_to_triangle,
- boost::unordered_map<edge_t,int> &edge_to_path, int idx, bool inner)
+ std::map<edge_t,int> &edge_to_triangle,
+ std::map<edge_t,int> &edge_to_path, int idx, bool inner)
+// boost::unordered_map<edge_t,int> &edge_to_triangle,
+// boost::unordered_map<edge_t,int> &edge_to_path, int idx, bool inner)
{
if (tri[idx].is_marked)
return;
@@ -107,8 +110,10 @@ void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, bool up, bool /* do_tr
std::vector<struct triangle> tri;
Grid2d<point_info_t> point_info(GRID_FINE);
- boost::unordered_map<edge_t,int> edge_to_triangle;
- boost::unordered_map<edge_t,int> edge_to_path;
+// boost::unordered_map<edge_t,int> edge_to_triangle;
+// boost::unordered_map<edge_t,int> edge_to_path;
+ std::map<edge_t,int> edge_to_triangle;
+ std::map<edge_t,int> edge_to_path;
CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION);
try {
diff --git a/src/handle_dep.cc b/src/handle_dep.cc
index 2d6f3ff..0bebb70 100644
--- a/src/handle_dep.cc
+++ b/src/handle_dep.cc
@@ -8,8 +8,10 @@
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
#include "boosty.h"
+#include <set>
-boost::unordered_set<std::string> dependencies;
+//boost::unordered_set<std::string> dependencies;
+std::set<std::string> dependencies;
const char *make_command = NULL;
void handle_dep(const std::string &filename)
diff --git a/src/surface.cc b/src/surface.cc
index 2fa3717..eb6561e 100644
--- a/src/surface.cc
+++ b/src/surface.cc
@@ -42,6 +42,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/assign/std/vector.hpp>
using namespace boost::assign; // bring 'operator+=()' into scope
+#include <map>
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
@@ -110,7 +111,8 @@ PolySet *SurfaceNode::evaluate_polyset(class PolySetEvaluator *) const
PolySet *p = new PolySet();
int lines = 0, columns = 0;
- boost::unordered_map<std::pair<int,int>,double> data;
+ //boost::unordered_map<std::pair<int,int>,double> data;
+ std::map<std::pair<int,int>,double> data;
double min_val = 0;
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc
index acc7c31..0ab9c0a 100644
--- a/tests/csgtestcore.cc
+++ b/tests/csgtestcore.cc
@@ -357,6 +357,13 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
Vector3d camerapos = center - radius*1.8*cameradir;
csgInfo.glview->setCamera(camerapos, center);
+#include <iostream>
+ if (csgInfo.background_chain)
+ std::cout << csgInfo.background_chain->dump( true ) << "\n";
+ if (csgInfo.root_chain)
+ std::cout << csgInfo.root_chain->dump( true ) << "\n";
+ if (csgInfo.highlights_chain)
+ std::cout << csgInfo.highlights_chain->dump( true ) << "\n";
OpenCSGRenderer opencsgRenderer(csgInfo.root_chain, csgInfo.highlights_chain, csgInfo.background_chain, csgInfo.glview->shaderinfo);
ThrownTogetherRenderer thrownTogetherRenderer(csgInfo.root_chain, csgInfo.highlights_chain, csgInfo.background_chain);
contact: Jan Huwald // Impressum