From 6f5fe9dff6f3fd29546d46e5a67ef40ec285dcc6 Mon Sep 17 00:00:00 2001 From: daid Date: Tue, 10 Dec 2013 14:33:16 +0100 Subject: [PATCH] Possible fix for #655 --- Cura/util/polygon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) -- 2.30.2