diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index f858d142d4..b0fb94a15f 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -48,12 +48,13 @@ class ConvexHullJob(Job): hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32))) profile = Application.getInstance().getMachineManager().getActiveProfile() - if profile.getSettingValue("print_sequence") == "one_at_a_time" and not self._node.getParent().callDecoration("isGroup"): - # Printing one at a time and it's not an object in a group - self._node.callDecoration("setConvexHullBoundary", copy.deepcopy(hull)) - head_hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_with_fans_polygon"),numpy.float32))) - self._node.callDecoration("setConvexHullHead", head_hull) - hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_polygon"),numpy.float32))) + if profile: + if profile.getSettingValue("print_sequence") == "one_at_a_time" and not self._node.getParent().callDecoration("isGroup"): + # Printing one at a time and it's not an object in a group + self._node.callDecoration("setConvexHullBoundary", copy.deepcopy(hull)) + head_hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_with_fans_polygon"),numpy.float32))) + self._node.callDecoration("setConvexHullHead", head_hull) + hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_polygon"),numpy.float32))) hull_node = ConvexHullNode.ConvexHullNode(self._node, hull, Application.getInstance().getController().getScene().getRoot()) self._node.callDecoration("setConvexHullNode", hull_node) self._node.callDecoration("setConvexHull", hull)