Prevent crash when requested polygon is too large

CURA-6P
This commit is contained in:
Jaime van Kessel 2020-06-19 16:59:27 +02:00
parent 5e921698b2
commit 61def4ba25
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -80,8 +80,11 @@ class Arrange:
# After scaling (like up to 0.1 mm) the node might not have points
if not points.size:
continue
shape_arr = ShapeArray.fromPolygon(points, scale = scale)
try:
shape_arr = ShapeArray.fromPolygon(points, scale = scale)
except ValueError:
Logger.logException("w", "Unable to create polygon")
continue
arranger.place(0, 0, shape_arr)
# If a build volume was set, add the disallowed areas