Don't convert empty clipper result to Polygon2d

customizer
Marius Kintel 2013-12-02 01:59:18 -05:00
parent 1f488f851d
commit 43e1a27ff3
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);