mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 20:55:59 +08:00
Merge branch '15.10' of https://github.com/Ultimaker/Cura into 15.10
This commit is contained in:
commit
a5aa71d5f8
@ -78,6 +78,9 @@ class CuraEngineBackend(Backend):
|
|||||||
|
|
||||||
self.backendConnected.connect(self._onBackendConnected)
|
self.backendConnected.connect(self._onBackendConnected)
|
||||||
|
|
||||||
|
## Get the command that is used to call the engine.
|
||||||
|
# This is usefull for debugging and used to actually start the engine
|
||||||
|
# \return list of commands and args / parameters.
|
||||||
def getEngineCommand(self):
|
def getEngineCommand(self):
|
||||||
return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", Resources.getPath(Resources.MachineDefinitions, "fdmprinter.json"), "-vv"]
|
return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", Resources.getPath(Resources.MachineDefinitions, "fdmprinter.json"), "-vv"]
|
||||||
|
|
||||||
@ -120,7 +123,7 @@ class CuraEngineBackend(Backend):
|
|||||||
pass
|
pass
|
||||||
self.slicingCancelled.emit()
|
self.slicingCancelled.emit()
|
||||||
return
|
return
|
||||||
|
Logger.log("d", "Preparing to send slice data to engine.")
|
||||||
object_groups = []
|
object_groups = []
|
||||||
if self._profile.getSettingValue("print_sequence") == "one_at_a_time":
|
if self._profile.getSettingValue("print_sequence") == "one_at_a_time":
|
||||||
for node in OneAtATimeIterator(self._scene.getRoot()):
|
for node in OneAtATimeIterator(self._scene.getRoot()):
|
||||||
@ -214,6 +217,7 @@ class CuraEngineBackend(Backend):
|
|||||||
self._handlePerObjectSettings(group[0], group_message)
|
self._handlePerObjectSettings(group[0], group_message)
|
||||||
|
|
||||||
self._scene.releaseLock()
|
self._scene.releaseLock()
|
||||||
|
Logger.log("d", "Sending data to engine for slicing.")
|
||||||
self._socket.sendMessage(slice_message)
|
self._socket.sendMessage(slice_message)
|
||||||
|
|
||||||
def _onSceneChanged(self, source):
|
def _onSceneChanged(self, source):
|
||||||
@ -225,7 +229,6 @@ class CuraEngineBackend(Backend):
|
|||||||
|
|
||||||
self._onChanged()
|
self._onChanged()
|
||||||
|
|
||||||
|
|
||||||
def _onActiveProfileChanged(self):
|
def _onActiveProfileChanged(self):
|
||||||
if self._profile:
|
if self._profile:
|
||||||
self._profile.settingValueChanged.disconnect(self._onSettingChanged)
|
self._profile.settingValueChanged.disconnect(self._onSettingChanged)
|
||||||
@ -310,10 +313,10 @@ class CuraEngineBackend(Backend):
|
|||||||
self._restart = False
|
self._restart = False
|
||||||
|
|
||||||
def _onToolOperationStarted(self, tool):
|
def _onToolOperationStarted(self, tool):
|
||||||
self._enabled = False
|
self._enabled = False # Do not reslice when a tool is doing it's 'thing'
|
||||||
|
|
||||||
def _onToolOperationStopped(self, tool):
|
def _onToolOperationStopped(self, tool):
|
||||||
self._enabled = True
|
self._enabled = True # Tool stop, start listening for changes again.
|
||||||
self._onChanged()
|
self._onChanged()
|
||||||
|
|
||||||
def _onActiveViewChanged(self):
|
def _onActiveViewChanged(self):
|
||||||
|
@ -217,7 +217,7 @@ class Polygon():
|
|||||||
elif self._type == self.SkirtType:
|
elif self._type == self.SkirtType:
|
||||||
return Color(0.0, 1.0, 1.0, 1.0)
|
return Color(0.0, 1.0, 1.0, 1.0)
|
||||||
elif self._type == self.InfillType:
|
elif self._type == self.InfillType:
|
||||||
return Color(1.0, 1.0, 0.0, 1.0)
|
return Color(1.0, 0.74, 0.0, 1.0)
|
||||||
elif self._type == self.SupportInfillType:
|
elif self._type == self.SupportInfillType:
|
||||||
return Color(0.0, 1.0, 1.0, 1.0)
|
return Color(0.0, 1.0, 1.0, 1.0)
|
||||||
else:
|
else:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
||||||
|
|
||||||
|
## Simple decorator to indicate a scene node holds layer data.
|
||||||
class LayerDataDecorator(SceneNodeDecorator):
|
class LayerDataDecorator(SceneNodeDecorator):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
from UM.Job import Job
|
from UM.Job import Job
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
|
|
||||||
|
|
||||||
class ProcessGCodeLayerJob(Job):
|
class ProcessGCodeLayerJob(Job):
|
||||||
def __init__(self, message):
|
def __init__(self, message):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
@ -273,6 +273,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||||||
else:
|
else:
|
||||||
if not self.setBaudRate(baud_rate):
|
if not self.setBaudRate(baud_rate):
|
||||||
continue # Could not set the baud rate, go to the next
|
continue # Could not set the baud rate, go to the next
|
||||||
|
Logger.log("d","Attempting to connect to printer with serial %s on baud rate %s", self._serial_port, baud_rate)
|
||||||
time.sleep(1.5) # Ensure that we are not talking to the bootloader. 1.5 sec seems to be the magic number
|
time.sleep(1.5) # Ensure that we are not talking to the bootloader. 1.5 sec seems to be the magic number
|
||||||
sucesfull_responses = 0
|
sucesfull_responses = 0
|
||||||
timeout_time = time.time() + 5
|
timeout_time = time.time() + 5
|
||||||
@ -609,7 +610,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||||||
## Create a list of baud rates at which we can communicate.
|
## Create a list of baud rates at which we can communicate.
|
||||||
# \return list of int
|
# \return list of int
|
||||||
def _getBaudrateList(self):
|
def _getBaudrateList(self):
|
||||||
ret = [250000, 230400, 115200, 57600, 38400, 19200, 9600]
|
ret = [115200, 250000, 230400, 57600, 38400, 19200, 9600]
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def _onFirmwareUpdateComplete(self):
|
def _onFirmwareUpdateComplete(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user