Translate tool is now no longer stopped by ton of errors

CURA-1278
This commit is contained in:
Jaime van Kessel 2016-05-20 14:09:58 +02:00
parent 305cb27ac0
commit 295cea338c
3 changed files with 17 additions and 19 deletions

View file

@ -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):

View file

@ -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.

View file

@ -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):