Просмотр исходного кода

ConvexHull decorater no longer crashes if node has no MeshData

Fixes CURA-2706
Jaime van Kessel 8 лет назад
Родитель
Сommit
cc549932c4
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      cura/ConvexHullDecorator.py

+ 2 - 0
cura/ConvexHullDecorator.py

@@ -200,6 +200,8 @@ class ConvexHullDecorator(SceneNodeDecorator):
                     if len(vertex_data) >= 4:
                         convex_hull = hull.getConvexHull()
                         offset_hull = self._offsetHull(convex_hull)
+            else:
+                return Polygon([])  # Node has no mesh data, so just return an empty Polygon.
 
             # Store the result in the cache
             self._2d_convex_hull_mesh = mesh