From d45c0aaec15c4baf9e903e9fe3402d1c55d36cc5 Mon Sep 17 00:00:00 2001 From: daid Date: Sat, 28 Dec 2013 14:18:13 +0100 Subject: [PATCH] Fix the bug of loading very small objects. --- 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 1eba59e9..8772139f 100644 --- a/Cura/util/polygon.py +++ b/Cura/util/polygon.py @@ -18,8 +18,10 @@ def convexHull(pointList): points = unique.keys() points.sort() + if len(points) < 1: + return numpy.zeros((0, 2), numpy.float32) if len(points) < 2: - return numpy.array([], numpy.float32) + return numpy.array(points, numpy.float32) # Build upper half of the hull. upper = [points[0], points[1]] -- 2.30.2