diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index b53737cc80..04a46ecaca 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -25,9 +25,9 @@ class ConvexHullDecorator(SceneNodeDecorator): self._convex_hull_job = None self._profile = None - Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) - Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineInstanceChanged) - self._onActiveProfileChanged() + #Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged) + #Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineInstanceChanged) + #self._onActiveProfileChanged() ## Force that a new (empty) object is created upon copy. def __deepcopy__(self, memo): diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index 9fb18981d3..7e814af7d7 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -59,12 +59,12 @@ class ConvexHullJob(Job): # This is done because of rounding errors. hull = hull.getMinkowskiHull(Polygon(numpy.array([[-0.5, -0.5], [-0.5, 0.5], [0.5, 0.5], [0.5, -0.5]], numpy.float32))) - profile = Application.getInstance().getMachineManager().getWorkingProfile() - if profile: - if profile.getSettingValue("print_sequence") == "one_at_a_time" and not self._node.getParent().callDecoration("isGroup"): + global_stack = Application.getInstance().getGlobalContainerStack() + if global_stack: + if global_stack.getProperty("print_sequence", "value")== "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_and_fans = Polygon(numpy.array(profile.getSettingValue("machine_head_with_fans_polygon"), numpy.float32)) + head_and_fans = Polygon(numpy.array(global_stack.getProperty("machine_head_with_fans_polygon", "value"), numpy.float32)) # Full head hull is used to actually check the order. full_head_hull = hull.getMinkowskiHull(head_and_fans) @@ -77,7 +77,7 @@ class ConvexHullJob(Job): # Min head hull is used for the push free min_head_hull = hull.getMinkowskiHull(head_and_fans) self._node.callDecoration("setConvexHullHead", min_head_hull) - hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_polygon"),numpy.float32))) + hull = hull.getMinkowskiHull(Polygon(numpy.array(global_stack.getProperty("machine_head_polygon","value"),numpy.float32))) else: self._node.callDecoration("setConvexHullHead", None) if self._node.getParent() is None: # Node was already deleted before job is done. diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 5102427823..a57aa01ba9 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -134,14 +134,15 @@ class CuraEngineBackend(Backend): self._process_layers_job.abort() self._process_layers_job = None - if self._profile.hasErrorValue(): - Logger.log("w", "Profile has error values. Aborting slicing") - if self._message: - self._message.hide() - self._message = None - self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) - self._message.show() - return #No slicing if we have error values since those are by definition illegal values. + #TODO: Re-add don't slice with error stuff. + #if self._profile.hasErrorValue(): + # Logger.log("w", "Profile has error values. Aborting slicing") + # if self._message: + # self._message.hide() + # self._message = None + # self._message = Message(catalog.i18nc("@info:status", "Unable to slice. Please check your setting values for errors.")) + # self._message.show() + # return #No slicing if we have error values since those are by definition illegal values. self.processingProgress.emit(0.0) self.backendStateChange.emit(BackendState.NOT_STARTED) @@ -265,9 +266,6 @@ class CuraEngineBackend(Backend): self._change_timer.start() def _onChanged(self): - if not self._profile: - return - self._change_timer.start() def _onBackendConnected(self):