mirror of https://github.com/vitalif/openscad
bugfix: don't insert Nef polyhedrons into the GeometryCache as it will compete with PolySets needed for OpenCSG rendering
parent
af59b1983c
commit
b2945cc714
|
@ -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);
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue