diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-07 00:34:04 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-07 00:34:04 (GMT) |
commit | fe0f9dd7555dd05391c956c32e26bed7d5e51a2c (patch) | |
tree | 0bd9c515d5e2e5e9e8bd6b36ff16b517fa73e0c6 | |
parent | 2013390aa3d62f10e7d1a632893b5ed2a05cda61 (diff) |
bugfix: removed dubious code for auto-unioning every PolyNode, this caused a crash for illegal projections
-rw-r--r-- | src/CGALEvaluator.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index 0d46cd9..9c5a51e 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -231,34 +231,29 @@ Response CGALEvaluator::visit(State &state, const TransformNode &node) return ContinueTraversal; } -// FIXME: EvaluateNode: Union over children + some magic - Response CGALEvaluator::visit(State &state, const AbstractPolyNode &node) { if (state.isPrefix() && isCached(node)) return PruneTraversal; if (state.isPostfix()) { if (!isCached(node)) { - // First union all children - // FIXME: What does this actually achieve? kintel 20110906 - applyToChildren(node, CGE_UNION); - - // Then apply polyset operation + // Apply polyset operation PolySet *ps = node.evaluate_polyset(AbstractPolyNode::RENDER_CGAL, &this->psevaluator); + CGAL_Nef_polyhedron N; if (ps) { try { - CGAL_Nef_polyhedron N = evaluateCGALMesh(*ps); + N = evaluateCGALMesh(*ps); // print_messages_pop(); node.progress_report(); ps->unlink(); - const std::string &cacheid = this->tree.getString(node); - this->cache.insert(cacheid, N); } catch (...) { // Don't leak the PolySet on ProgressCancelException ps->unlink(); throw; } } + const std::string &cacheid = this->tree.getString(node); + this->cache.insert(cacheid, N); } addToParent(state, node); } |