From b8bbd6f842a72729e8372e72b87d392eece72c92 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 19 Aug 2014 13:13:20 -0400 Subject: [PATCH] The minkowski module needs to pass on any given convexity value. Fixes #911 --- src/GeometryEvaluator.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/GeometryEvaluator.cc b/src/GeometryEvaluator.cc index 73848bcf..58298ac8 100644 --- a/src/GeometryEvaluator.cc +++ b/src/GeometryEvaluator.cc @@ -948,7 +948,17 @@ Response GeometryEvaluator::visit(State &state, const CgaladvNode &node) if (!isSmartCached(node)) { switch (node.type) { case MINKOWSKI: { - geom = applyToChildren(node, OPENSCAD_MINKOWSKI).constptr(); + ResultObject res = applyToChildren(node, OPENSCAD_MINKOWSKI); + geom = res.constptr(); + // If we added convexity, we need to pass it on + if (geom && geom->getConvexity() != node.convexity) { + shared_ptr editablegeom; + // If we got a const object, make a copy + if (res.isConst()) editablegeom.reset(geom->copy()); + else editablegeom = res.ptr(); + geom = editablegeom; + editablegeom->setConvexity(node.convexity); + } break; } case HULL: {