chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3c35b3
)
Possible fix for #655
author
daid
<daid303@gmail.com>
Tue, 10 Dec 2013 13:33:16 +0000
(14:33 +0100)
committer
daid
<daid303@gmail.com>
Tue, 10 Dec 2013 13:33:16 +0000
(14:33 +0100)
Cura/util/polygon.py
patch
|
blob
|
history
diff --git
a/Cura/util/polygon.py
b/Cura/util/polygon.py
index 9b7a987bff89cbf5d2401202a676cf3131a46ab2..1eba59e951381da473a3e29b068e8386f3e8b758 100644
(file)
--- 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))