summaryrefslogtreecommitdiff
path: root/src/CGALEvaluator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/CGALEvaluator.cc')
-rw-r--r--src/CGALEvaluator.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc
index 88d1f00..9528db6 100644
--- a/src/CGALEvaluator.cc
+++ b/src/CGALEvaluator.cc
@@ -42,6 +42,12 @@ CGAL_Nef_polyhedron CGALEvaluator::evaluateCGALMesh(const AbstractNode &node)
if (!isCached(node)) {
Traverser evaluate(*this, node, Traverser::PRE_AND_POSTFIX);
evaluate.execute();
+ // FIXME: If the root node didn't fit into the cache, the following assert
+ // will fail. We should handle this differently:
+ // 1) Return a NULL polyhedron, so the caller knows what happens
+ // 2) Return the polyhedron in a reference parameter and return a status code
+ // explicitly telling the caller what happened
+ // 3) Somehow ask the user to increase cache size and continue processing
assert(isCached(node));
}
return CGALCache::instance()->get(this->tree.getIdString(node));
@@ -354,6 +360,9 @@ void CGALEvaluator::addToParent(const State &state, const AbstractNode &node, co
// Root node, insert into cache
if (!isCached(node)) {
CGALCache::instance()->insert(this->tree.getIdString(node), N);
+ // FIXME: If the root node didn't fit into the cache, the following assert
+ // will fail. See evaluateCGALMesh(const AbstractNode &node)
+ assert(isCached(node));
}
}
}
contact: Jan Huwald // Impressum