From b2945cc71421da7acc34da35234dec5dec28bbaf Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 25 Nov 2013 21:17:32 -0500 Subject: [PATCH] bugfix: don't insert Nef polyhedrons into the GeometryCache as it will compete with PolySets needed for OpenCSG rendering --- src/GeometryEvaluator.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GeometryEvaluator.cc b/src/GeometryEvaluator.cc index 6df55b98..e863b06c 100644 --- a/src/GeometryEvaluator.cc +++ b/src/GeometryEvaluator.cc @@ -2,6 +2,7 @@ #include "traverser.h" #include "tree.h" #include "GeometryCache.h" +#include "CGALCache.h" #include "Polygon2d.h" #include "module.h" #include "state.h" @@ -110,8 +111,8 @@ Geometry *GeometryEvaluator::applyToChildren3D(const AbstractNode &node, OpenSCA // a node is a valid object. If we inserted as we created them, the // cache could have been modified before we reach this point due to a large // sibling object. - if (!isCached(*chnode)) { - GeometryCache::instance()->insert(this->tree.getIdString(*chnode), chN); + if (!CGALCache::instance()->contains(this->tree.getIdString(*chnode))) { + CGALCache::instance()->insert(this->tree.getIdString(*chnode), *chN); } if (chgeom) { @@ -714,7 +715,6 @@ Response GeometryEvaluator::visit(State &state, const CgaladvNode &node) // } // else { CGAL_Nef_polyhedron N = this->cgalevaluator->evaluateCGALMesh(node); - CGALCache::instance()->insert(this->tree.getIdString(node), N); PolySet *ps = N.isNull() ? NULL : N.convertToPolyset(); geom.reset(ps); // }