From: daid Date: Tue, 10 Dec 2013 13:33:16 +0000 (+0100) Subject: Possible fix for #655 X-Git-Tag: 14.01~29 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=cura.git;a=commitdiff_plain;h=6f5fe9dff6f3fd29546d46e5a67ef40ec285dcc6 Possible fix for #655 --- diff --git a/Cura/util/polygon.py b/Cura/util/polygon.py index 9b7a987b..1eba59e9 100644 --- a/Cura/util/polygon.py +++ b/Cura/util/polygon.py @@ -18,6 +18,8 @@ def convexHull(pointList): points = unique.keys() points.sort() + if len(points) < 2: + return numpy.array([], numpy.float32) # Build upper half of the hull. upper = [points[0], points[1]] @@ -38,7 +40,7 @@ def convexHull(pointList): del lower[0] del lower[-1] - return numpy.array(upper + lower, numpy.float32) - numpy.array([0.0,0.0], numpy.float32) + return numpy.array(upper + lower, numpy.float32) def minkowskiHull(a, b): points = numpy.zeros((len(a) * len(b), 2))