mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 18:55:59 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
ce5f435be9
@ -435,6 +435,7 @@ class CuraApplication(QtApplication):
|
|||||||
self.__single_instance_server = QLocalServer()
|
self.__single_instance_server = QLocalServer()
|
||||||
self.__single_instance_server.newConnection.connect(self._singleInstanceServerNewConnection)
|
self.__single_instance_server.newConnection.connect(self._singleInstanceServerNewConnection)
|
||||||
self.__single_instance_server.listen("ultimaker-cura")
|
self.__single_instance_server.listen("ultimaker-cura")
|
||||||
|
Logger.log("d","Single-instance: Listening on: " + repr(self.__single_instance_server.fullServerName()))
|
||||||
|
|
||||||
def _singleInstanceServerNewConnection(self):
|
def _singleInstanceServerNewConnection(self):
|
||||||
Logger.log("i", "New connection recevied on our single-instance server")
|
Logger.log("i", "New connection recevied on our single-instance server")
|
||||||
@ -442,9 +443,11 @@ class CuraApplication(QtApplication):
|
|||||||
|
|
||||||
if remote_cura_connection is not None:
|
if remote_cura_connection is not None:
|
||||||
def readCommands():
|
def readCommands():
|
||||||
|
Logger.log("d", "Single-instance: readCommands()")
|
||||||
line = remote_cura_connection.readLine()
|
line = remote_cura_connection.readLine()
|
||||||
while len(line) != 0: # There is also a .canReadLine()
|
while len(line) != 0: # There is also a .canReadLine()
|
||||||
try:
|
try:
|
||||||
|
Logger.log("d", "Single-instance: Read command line: " + repr(line))
|
||||||
payload = json.loads(str(line, encoding="ASCII").strip())
|
payload = json.loads(str(line, encoding="ASCII").strip())
|
||||||
command = payload["command"]
|
command = payload["command"]
|
||||||
|
|
||||||
@ -464,6 +467,10 @@ class CuraApplication(QtApplication):
|
|||||||
# 'alert' or flashing the icon in the taskbar is the best thing we do now.
|
# 'alert' or flashing the icon in the taskbar is the best thing we do now.
|
||||||
self.getMainWindow().alert(0)
|
self.getMainWindow().alert(0)
|
||||||
|
|
||||||
|
# Command: Close the socket connection. We're done.
|
||||||
|
elif command == "close-connection":
|
||||||
|
remote_cura_connection.close()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "Received an unrecognized command " + str(command))
|
Logger.log("w", "Received an unrecognized command " + str(command))
|
||||||
except json.decoder.JSONDecodeError as ex:
|
except json.decoder.JSONDecodeError as ex:
|
||||||
@ -471,7 +478,11 @@ class CuraApplication(QtApplication):
|
|||||||
line = remote_cura_connection.readLine()
|
line = remote_cura_connection.readLine()
|
||||||
|
|
||||||
remote_cura_connection.readyRead.connect(readCommands)
|
remote_cura_connection.readyRead.connect(readCommands)
|
||||||
remote_cura_connection.disconnected.connect(readCommands) # Get any last commands before it is destroyed.
|
def disconnected():
|
||||||
|
Logger.log("d", "Single-instance: Disconnected")
|
||||||
|
readCommands()
|
||||||
|
Logger.log("d", "Single-instance: Finished disconnected")
|
||||||
|
remote_cura_connection.disconnected.connect(disconnected) # Get any last commands before it is destroyed.
|
||||||
|
|
||||||
## Perform any checks before creating the main application.
|
## Perform any checks before creating the main application.
|
||||||
#
|
#
|
||||||
@ -487,6 +498,7 @@ class CuraApplication(QtApplication):
|
|||||||
if "single_instance" in parsed_command_line and parsed_command_line["single_instance"]:
|
if "single_instance" in parsed_command_line and parsed_command_line["single_instance"]:
|
||||||
Logger.log("i", "Checking for the presence of an ready running Cura instance.")
|
Logger.log("i", "Checking for the presence of an ready running Cura instance.")
|
||||||
single_instance_socket = QLocalSocket()
|
single_instance_socket = QLocalSocket()
|
||||||
|
Logger.log("d", "preStartUp(): full server name: " + single_instance_socket.fullServerName())
|
||||||
single_instance_socket.connectToServer("ultimaker-cura")
|
single_instance_socket.connectToServer("ultimaker-cura")
|
||||||
single_instance_socket.waitForConnected()
|
single_instance_socket.waitForConnected()
|
||||||
if single_instance_socket.state() == QLocalSocket.ConnectedState:
|
if single_instance_socket.state() == QLocalSocket.ConnectedState:
|
||||||
@ -506,8 +518,12 @@ class CuraApplication(QtApplication):
|
|||||||
for filename in parsed_command_line["file"]:
|
for filename in parsed_command_line["file"]:
|
||||||
payload = {"command": "open", "filePath": filename}
|
payload = {"command": "open", "filePath": filename}
|
||||||
single_instance_socket.write(bytes(json.dumps(payload) + "\n", encoding="ASCII"))
|
single_instance_socket.write(bytes(json.dumps(payload) + "\n", encoding="ASCII"))
|
||||||
|
|
||||||
|
payload = {"command": "close-connection"}
|
||||||
|
single_instance_socket.write(bytes(json.dumps(payload) + "\n", encoding="ASCII"))
|
||||||
|
|
||||||
single_instance_socket.flush()
|
single_instance_socket.flush()
|
||||||
single_instance_socket.close()
|
single_instance_socket.waitForDisconnected()
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if only_list_usb:
|
if only_list_usb:
|
||||||
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*")
|
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*") + glob.glob("/dev/tty.wchusb*") + glob.glob("/dev/cu.wchusb*")
|
||||||
base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list
|
base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list
|
||||||
else:
|
else:
|
||||||
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.*") + glob.glob("/dev/tty.usb*") + glob.glob("/dev/rfcomm*") + glob.glob("/dev/serial/by-id/*")
|
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.*") + glob.glob("/dev/tty.usb*") + glob.glob("/dev/rfcomm*") + glob.glob("/dev/serial/by-id/*")
|
||||||
|
@ -18,7 +18,7 @@ material_final_print_temperature = =material_print_temperature - 10
|
|||||||
prime_tower_size = 16
|
prime_tower_size = 16
|
||||||
skin_overlap = 20
|
skin_overlap = 20
|
||||||
speed_print = 60
|
speed_print = 60
|
||||||
speed_layer_0 = =round(speed_print * 30 / 60)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 35 / 60)
|
speed_topbottom = =math.ceil(speed_print * 35 / 60)
|
||||||
speed_wall = =math.ceil(speed_print * 45 / 60)
|
speed_wall = =math.ceil(speed_print * 45 / 60)
|
||||||
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
|
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
|
||||||
|
@ -19,7 +19,7 @@ material_final_print_temperature = =material_print_temperature - 10
|
|||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_size = 16
|
prime_tower_size = 16
|
||||||
speed_print = 60
|
speed_print = 60
|
||||||
speed_layer_0 = =round(speed_print * 30 / 60)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 30 / 60)
|
speed_topbottom = =math.ceil(speed_print * 30 / 60)
|
||||||
speed_wall = =math.ceil(speed_print * 40 / 60)
|
speed_wall = =math.ceil(speed_print * 40 / 60)
|
||||||
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
|
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
|
||||||
|
@ -19,7 +19,7 @@ material_initial_print_temperature = =material_print_temperature - 5
|
|||||||
material_final_print_temperature = =material_print_temperature - 10
|
material_final_print_temperature = =material_print_temperature - 10
|
||||||
prime_tower_size = 16
|
prime_tower_size = 16
|
||||||
speed_print = 50
|
speed_print = 50
|
||||||
speed_layer_0 = =round(speed_print * 30 / 50)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 30 / 50)
|
speed_topbottom = =math.ceil(speed_print * 30 / 50)
|
||||||
speed_wall = =math.ceil(speed_print * 30 / 50)
|
speed_wall = =math.ceil(speed_print * 30 / 50)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ material_final_print_temperature = =material_print_temperature - 10
|
|||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_size = 16
|
prime_tower_size = 16
|
||||||
speed_print = 55
|
speed_print = 55
|
||||||
speed_layer_0 = =round(speed_print * 30 / 55)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 30 / 55)
|
speed_topbottom = =math.ceil(speed_print * 30 / 55)
|
||||||
speed_wall = =math.ceil(speed_print * 30 / 55)
|
speed_wall = =math.ceil(speed_print * 30 / 55)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ material_standby_temperature = 100
|
|||||||
prime_tower_size = 17
|
prime_tower_size = 17
|
||||||
skin_overlap = 20
|
skin_overlap = 20
|
||||||
speed_print = 60
|
speed_print = 60
|
||||||
speed_layer_0 = =round(speed_print * 30 / 60)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 35 / 60)
|
speed_topbottom = =math.ceil(speed_print * 35 / 60)
|
||||||
speed_wall = =math.ceil(speed_print * 45 / 60)
|
speed_wall = =math.ceil(speed_print * 45 / 60)
|
||||||
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
|
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
|
||||||
|
@ -17,7 +17,7 @@ material_final_print_temperature = =material_print_temperature - 10
|
|||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_size = 17
|
prime_tower_size = 17
|
||||||
speed_print = 60
|
speed_print = 60
|
||||||
speed_layer_0 = =round(speed_print * 30 / 60)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 30 / 60)
|
speed_topbottom = =math.ceil(speed_print * 30 / 60)
|
||||||
speed_wall = =math.ceil(speed_print * 40 / 60)
|
speed_wall = =math.ceil(speed_print * 40 / 60)
|
||||||
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
|
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
|
||||||
|
@ -19,7 +19,7 @@ material_final_print_temperature = =material_print_temperature - 10
|
|||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_size = 17
|
prime_tower_size = 17
|
||||||
speed_print = 50
|
speed_print = 50
|
||||||
speed_layer_0 = =round(speed_print * 30 / 50)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 30 / 50)
|
speed_topbottom = =math.ceil(speed_print * 30 / 50)
|
||||||
speed_wall = =math.ceil(speed_print * 30 / 50)
|
speed_wall = =math.ceil(speed_print * 30 / 50)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ material_final_print_temperature = =material_print_temperature - 10
|
|||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_size = 17
|
prime_tower_size = 17
|
||||||
speed_print = 55
|
speed_print = 55
|
||||||
speed_layer_0 = =round(speed_print * 30 / 55)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 30 / 55)
|
speed_topbottom = =math.ceil(speed_print * 30 / 55)
|
||||||
speed_wall = =math.ceil(speed_print * 30 / 55)
|
speed_wall = =math.ceil(speed_print * 30 / 55)
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ material_print_temperature = =default_material_print_temperature + 5
|
|||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_enable = False
|
prime_tower_enable = False
|
||||||
skin_overlap = 20
|
skin_overlap = 20
|
||||||
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 35 / 70)
|
speed_topbottom = =math.ceil(speed_print * 35 / 70)
|
||||||
speed_wall = =math.ceil(speed_print * 50 / 70)
|
speed_wall = =math.ceil(speed_print * 50 / 70)
|
||||||
speed_wall_0 = =math.ceil(speed_wall * 35 / 50)
|
speed_wall_0 = =math.ceil(speed_wall * 35 / 50)
|
||||||
|
@ -17,7 +17,7 @@ machine_nozzle_heat_up_speed = 1.6
|
|||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_enable = False
|
prime_tower_enable = False
|
||||||
speed_print = 80
|
speed_print = 80
|
||||||
speed_layer_0 = =round(speed_print * 30 / 80)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 30 / 80)
|
speed_topbottom = =math.ceil(speed_print * 30 / 80)
|
||||||
speed_wall = =math.ceil(speed_print * 40 / 80)
|
speed_wall = =math.ceil(speed_print * 40 / 80)
|
||||||
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
|
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
|
||||||
|
@ -20,7 +20,7 @@ material_standby_temperature = 100
|
|||||||
prime_tower_enable = False
|
prime_tower_enable = False
|
||||||
skin_overlap = 10
|
skin_overlap = 10
|
||||||
speed_print = 60
|
speed_print = 60
|
||||||
speed_layer_0 = =round(speed_print * 30 / 60)
|
speed_layer_0 = 20
|
||||||
speed_topbottom = =math.ceil(speed_print * 30 / 60)
|
speed_topbottom = =math.ceil(speed_print * 30 / 60)
|
||||||
speed_wall = =math.ceil(speed_print * 30 / 60)
|
speed_wall = =math.ceil(speed_print * 30 / 60)
|
||||||
top_bottom_thickness = 1
|
top_bottom_thickness = 1
|
||||||
|
@ -18,6 +18,7 @@ machine_nozzle_heat_up_speed = 1.6
|
|||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_enable = False
|
prime_tower_enable = False
|
||||||
skin_overlap = 10
|
skin_overlap = 10
|
||||||
|
speed_layer_0 = 20
|
||||||
top_bottom_thickness = 1
|
top_bottom_thickness = 1
|
||||||
wall_thickness = 1
|
wall_thickness = 1
|
||||||
|
|
||||||
|
@ -12,13 +12,15 @@ material = generic_pva_ultimaker3_BB_0.4
|
|||||||
[values]
|
[values]
|
||||||
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
|
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
|
||||||
acceleration_support_infill = =acceleration_support
|
acceleration_support_infill = =acceleration_support
|
||||||
acceleration_support_interface = =acceleration_support
|
|
||||||
jerk_support = =math.ceil(jerk_print * 5 / 25)
|
jerk_support = =math.ceil(jerk_print * 5 / 25)
|
||||||
jerk_support_infill = =jerk_support
|
jerk_support_infill = =jerk_support
|
||||||
jerk_support_interface = =jerk_support
|
|
||||||
material_print_temperature = =default_material_print_temperature + 10
|
material_print_temperature = =default_material_print_temperature + 10
|
||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
skin_overlap = 20
|
skin_overlap = 20
|
||||||
support_interface_height = 0.8
|
support_interface_height = 0.8
|
||||||
prime_tower_enable = False
|
prime_tower_enable = False
|
||||||
|
speed_support_interface = =math.ceil(speed_support * 20 / 25)
|
||||||
|
jerk_support_interface = =math.ceil(jerk_support * 1 / 5)
|
||||||
|
acceleration_support_interface = =math.ceil(acceleration_support * 100 / 500 )
|
||||||
|
support_xy_distance = =round(line_width * 1.5, 2)
|
||||||
|
|
||||||
|
@ -12,13 +12,14 @@ material = generic_pva_ultimaker3_BB_0.4
|
|||||||
[values]
|
[values]
|
||||||
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
|
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
|
||||||
acceleration_support_infill = =acceleration_support
|
acceleration_support_infill = =acceleration_support
|
||||||
acceleration_support_interface = =acceleration_support
|
|
||||||
jerk_support = =math.ceil(jerk_print * 5 / 25)
|
jerk_support = =math.ceil(jerk_print * 5 / 25)
|
||||||
jerk_support_infill = =jerk_support
|
jerk_support_infill = =jerk_support
|
||||||
jerk_support_interface = =jerk_support
|
|
||||||
material_print_temperature = =default_material_print_temperature + 5
|
material_print_temperature = =default_material_print_temperature + 5
|
||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
skin_overlap = 15
|
skin_overlap = 15
|
||||||
support_interface_height = 0.8
|
support_interface_height = 0.8
|
||||||
prime_tower_enable = False
|
prime_tower_enable = False
|
||||||
|
speed_support_interface = =math.ceil(speed_support * 20 / 25)
|
||||||
|
jerk_support_interface = =math.ceil(jerk_support * 1 / 5)
|
||||||
|
acceleration_support_interface = =math.ceil(acceleration_support * 100 / 500 )
|
||||||
|
support_xy_distance = =round(line_width * 1.5, 2)
|
||||||
|
@ -12,12 +12,14 @@ material = generic_pva_ultimaker3_BB_0.4
|
|||||||
[values]
|
[values]
|
||||||
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
|
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
|
||||||
acceleration_support_infill = =acceleration_support
|
acceleration_support_infill = =acceleration_support
|
||||||
acceleration_support_interface = =acceleration_support
|
|
||||||
jerk_support = =math.ceil(jerk_print * 5 / 25)
|
jerk_support = =math.ceil(jerk_print * 5 / 25)
|
||||||
jerk_support_infill = =jerk_support
|
jerk_support_infill = =jerk_support
|
||||||
jerk_support_interface = =jerk_support
|
|
||||||
support_infill_rate = 25
|
support_infill_rate = 25
|
||||||
support_interface_height = 0.8
|
support_interface_height = 0.8
|
||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_enable = False
|
prime_tower_enable = False
|
||||||
|
speed_support_interface = =math.ceil(speed_support * 20 / 25)
|
||||||
|
jerk_support_interface = =math.ceil(jerk_support * 1 / 5)
|
||||||
|
acceleration_support_interface = =math.ceil(acceleration_support * 100 / 500 )
|
||||||
|
support_xy_distance = =round(line_width * 1.5, 2)
|
||||||
|
|
||||||
|
@ -12,12 +12,13 @@ material = generic_pva_ultimaker3_BB_0.4
|
|||||||
[values]
|
[values]
|
||||||
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
|
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
|
||||||
acceleration_support_infill = =acceleration_support
|
acceleration_support_infill = =acceleration_support
|
||||||
acceleration_support_interface = =acceleration_support
|
|
||||||
jerk_support = =math.ceil(jerk_print * 5 / 25)
|
jerk_support = =math.ceil(jerk_print * 5 / 25)
|
||||||
jerk_support_infill = =jerk_support
|
jerk_support_infill = =jerk_support
|
||||||
jerk_support_interface = =jerk_support
|
|
||||||
support_infill_rate = 25
|
support_infill_rate = 25
|
||||||
support_interface_height = 0.8
|
support_interface_height = 0.8
|
||||||
material_standby_temperature = 100
|
material_standby_temperature = 100
|
||||||
prime_tower_enable = False
|
prime_tower_enable = False
|
||||||
|
speed_support_interface = =math.ceil(speed_support * 20 / 25)
|
||||||
|
jerk_support_interface = =math.ceil(jerk_support * 1 / 5)
|
||||||
|
acceleration_support_interface = =math.ceil(acceleration_support * 100 / 500 )
|
||||||
|
support_xy_distance = =round(line_width * 1.5, 2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user