mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
Make sure we do not have a crash when model is very small - CURA-4431
This commit is contained in:
parent
c7ccc3c1b8
commit
216dcd33e0
2 changed files with 8 additions and 0 deletions
|
@ -46,6 +46,10 @@ class ShapeArray:
|
|||
# For one_at_a_time printing you need the convex hull head.
|
||||
hull_head_verts = node.callDecoration("getConvexHullHead") or hull_verts
|
||||
|
||||
# If a model is to small then it will not contain any points
|
||||
if not hull_verts.getPoints().any():
|
||||
return None, None
|
||||
|
||||
offset_verts = hull_head_verts.getMinkowskiHull(Polygon.approximatedCircle(min_offset))
|
||||
offset_points = copy.deepcopy(offset_verts._points) # x, y
|
||||
offset_points[:, 0] = numpy.add(offset_points[:, 0], -transform_x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue