Implemented intersection_for

customizer
Marius Kintel 2013-12-25 14:47:54 -05:00
parent 1f0705f8a0
commit 7b31827fe3
1 changed files with 12 additions and 1 deletions

View File

@ -1087,5 +1087,16 @@ Response GeometryEvaluator::visit(State &state, const RenderNode &node)
Response GeometryEvaluator::visit(State &state, const AbstractIntersectionNode &node)
{
assert(false);
if (state.isPrefix() && isCached(node)) return PruneTraversal;
if (state.isPostfix()) {
shared_ptr<const class Geometry> geom;
if (!isCached(node)) {
geom = applyToChildren(node, OPENSCAD_INTERSECTION).constptr();
}
else {
geom = GeometryCache::instance()->get(this->tree.getIdString(node));
}
addToParent(state, node, geom);
}
return ContinueTraversal;
}