summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nodedumper.cc4
-rw-r--r--src/nodedumper.h1
-rw-r--r--src/openscad.cc12
3 files changed, 5 insertions, 12 deletions
diff --git a/src/nodedumper.cc b/src/nodedumper.cc
index 66a8406..0e66e5b 100644
--- a/src/nodedumper.cc
+++ b/src/nodedumper.cc
@@ -86,6 +86,10 @@ const string &NodeDumper::getDump() const
return this->cache[*this->root];
}
+/*!
+ Adds this given node to its parent's child list.
+ Should be called for all nodes, including leaf nodes.
+*/
void NodeDumper::handleVisitedChildren(const State &state, const AbstractNode &node)
{
if (state.isPostfix()) {
diff --git a/src/nodedumper.h b/src/nodedumper.h
index ac965ca..a28b8ad 100644
--- a/src/nodedumper.h
+++ b/src/nodedumper.h
@@ -20,6 +20,7 @@ public:
virtual Response visit(const State &state, const AbstractNode &node);
const string &getDump() const;
+ const NodeCache<string> &getCache() const { return this->cache; }
private:
void handleVisitedChildren(const State &state, const AbstractNode &node);
bool isCached(const AbstractNode &node);
diff --git a/src/openscad.cc b/src/openscad.cc
index fdd2502..86dce1b 100644
--- a/src/openscad.cc
+++ b/src/openscad.cc
@@ -285,18 +285,6 @@ int main(int argc, char **argv)
AbstractNode::resetIndexCounter();
root_node = root_module->evaluate(&root_ctx, &root_inst);
- NodeDumper dumper;
- Traverser trav(dumper, *root_node, Traverser::PRE_AND_POSTFIX);
- trav.execute();
-// std::cout << dumper.getDump();
-// std::cout << std::endl;
-// trav.execute();
-// std::cout << dumper.getDump();
-// std::cout << std::endl;
- printf(dumper.getDump().c_str());
- exit(1);
-
-
CGAL_Nef_polyhedron *root_N;
root_N = new CGAL_Nef_polyhedron(root_node->renderCSGMesh());
contact: Jan Huwald // Impressum