Merge branch 'master' into issue527

customizer
Marius Kintel 2014-01-13 23:08:56 -05:00
commit 0f2853895a
6 changed files with 18 additions and 6 deletions

View File

@ -109,7 +109,7 @@ static shared_ptr<CSGTerm> evaluate_csg_term_from_geometry(const State &state,
Response CSGTermEvaluator::visit(State &state, const AbstractPolyNode &node)
{
if (state.isPrefix()) {
if (state.isPostfix()) {
shared_ptr<CSGTerm> t1;
if (this->geomevaluator) {
shared_ptr<const Geometry> geom = this->geomevaluator->evaluateGeometry(node, false);
@ -120,7 +120,7 @@ Response CSGTermEvaluator::visit(State &state, const AbstractPolyNode &node)
this->stored_term[node.index()] = t1;
addToParent(state, node);
}
return PruneTraversal;
return ContinueTraversal;
}
Response CSGTermEvaluator::visit(State &state, const CsgNode &node)
@ -173,7 +173,7 @@ Response CSGTermEvaluator::visit(State &state, const ColorNode &node)
// FIXME: If we've got CGAL support, render this node as a CGAL union into a PolySet
Response CSGTermEvaluator::visit(State &state, const RenderNode &node)
{
if (state.isPrefix()) {
if (state.isPostfix()) {
shared_ptr<CSGTerm> t1;
shared_ptr<const Geometry> geom;
if (this->geomevaluator) {
@ -185,12 +185,12 @@ Response CSGTermEvaluator::visit(State &state, const RenderNode &node)
this->stored_term[node.index()] = t1;
addToParent(state, node);
}
return PruneTraversal;
return ContinueTraversal;
}
Response CSGTermEvaluator::visit(State &state, const CgaladvNode &node)
{
if (state.isPrefix()) {
if (state.isPostfix()) {
shared_ptr<CSGTerm> t1;
// FIXME: Calling evaluator directly since we're not a PolyNode. Generalize this.
shared_ptr<const Geometry> geom;
@ -203,7 +203,7 @@ Response CSGTermEvaluator::visit(State &state, const CgaladvNode &node)
this->stored_term[node.index()] = t1;
addToParent(state, node);
}
return PruneTraversal;
return ContinueTraversal;
}
/*!

View File

@ -8,3 +8,9 @@ difference() {
color("green") cube([10,4,10], center=true);
color("red") translate([0,-2,0]) sphere(3);
}
// Test modifiers work with minkowski children
translate([25,0,0]) minkowski() {
%cube(10, center=true);
cube(5, center=true);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -18,4 +18,10 @@ group() {
}
}
}
multmatrix([[1, 0, 0, 25], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
minkowski(convexity = 0) {
%cube(size = [10, 10, 10], center = true);
cube(size = [5, 5, 5], center = true);
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB