From 758aa31ae617c57ef7b61c73ccbdeee1233225ab Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 2 Dec 2015 17:37:37 +0100 Subject: [PATCH 01/21] changed temp-flow graph to comply approx with the graph for silver PLA on the UM2 (CURA-299) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 45d0a4f519..5006b809a1 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -580,7 +580,7 @@ "description": "Data linking material flow (in mm³/s) to temperature (°C).", "unit": "", "type": "string", - "default": "[[0.1,180],[20,230]]", + "default": "[[2.5,200],[7.0,240]]", "enabled": "material_flow_dependent_temperature" }, "material_standby_temperature": { From 840bf5d504ecaa57919f78807b0ad2100a8eaa7d Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 2 Dec 2015 17:46:22 +0100 Subject: [PATCH 02/21] JSON: changed temp-flow graph to comply approx with the graph for silver PLA on the UM2 (CURA-299) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 5006b809a1..41e502f5ae 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -580,7 +580,7 @@ "description": "Data linking material flow (in mm³/s) to temperature (°C).", "unit": "", "type": "string", - "default": "[[2.5,200],[7.0,240]]", + "default": "[[3.5,200],[7.0,240]]", "enabled": "material_flow_dependent_temperature" }, "material_standby_temperature": { From 1db430c61a32a81bd93d08f55b7b29d13111cd68 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 3 Dec 2015 14:09:22 +0100 Subject: [PATCH 03/21] Log errors in case the file writing fails An error message is written to the log including the file that was not written to and the stringified exception. --- .../RemovableDriveOutputDevice/RemovableDriveOutputDevice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py index 4ce9b6fd94..9fe5ab33be 100644 --- a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py +++ b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py @@ -63,8 +63,10 @@ class RemovableDriveOutputDevice(OutputDevice): self._writing = True job.start() except PermissionError as e: + Logger.log("e", "Permission denied when trying to write to %s: %s", file_name, str(e)) raise OutputDeviceError.PermissionDeniedError() from e except OSError as e: + Logger.log("e", "Operating system would not let us write to %s: %s", file_name, str(e)) raise OutputDeviceError.WriteRequestFailedError() from e def _onProgress(self, job, progress): From 531033c53b0bc6e504b9c7ba765bb20efdc5d533 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 3 Dec 2015 17:54:18 +0100 Subject: [PATCH 04/21] JSON: removed coasting dichotomy between move and retract (CURA-486) --- resources/machines/fdmprinter.json | 72 ++---------------------------- 1 file changed, 3 insertions(+), 69 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 41e502f5ae..a97977b3c2 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -920,29 +920,7 @@ "default": 0.064, "visible": false, "inherit": false, - "enabled": "coasting_enable", - "children": { - "coasting_volume_retract": { - "label": "Retract-Coasting Volume", - "description": "The volume otherwise oozed in a travel move with retraction.", - "unit": "mm³", - "type": "float", - "default": 0.064, - "visible": false, - "inherit": true, - "enabled": "coasting_enable" - }, - "coasting_volume_move": { - "label": "Move-Coasting Volume", - "description": "The volume otherwise oozed in a travel move without retraction.", - "unit": "mm³", - "type": "float", - "default": 0.096, - "visible": false, - "inherit": true, - "enabled": "coasting_enable" - } - } + "enabled": "coasting_enable" }, "coasting_min_volume": { "label": "Minimal Volume Before Coasting", @@ -952,29 +930,7 @@ "default": 0.8, "visible": false, "inherit": false, - "enabled": "coasting_enable", - "children": { - "coasting_min_volume_retract": { - "label": "Min Volume Retract-Coasting", - "description": "The minimum volume an extrusion path must have in order to coast the full amount before doing a retraction.", - "unit": "mm³", - "type": "float", - "default": 0.6, - "visible": false, - "inherit": true, - "enabled": "coasting_enable" - }, - "coasting_min_volume_move": { - "label": "Min Volume Move-Coasting", - "description": "The minimum volume an extrusion path must have in order to coast the full amount before doing a travel move without retraction.", - "unit": "mm³", - "type": "float", - "default": 0.8, - "visible": false, - "inherit": true, - "enabled": "coasting_enable" - } - } + "enabled": "coasting_enable" }, "coasting_speed": { "label": "Coasting Speed", @@ -984,29 +940,7 @@ "default": 90, "visible": false, "inherit": false, - "enabled": "coasting_enable", - "children": { - "coasting_speed_retract": { - "label": "Retract-Coasting Speed", - "description": "The speed by which to move during coasting before a retraction, relative to the speed of the extrusion path.", - "unit": "%", - "type": "float", - "default": 90, - "visible": false, - "inherit": true, - "enabled": "coasting_enable" - }, - "coasting_speed_move": { - "label": "Move-Coasting Speed", - "description": "The speed by which to move during coasting before a travel move without retraction, relative to the speed of the extrusion path.", - "unit": "%", - "type": "float", - "default": 90, - "visible": false, - "inherit": true, - "enabled": "coasting_enable" - } - } + "enabled": "coasting_enable" } } }, From e0ebff91ed524f4d80c2c2993cc6c1b6ab33085e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 4 Dec 2015 11:12:37 +0100 Subject: [PATCH 05/21] Remove period from setting label The 'Use towers' setting had a period behind the name. It shouldn't have. --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index a97977b3c2..87f672e768 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1243,7 +1243,7 @@ "enabled": "support_roof_enable" }, "support_use_towers": { - "label": "Use towers.", + "label": "Use towers", "description": "Use specialized towers to support tiny overhang areas. These towers have a larger diameter than the region they support. Near the overhang the towers' diameter decreases, forming a roof.", "type": "boolean", "default": true, From 0f54e1e712ca45a6e96e9f1fd9e4f596799772d6 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 4 Dec 2015 11:22:58 +0100 Subject: [PATCH 06/21] JSON: better retraction_count_max --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 87f672e768..a0474ed0f7 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -700,7 +700,7 @@ "retraction_count_max": { "label": "Maximum Retraction Count", "description": "This setting limits the number of retractions occurring within the Minimum Extrusion Distance Window. Further retractions within this window will be ignored. This avoids retracting repeatedly on the same piece of filament, as that can flatten the filament and cause grinding issues.", - "default": 4, + "default": 8, "type": "int", "visible": false, "inherit": false, From fd4943b18a73c31a68f15cfab966a564de5e84fc Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Fri, 4 Dec 2015 16:45:21 +0100 Subject: [PATCH 07/21] Fix variant selection dropdown in sidebar so it actually selects a variant --- resources/qml/ProfileSetup.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index d9869d62b7..f9a78ca2df 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -48,14 +48,14 @@ Item{ id: variantsSelectionMenu Instantiator { - model: UM.MachineVariantsModel { } + model: UM.MachineVariantsModel { id: variantsModel } MenuItem { text: model.name; checkable: true; checked: model.active; exclusiveGroup: variantSelectionMenuGroup; - onTriggered: UM.MachineManager.setActiveMachineVariant(model.getItem(index).name) + onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name) } onObjectAdded: variantsSelectionMenu.insertItem(index, object) onObjectRemoved: variantsSelectionMenu.removeItem(object) @@ -148,4 +148,4 @@ Item{ // } } } -} \ No newline at end of file +} From c854221d4fd647713c15719f6de0267c4955b2be Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Fri, 4 Dec 2015 17:09:05 +0100 Subject: [PATCH 08/21] Update default profiles with values as supplied by Paul --- resources/profiles/High+Quality.cfg | 4 +++- resources/profiles/Low+Quality.cfg | 9 +++++++++ resources/profiles/Normal+Quality.cfg | 1 - resources/profiles/Ulti+Quality.cfg | 5 ++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/resources/profiles/High+Quality.cfg b/resources/profiles/High+Quality.cfg index 2eb80dfb61..7561444bbe 100644 --- a/resources/profiles/High+Quality.cfg +++ b/resources/profiles/High+Quality.cfg @@ -3,4 +3,6 @@ version = 1 name = High Quality [settings] -layer_height = 0.08 +layer_height = 0.06 +infill_sparse_density = 12 + diff --git a/resources/profiles/Low+Quality.cfg b/resources/profiles/Low+Quality.cfg index 159ac5144c..96aec9674a 100644 --- a/resources/profiles/Low+Quality.cfg +++ b/resources/profiles/Low+Quality.cfg @@ -4,3 +4,12 @@ name = Low Quality [settings] layer_height = 0.15 +shell_thickness = 0.8 +infill_sparse_density = 8 +speed_print = 60 +speed_wall_0 = 40 +speed_wall_x = 50 +speed_topbottom = 30 +speed_travel = 150 +speed_layer_0 = 30 +skirt_speed = 30 diff --git a/resources/profiles/Normal+Quality.cfg b/resources/profiles/Normal+Quality.cfg index c6a82b4910..0ad945af31 100644 --- a/resources/profiles/Normal+Quality.cfg +++ b/resources/profiles/Normal+Quality.cfg @@ -3,4 +3,3 @@ version = 1 name = Normal Quality [settings] -layer_height = 0.1 diff --git a/resources/profiles/Ulti+Quality.cfg b/resources/profiles/Ulti+Quality.cfg index 86feb14e73..589e2cfeee 100644 --- a/resources/profiles/Ulti+Quality.cfg +++ b/resources/profiles/Ulti+Quality.cfg @@ -3,4 +3,7 @@ version = 1 name = Ulti Quality [settings] -layer_height = 0.06 +layer_height = 0.04 +shell_thickness = 1.6 +top_bottom_thickness = 0.8 +infill_sparse_density = 14 From b86a219315aa11b3ca6cc0c1ab68980b7c09d8b3 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 7 Dec 2015 18:05:00 +0100 Subject: [PATCH 09/21] JSON: fix: coasting min volume should be at least as high as coasting volume (CURA-528) --- resources/machines/fdmprinter.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index a0474ed0f7..bceac73d2c 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -924,10 +924,11 @@ }, "coasting_min_volume": { "label": "Minimal Volume Before Coasting", - "description": "The least volume an extrusion path should have to coast the full amount. For smaller extrusion paths, less pressure has been built up in the bowden tube and so the coasted volume is scaled linearly.", + "description": "The least volume an extrusion path should have to coast the full amount. For smaller extrusion paths, less pressure has been built up in the bowden tube and so the coasted volume is scaled linearly. This value should always be larger than the Coasting Volume.", "unit": "mm³", "type": "float", "default": 0.8, + "min_value": "coasting_volume", "visible": false, "inherit": false, "enabled": "coasting_enable" From e69bdd4fe5c05252de65f9be3bef05ee631ee5b9 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 7 Dec 2015 18:11:48 +0100 Subject: [PATCH 10/21] JSON: introduced brim_width (CURA-550) --- resources/machines/fdmprinter.json | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index bceac73d2c..e9dbf4328b 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1370,11 +1370,22 @@ "enabled": "adhesion_type == \"skirt\"" }, "brim_line_count": { - "label": "Brim Line Count", - "description": "The number of lines used for a brim: More lines means a larger brim which sticks better, but this also makes your effective print area smaller.", - "type": "int", - "default": 10, - "enabled": "adhesion_type == \"brim\"" + "label": "Brim Width", + "description": "The distance from the model to the end of the brim. A larger brim sticks better to the build platform, but also makes your effective print area smaller.", + "type": "float", + "unit": "mm", + "default": 0.8, + "enabled": "adhesion_type == \"brim\"", + "children": { + "brim_line_count": { + "label": "Brim Line Count", + "description": "The number of lines used for a brim. More lines means a larger brim which sticks better to the build plate, but this also makes your effective print area smaller.", + "type": "int", + "default": 10, + "inherit_function": "parent_value / skirt_line_width" + "enabled": "adhesion_type == \"brim\"" + } + } }, "raft_margin": { "label": "Raft Extra Margin", From 67bbb5478edc1ebc5d71be0c39d69597cf8fb3ac Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 8 Dec 2015 09:38:21 +0100 Subject: [PATCH 11/21] JSON: (bugfix) introduced brim_width (CURA-550) --- resources/machines/fdmprinter.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index e9dbf4328b..5ba4f305e9 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1369,7 +1369,7 @@ "default": 250, "enabled": "adhesion_type == \"skirt\"" }, - "brim_line_count": { + "brim_width": { "label": "Brim Width", "description": "The distance from the model to the end of the brim. A larger brim sticks better to the build platform, but also makes your effective print area smaller.", "type": "float", @@ -1382,7 +1382,7 @@ "description": "The number of lines used for a brim. More lines means a larger brim which sticks better to the build plate, but this also makes your effective print area smaller.", "type": "int", "default": 10, - "inherit_function": "parent_value / skirt_line_width" + "inherit_function": "parent_value / skirt_line_width", "enabled": "adhesion_type == \"brim\"" } } From 6ef68ca5c128510b32d8cc3383ca025385c1a45f Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 8 Dec 2015 09:47:20 +0100 Subject: [PATCH 12/21] JSON: made coasting_min_volume depend on coasting_volume (CURA-550) --- resources/machines/fdmprinter.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 5ba4f305e9..1069def481 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -929,6 +929,7 @@ "type": "float", "default": 0.8, "min_value": "coasting_volume", + "inherit_function": "coasting_volume * 8", "visible": false, "inherit": false, "enabled": "coasting_enable" From 8a853e5b059886884294231a57909dce09f758b7 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 8 Dec 2015 09:48:01 +0100 Subject: [PATCH 13/21] JSON bugfix: infill_density ==> infill_sparse_density (CURA-550) --- resources/machines/RigidBot.json | 2 +- resources/machines/RigidBotBig.json | 2 +- resources/machines/fdmprinter.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/machines/RigidBot.json b/resources/machines/RigidBot.json index ccdd6475f8..8e3793bec6 100644 --- a/resources/machines/RigidBot.json +++ b/resources/machines/RigidBot.json @@ -28,7 +28,7 @@ "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, "machine_start_gcode": { - "default": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..." + "default": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_sparse_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..." }, "machine_end_gcode": { "default": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}" diff --git a/resources/machines/RigidBotBig.json b/resources/machines/RigidBotBig.json index b3f3f29728..6518444db0 100644 --- a/resources/machines/RigidBotBig.json +++ b/resources/machines/RigidBotBig.json @@ -26,7 +26,7 @@ "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, "machine_start_gcode": { - "default": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..." + "default": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_sparse_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..." }, "machine_end_gcode": { "default": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}" diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 1069def481..a1c1556efd 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -927,9 +927,9 @@ "description": "The least volume an extrusion path should have to coast the full amount. For smaller extrusion paths, less pressure has been built up in the bowden tube and so the coasted volume is scaled linearly. This value should always be larger than the Coasting Volume.", "unit": "mm³", "type": "float", - "default": 0.8, + "default": 0.864, "min_value": "coasting_volume", - "inherit_function": "coasting_volume * 8", + "inherit_function": "0.8 + coasting_volume", "visible": false, "inherit": false, "enabled": "coasting_enable" From 26a7fc7bdce933566aa8b52d8624417c7916cca7 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 8 Dec 2015 09:50:34 +0100 Subject: [PATCH 14/21] JSON: made brim_line_count default match brim_width_default for 0.4 nozzles (CURA-550) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index a1c1556efd..c0e5f70cf2 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1382,7 +1382,7 @@ "label": "Brim Line Count", "description": "The number of lines used for a brim. More lines means a larger brim which sticks better to the build plate, but this also makes your effective print area smaller.", "type": "int", - "default": 10, + "default": 20, "inherit_function": "parent_value / skirt_line_width", "enabled": "adhesion_type == \"brim\"" } From 71c8393f8c20615dae7cc27267930cfaf4eef2b7 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 8 Dec 2015 10:13:23 +0100 Subject: [PATCH 15/21] JSON bugfix: default brim width (CURA-550) --- resources/machines/fdmprinter.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index c0e5f70cf2..0793cd8566 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1375,15 +1375,15 @@ "description": "The distance from the model to the end of the brim. A larger brim sticks better to the build platform, but also makes your effective print area smaller.", "type": "float", "unit": "mm", - "default": 0.8, + "default": 5.0, "enabled": "adhesion_type == \"brim\"", "children": { "brim_line_count": { "label": "Brim Line Count", "description": "The number of lines used for a brim. More lines means a larger brim which sticks better to the build plate, but this also makes your effective print area smaller.", "type": "int", - "default": 20, - "inherit_function": "parent_value / skirt_line_width", + "default": 13, + "inherit_function": "math.ceil(parent_value / skirt_line_width)", "enabled": "adhesion_type == \"brim\"" } } From a4e824464c381ae049d1e3590b0653335db60a65 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 8 Dec 2015 10:47:09 +0100 Subject: [PATCH 16/21] JSON bugfix: coasting_min_volume had an inherit_function and the inherit property (CURA-550) --- resources/machines/fdmprinter.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 0793cd8566..12b0329d69 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -931,7 +931,6 @@ "min_value": "coasting_volume", "inherit_function": "0.8 + coasting_volume", "visible": false, - "inherit": false, "enabled": "coasting_enable" }, "coasting_speed": { From 5009ac99e6fb90d42a5e2b6acb9d4eac76242ec7 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 8 Dec 2015 10:51:07 +0100 Subject: [PATCH 17/21] retrieve brim_width instead of brim_line_count * skirt_line_width (CURA-550) --- cura/BuildVolume.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 98dbf206bd..9f956edbea 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -255,8 +255,7 @@ class BuildVolume(SceneNode): skirt_line_count = profile.getSettingValue("skirt_line_count") skirt_size = skirt_distance + (skirt_line_count * profile.getSettingValue("skirt_line_width")) elif adhesion_type == "brim": - brim_line_count = profile.getSettingValue("brim_line_count") - skirt_size = brim_line_count * profile.getSettingValue("skirt_line_width") + skirt_size = profile.getSettingValue("brim_width") elif adhesion_type == "raft": skirt_size = profile.getSettingValue("raft_margin") @@ -270,4 +269,4 @@ class BuildVolume(SceneNode): def _clamp(self, value, min_value, max_value): return max(min(value, max_value), min_value) - _skirt_settings = ["adhesion_type", "skirt_gap", "skirt_line_count", "skirt_line_width", "brim_line_count", "raft_margin", "draft_shield_enabled", "draft_shield_dist", "xy_offset"] + _skirt_settings = ["adhesion_type", "skirt_gap", "skirt_line_count", "skirt_line_width", "brim_width", "brim_line_count", "raft_margin", "draft_shield_enabled", "draft_shield_dist", "xy_offset"] From 4932ef819c48bc565b32d1788ac0786eb25bc996 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 8 Dec 2015 13:30:12 +0100 Subject: [PATCH 18/21] JSON fix: Min Volume Before Coasting doesn't include Coasting Volume anymore (CURA-528) --- resources/machines/fdmprinter.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 12b0329d69..7665727064 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -927,9 +927,8 @@ "description": "The least volume an extrusion path should have to coast the full amount. For smaller extrusion paths, less pressure has been built up in the bowden tube and so the coasted volume is scaled linearly. This value should always be larger than the Coasting Volume.", "unit": "mm³", "type": "float", - "default": 0.864, - "min_value": "coasting_volume", - "inherit_function": "0.8 + coasting_volume", + "default": 0.8, + "min_value": "0", "visible": false, "enabled": "coasting_enable" }, From 2e5bac5392f35d43c701abdfc2340e907258cfaa Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Tue, 8 Dec 2015 13:42:16 +0100 Subject: [PATCH 19/21] Displays settings based on whether they are global-only or not blobal-only means it's not allowed to be used as a per object setting Contribute to #CURA-458 --- .../PerObjectSettingsDialog.qml | 157 ++++++++++++++++ .../PerObjectSettingsPanel.qml | 170 +++--------------- 2 files changed, 180 insertions(+), 147 deletions(-) create mode 100644 plugins/PerObjectSettingsTool/PerObjectSettingsDialog.qml diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsDialog.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsDialog.qml new file mode 100644 index 0000000000..0215b7ba04 --- /dev/null +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsDialog.qml @@ -0,0 +1,157 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Uranium is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.2 +import QtQuick.Controls.Styles 1.2 +import QtQuick.Window 2.2 + +import UM 1.1 as UM + +UM.Dialog { + id: settingPickDialog + title: catalog.i18nc("@title:window", "Pick a Setting to Customize") + property var settingCategoriesModel + + TextField { + id: filter; + + anchors { + top: parent.top; + left: parent.left; + right: parent.right; + } + + placeholderText: catalog.i18nc("@label:textbox", "Filter..."); + + onTextChanged: settingCategoriesModel.filter(text); + } + + ScrollView { + id: view; + anchors { + top: filter.bottom; + left: parent.left; + right: parent.right; + bottom: parent.bottom; + } + + Column { + width: view.width - UM.Theme.sizes.default_margin.width * 2; + height: childrenRect.height; + + Repeater { + id: settingList; + + model: settingPickDialog.settingCategoriesModel + + delegate: Item { + id: delegateItem; + + width: parent.width; + height: childrenRect.height; + + ToolButton { + id: categoryHeader; + text: model.name; + checkable: true; + width: parent.width; + onCheckedChanged: settingsColumn.state != "" ? settingsColumn.state = "" : settingsColumn.state = "collapsed"; + + style: ButtonStyle { + background: Rectangle + { + width: control.width; + height: control.height; + color: control.hovered ? palette.highlight : "transparent"; + } + label: Row + { + spacing: UM.Theme.sizes.default_margin.width; + Image + { + anchors.verticalCenter: parent.verticalCenter; + source: control.checked ? UM.Theme.icons.arrow_right : UM.Theme.icons.arrow_bottom; + } + Label + { + text: control.text; + font.bold: true; + color: control.hovered ? palette.highlightedText : palette.text; + } + } + } + } + + property variant settingsModel: model.settings; + + visible: model.visible; + + Column { + id: settingsColumn; + + anchors.top: categoryHeader.bottom; + + property real childrenHeight: + { + var h = 0.0; + for(var i in children) + { + var item = children[i]; + h += children[i].height; + if(item.settingVisible) + { + if(i > 0) + { + h += spacing; + } + } + } + return h; + } + + width: childrenRect.width; + height: childrenHeight; + Repeater { + model: delegateItem.settingsModel; + + delegate: ToolButton { + id: button; + x: model.depth * UM.Theme.sizes.default_margin.width; + text: model.name + tooltip: model.description; + + onClicked: { + var object_id = UM.ActiveTool.properties.Model.getItem(base.currentIndex).id; + UM.ActiveTool.properties.Model.addSettingOverride(object_id, model.key); + settingPickDialog.visible = false; + } + + states: State { + name: "filtered" + when: model.filtered || !model.visible || !model.enabled || model.global_only + PropertyChanges { target: button; height: 0; opacity: 0; } + } + } + } + + states: State { + name: "collapsed"; + + PropertyChanges { target: settingsColumn; opacity: 0; height: 0; } + } + } + } + } + } + } + + rightButtons: [ + Button { + text: catalog.i18nc("@action:button", "Cancel"); + onClicked: { + settingPickDialog.visible = false; + } + } + ] +} \ No newline at end of file diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 781b7b0f1c..ef28ccfde3 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -15,12 +15,21 @@ Item { height: 0; property variant position: mapToItem(null, 0, 0) + property var settingOverrideModel: UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings property real viewportWidth: UM.Application.mainWindow.width * UM.Application.mainWindow.viewportRect.width; property real viewportHeight: UM.Application.mainWindow.height * UM.Application.mainWindow.viewportRect.height; property int currentIndex; + onSettingOverrideModelChanged:{ + console.log(UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings) +// UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings.refresh() +// if (UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings == undefined){ +// +// } + } + Rectangle { id: settingsPanel; @@ -40,7 +49,6 @@ Item { DropArea { anchors.fill: parent; } - Button { id: closeButton; width: UM.Theme.sizes.message_close.width; @@ -101,25 +109,26 @@ Item { Repeater { id: settings; - model: UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings + model: base.settingOverrideModel UM.SettingItem { width: UM.Theme.sizes.setting.width; height: UM.Theme.sizes.setting.height; x: UM.Theme.sizes.per_object_settings_panel_border.width + 1 - name: model.label; + visible: !model.global_only; type: model.type; value: model.value; description: model.description; unit: model.unit; valid: model.valid; - options: model.options + options: model.options; style: UM.Theme.styles.setting_item; onItemValueChanged: { settings.model.setSettingValue(model.key, value) + base.settingOverrideModel = UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings } Button @@ -184,7 +193,10 @@ Item { } } - onClicked: settingPickDialog.visible = true; + onClicked: { + settingPickDialog.settingCategoriesModel.reload() + settingPickDialog.visible = true; + } Connections { @@ -249,153 +261,17 @@ Item { } } - UM.Dialog { + PerObjectSettingsDialog{ id: settingPickDialog + settingCategoriesModel: UM.SettingCategoriesModel { id: settingCategoriesModel; } - title: catalog.i18nc("@title:window", "Pick a Setting to Customize") - - TextField { - id: filter; - - anchors { - top: parent.top; - left: parent.left; - right: parent.right; - } - - placeholderText: catalog.i18nc("@label:textbox", "Filter..."); - - onTextChanged: settingCategoriesModel.filter(text); - } - - ScrollView { - id: view; - anchors { - top: filter.bottom; - left: parent.left; - right: parent.right; - bottom: parent.bottom; - } - - Column { - width: view.width - UM.Theme.sizes.default_margin.width * 2; - height: childrenRect.height; - - Repeater { - id: settingList; - - model: UM.SettingCategoriesModel { id: settingCategoriesModel; } - - delegate: Item { - id: delegateItem; - - width: parent.width; - height: childrenRect.height; - - ToolButton { - id: categoryHeader; - text: model.name; - checkable: true; - width: parent.width; - onCheckedChanged: settingsColumn.state != "" ? settingsColumn.state = "" : settingsColumn.state = "collapsed"; - - style: ButtonStyle { - background: Rectangle - { - width: control.width; - height: control.height; - color: control.hovered ? palette.highlight : "transparent"; - } - label: Row - { - spacing: UM.Theme.sizes.default_margin.width; - Image - { - anchors.verticalCenter: parent.verticalCenter; - source: control.checked ? UM.Theme.icons.arrow_right : UM.Theme.icons.arrow_bottom; - } - Label - { - text: control.text; - font.bold: true; - color: control.hovered ? palette.highlightedText : palette.text; - } - } - } - } - - property variant settingsModel: model.settings; - - visible: model.visible; - - Column { - id: settingsColumn; - - anchors.top: categoryHeader.bottom; - - property real childrenHeight: - { - var h = 0.0; - for(var i in children) - { - var item = children[i]; - h += children[i].height; - if(item.settingVisible) - { - if(i > 0) - { - h += spacing; - } - } - } - return h; - } - - width: childrenRect.width; - height: childrenHeight; - Repeater { - model: delegateItem.settingsModel; - - delegate: ToolButton { - id: button; - x: model.depth * UM.Theme.sizes.default_margin.width; - text: model.name; - tooltip: model.description; - - onClicked: { - var object_id = UM.ActiveTool.properties.Model.getItem(base.currentIndex).id; - UM.ActiveTool.properties.Model.addSettingOverride(object_id, model.key); - settingPickDialog.visible = false; - } - - states: State { - name: "filtered" - when: model.filtered || !model.visible || !model.enabled - PropertyChanges { target: button; height: 0; opacity: 0; } - } - } - } - - states: State { - name: "collapsed"; - - PropertyChanges { target: settingsColumn; opacity: 0; height: 0; } - } - } - } - } + onVisibilityChanged:{ + if (settingPickDialog.visibility == false){ + base.settingOverrideModel = UM.ActiveTool.properties.Model.getItem(base.currentIndex).settings } } - - rightButtons: [ - Button { - text: catalog.i18nc("@action:button", "Cancel"); - onClicked: { - settingPickDialog.visible = false; - } - } - ] } + SystemPalette { id: palette; } } From f8dbe056b2c53ac76f2ad124e26c7b8dbfd55b07 Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Tue, 8 Dec 2015 13:43:37 +0100 Subject: [PATCH 20/21] Adds a global-only role to the SettingOverrideModel Also adds a reload function Contributes to #CURA-458 --- .../SettingOverrideModel.py | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/plugins/PerObjectSettingsTool/SettingOverrideModel.py b/plugins/PerObjectSettingsTool/SettingOverrideModel.py index 74696f0ee6..f7411524b1 100644 --- a/plugins/PerObjectSettingsTool/SettingOverrideModel.py +++ b/plugins/PerObjectSettingsTool/SettingOverrideModel.py @@ -1,7 +1,7 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. -from PyQt5.QtCore import Qt, pyqtSlot, QUrl +from PyQt5.QtCore import Qt, pyqtSlot, QUrl, pyqtSignal from UM.Application import Application from UM.Qt.ListModel import ListModel @@ -18,6 +18,7 @@ class SettingOverrideModel(ListModel): OptionsRole = Qt.UserRole + 8 WarningDescriptionRole = Qt.UserRole + 9 ErrorDescriptionRole = Qt.UserRole + 10 + GlobalOnlyRole = Qt.UserRole + 11 def __init__(self, node, parent = None): super().__init__(parent) @@ -38,6 +39,7 @@ class SettingOverrideModel(ListModel): self.addRoleName(self.OptionsRole, "options") self.addRoleName(self.WarningDescriptionRole, "warning_description") self.addRoleName(self.ErrorDescriptionRole, "error_description") + self.addRoleName(self.GlobalOnlyRole, "global_only") @pyqtSlot(str, "QVariant") def setSettingValue(self, key, value): @@ -50,7 +52,6 @@ class SettingOverrideModel(ListModel): if not self._node.getDecorator(SettingOverrideDecorator): self.clear() return - self._decorator = self._node.getDecorator(SettingOverrideDecorator) self._decorator.settingAdded.connect(self._onSettingsChanged) self._decorator.settingRemoved.connect(self._onSettingsChanged) @@ -68,6 +69,20 @@ class SettingOverrideModel(ListModel): model.appendItem({"value": str(value), "name": str(name)}) return model + @pyqtSlot() + def reload(self): + self.clear() + #if self._machine_instance: + #for category in self._machine_instance.getMachineDefinition().getAllCategories(): + #self.appendItem({ + #"id": category.getKey(), + #"name": category.getLabel(), + #"icon": category.getIcon(), + #"visible": category.isVisible(), + #"settings": SettingsFromCategoryModel.SettingsFromCategoryModel(category), + #"hiddenValuesCount": category.getHiddenValuesCount() + #}) + def _onSettingsChanged(self): self.clear() @@ -84,9 +99,9 @@ class SettingOverrideModel(ListModel): "valid": setting.validate(value), "options": self._createOptionsModel(setting.getOptions()), "warning_description": setting.getWarningDescription(), - "error_description": setting.getErrorDescription() + "error_description": setting.getErrorDescription(), + "global_only": setting.getGlobalOnly() }) - items.sort(key = lambda i: i["key"]) for item in items: From 70b221b33a48a3a366690f1342268d041fc1dfc5 Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Tue, 8 Dec 2015 13:44:59 +0100 Subject: [PATCH 21/21] Proof of concept to test the global-only functionalities Contributes to #CURA-460458 --- resources/machines/fdmprinter.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index a97977b3c2..1cff22e46c 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -158,7 +158,8 @@ "default": 0.1, "min_value": "0.001", "min_value_warning": "0.04", - "max_value_warning": "0.32" + "max_value_warning": "0.32", + "global_only": "print_sequence != \"one_at_a_time\"" }, "layer_height_0": { "label": "Initial Layer Height", @@ -1650,7 +1651,8 @@ "one_at_a_time": "One at a Time" }, "default": "all_at_once", - "visible": true + "visible": true, + "global_only": true }, "magic_mesh_surface_mode": { "label": "Surface Mode",