Don't convert empty clipper result to Polygon2d

527olive
Marius Kintel 2013-12-02 01:59:18 -05:00
parent 6298ccd188
commit 05e7f63ffc
1 changed files with 1 additions and 1 deletions

View File

@ -887,7 +887,7 @@ Response GeometryEvaluator::visit(State &state, const ProjectionNode &node)
// This is key - without StrictlySimple, we tend to get self-intersecting results
sumclipper.StrictlySimple(true);
sumclipper.Execute(ClipperLib::ctUnion, sumresult, ClipperLib::pftNonZero, ClipperLib::pftNonZero);
geom.reset(ClipperUtils::toPolygon2d(sumresult));
if (sumresult.size() > 0) geom.reset(ClipperUtils::toPolygon2d(sumresult));
}
else {
const Geometry *geometry = applyToChildren3D(node, OPENSCAD_UNION);