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:
e41c4df
)
Fix the bug of loading very small objects.
author
daid
<daid303@gmail.com>
Sat, 28 Dec 2013 13:18:13 +0000
(14:18 +0100)
committer
daid
<daid303@gmail.com>
Sat, 28 Dec 2013 13:18:13 +0000
(14:18 +0100)
Cura/util/polygon.py
patch
|
blob
|
history
diff --git
a/Cura/util/polygon.py
b/Cura/util/polygon.py
index 1eba59e951381da473a3e29b068e8386f3e8b758..8772139f54eb28a52f515a65151c263a7e7a56ae 100644
(file)
--- 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]]