From e51efe6cbc685f12241f01d98b529441c3d51e8d Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Mon, 23 Sep 2019 16:10:27 +0200 Subject: [PATCH 1/6] Restore feedrate at end of Pause at Height script CURA-6799 --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 50d365da0b..80208d2150 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -4,6 +4,8 @@ from ..Script import Script from UM.Application import Application #To get the current printer's settings. +from UM.Logger import Logger + from typing import List, Tuple class PauseAtHeight(Script): @@ -152,6 +154,7 @@ class PauseAtHeight(Script): # use offset to calculate the current height: = - layer_0_z = 0 current_z = 0 + current_f = 0 got_first_g_cmd_on_layer_0 = False current_t = 0 #Tracks the current extruder for tracking the target temperature. target_temperature = {} #Tracks the current target temperature for each extruder. @@ -185,6 +188,10 @@ class PauseAtHeight(Script): if not layers_started: continue + # If a F instruction is in the line, read the current F + if self.getValue(line, "F") is not None: + current_f = self.getValue(line, "F") + # If a Z instruction is in the line, read the current Z if self.getValue(line, "Z") is not None: current_z = self.getValue(line, "Z") @@ -320,7 +327,12 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(G = 11) + "\n" else: prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" - prepend_gcode += self.putValue(G = 1, F = 9000) + "\n" + + if current_f != 0: + prepend_gcode += self.putValue(G = 1, F = current_f) + "\n" + else: + Logger.log("w", "No previous feedrate found in gcode, feedrate for next layer(s) might be incorrect") + prepend_gcode += self.putValue(M = 82) + " ; switch back to absolute E values\n" # reset extrude value to pre pause value From 2a488b48e9183af092763925e40265a510baa764 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Mon, 23 Sep 2019 16:31:24 +0200 Subject: [PATCH 2/6] Restore feedrate at end of Pause at Height script for Repetier. CURA-6799 --- .../scripts/PauseAtHeightforRepetier.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py index f6c93d9ae6..685618a04e 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py @@ -1,3 +1,4 @@ +from UM.Logger import Logger from ..Script import Script class PauseAtHeightforRepetier(Script): def __init__(self): @@ -73,6 +74,7 @@ class PauseAtHeightforRepetier(Script): def execute(self, data): x = 0. y = 0. + current_f = 0 current_z = 0. pause_z = self.getSettingValueByKey("pause_height") retraction_amount = self.getSettingValueByKey("retraction_amount") @@ -94,6 +96,7 @@ class PauseAtHeightforRepetier(Script): if self.getValue(line, 'G') == 1 or self.getValue(line, 'G') == 0: current_z = self.getValue(line, 'Z') + current_f = self.getValue(line, 'F', current_f) x = self.getValue(line, 'X', x) y = self.getValue(line, 'Y', y) if current_z != None: @@ -150,7 +153,12 @@ class PauseAtHeightforRepetier(Script): prepend_gcode +="G1 X%f Y%f F9000\n" % (x, y) if retraction_amount != 0: prepend_gcode +="G1 E%f F6000\n" % (retraction_amount) - prepend_gcode +="G1 F9000\n" + + if current_f != 0: + prepend_gcode += self.putValue(G=1, F=current_f) + "\n" + else: + Logger.log("w", "No previous feedrate found in gcode, feedrate for next layer(s) might be incorrect") + prepend_gcode +="M82\n" # reset extrude value to pre pause value From 2fa4230d1c57dd6888012c192367d040109bf13e Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Tue, 24 Sep 2019 16:11:00 +0200 Subject: [PATCH 3/6] Only consider feedrates for extrusions (Pause At Height) CURA-6799 --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 12 ++++++------ .../scripts/PauseAtHeightforRepetier.py | 11 ++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 80208d2150..655aee3a4f 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -154,7 +154,7 @@ class PauseAtHeight(Script): # use offset to calculate the current height: = - layer_0_z = 0 current_z = 0 - current_f = 0 + current_extrusion_f = 0 got_first_g_cmd_on_layer_0 = False current_t = 0 #Tracks the current extruder for tracking the target temperature. target_temperature = {} #Tracks the current target temperature for each extruder. @@ -188,9 +188,9 @@ class PauseAtHeight(Script): if not layers_started: continue - # If a F instruction is in the line, read the current F - if self.getValue(line, "F") is not None: - current_f = self.getValue(line, "F") + # Look for the feed rate of an extrusion instruction + if self.getValue(line, "F") is not None and self.getValue(line, "E") is not None: + current_extrusion_f = self.getValue(line, "F") # If a Z instruction is in the line, read the current Z if self.getValue(line, "Z") is not None: @@ -328,8 +328,8 @@ class PauseAtHeight(Script): else: prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" - if current_f != 0: - prepend_gcode += self.putValue(G = 1, F = current_f) + "\n" + if current_extrusion_f != 0: + prepend_gcode += self.putValue(G = 1, F = current_extrusion_f) + " ; restore extrusion feedrate\n" else: Logger.log("w", "No previous feedrate found in gcode, feedrate for next layer(s) might be incorrect") diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py index 685618a04e..0353574289 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py @@ -74,7 +74,7 @@ class PauseAtHeightforRepetier(Script): def execute(self, data): x = 0. y = 0. - current_f = 0 + current_extrusion_f = 0 current_z = 0. pause_z = self.getSettingValueByKey("pause_height") retraction_amount = self.getSettingValueByKey("retraction_amount") @@ -96,10 +96,11 @@ class PauseAtHeightforRepetier(Script): if self.getValue(line, 'G') == 1 or self.getValue(line, 'G') == 0: current_z = self.getValue(line, 'Z') - current_f = self.getValue(line, 'F', current_f) + if self.getValue(line, 'F') is not None and self.getValue(line, 'E') is not None: + current_extrusion_f = self.getValue(line, 'F', current_extrusion_f) x = self.getValue(line, 'X', x) y = self.getValue(line, 'Y', y) - if current_z != None: + if current_z is not None: if current_z >= pause_z: index = data.index(layer) @@ -154,8 +155,8 @@ class PauseAtHeightforRepetier(Script): if retraction_amount != 0: prepend_gcode +="G1 E%f F6000\n" % (retraction_amount) - if current_f != 0: - prepend_gcode += self.putValue(G=1, F=current_f) + "\n" + if current_extrusion_f != 0: + prepend_gcode += self.putValue(G=1, F=current_extrusion_f) + " ; restore extrusion feedrate\n" else: Logger.log("w", "No previous feedrate found in gcode, feedrate for next layer(s) might be incorrect") From 31a78975eccb709d5e1760f06643114311ae1506 Mon Sep 17 00:00:00 2001 From: maukcc Date: Wed, 25 Sep 2019 10:23:20 +0200 Subject: [PATCH 4/6] HMS434 update and material exclusion --- resources/definitions/hms434.def.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/definitions/hms434.def.json b/resources/definitions/hms434.def.json index e54b518a89..1901f87824 100644 --- a/resources/definitions/hms434.def.json +++ b/resources/definitions/hms434.def.json @@ -19,7 +19,7 @@ "fiberlogy_hd_pla", "filo3d_pla", "filo3d_pla_green", "filo3d_pla_red", "generic_abs_175", "generic_cpe_175", "generic_hips_175", "generic_nylon_175", "generic_pc_175", "generic_petg_175", "generic_pva_175", "generic_tpu_175", - "imade3d_generic_petg_175", "imade3d_generic_pla_175", + "imade3d_petg_175", "imade3d_pla_175", "innofill_innoflex60_175", "octofiber_pla", "polyflex_pla", "polymax_pla", "polyplus_pla", "polywood_pla", @@ -67,7 +67,8 @@ "machine_gcode_flavor": {"default_value": "RepRap (RepRap)" }, "material_print_temp_wait": {"default_value": false }, "material_bed_temp_wait": {"default_value": false }, - "machine_max_feedrate_z": {"default_value": 1200 }, + "machine_max_feedrate_z": {"default_value": 10 }, + "machine_acceleration": {"default_value": 1000 }, "machine_start_gcode": {"default_value": "\n;Neither Hybrid AM Systems nor any of Hybrid AM Systems representatives has any liabilities or gives any warranties on this .gcode file, or on any or all objects made with this .gcode file.\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\n\nG1 X-44 Y-100 F9000;go to wipe point\nG1 Z0 F900\nG1 Z0.2 F900\nM117 HMS434 Printing ...\n\n" }, "machine_end_gcode": {"default_value": "" }, @@ -130,11 +131,12 @@ "speed_travel": {"value": "150"}, "speed_travel_layer_0": {"value": "speed_travel"}, "speed_support_interface": {"value": "speed_topbottom"}, + "speed_z_hop": {"value": 10}, "speed_slowdown_layers": {"value": 1}, - "acceleration_print": {"value": 200}, - "acceleration_travel": {"value": 200}, - "jerk_print": {"value": 5}, - "jerk_travel": {"value": 5}, + "acceleration_print": {"value": 1000}, + "acceleration_travel": {"value": 1000}, + "jerk_print": {"value": 10}, + "jerk_travel": {"value": 10}, "retraction_hop_enabled": {"value": false}, "retraction_hop": {"value": 1}, From 9f1b434a7ee2e7307ee12eaab105da9a429fff5f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 25 Sep 2019 11:15:21 +0200 Subject: [PATCH 5/6] Don't show support brim width if support brim is disabled --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 503f04e1c5..4f8a496b24 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4302,7 +4302,7 @@ "default_value": 8.0, "minimum_value": "0.0", "maximum_value_warning": "50.0", - "enabled": "support_enable or support_tree_enable", + "enabled": "(support_enable or support_tree_enable) and support_brim_enable", "settable_per_mesh": false, "settable_per_extruder": true, "limit_to_extruder": "support_infill_extruder_nr", @@ -4317,7 +4317,7 @@ "minimum_value": "0", "maximum_value_warning": "50 / skirt_brim_line_width", "value": "math.ceil(support_brim_width / (skirt_brim_line_width * initial_layer_line_width_factor / 100.0))", - "enabled": "support_enable or support_tree_enable", + "enabled": "(support_enable or support_tree_enable) and support_brim_enable", "settable_per_mesh": false, "settable_per_extruder": true, "limit_to_extruder": "support_infill_extruder_nr" From 0c873d1757e2032e0039f193eb2ff125175fc25c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 25 Sep 2019 11:42:34 +0200 Subject: [PATCH 6/6] Fix inheritance of support interface line direction settings Fixes #6412. --- resources/definitions/fdmprinter.def.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 4f8a496b24..4234ec9e5a 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4860,6 +4860,7 @@ "description": "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the default angles (alternates between 45 and 135 degrees if interfaces are quite thick or 90 degrees).", "type": "[int]", "default_value": "[ ]", + "value": "support_interface_angles", "limit_to_extruder": "support_roof_extruder_nr", "enabled": "support_roof_enable and support_roof_pattern != 'concentric'", "settable_per_mesh": false, @@ -4871,6 +4872,7 @@ "description": "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the default angles (alternates between 45 and 135 degrees if interfaces are quite thick or 90 degrees).", "type": "[int]", "default_value": "[ ]", + "value": "support_interface_angles", "limit_to_extruder": "support_bottom_extruder_nr", "enabled": "support_bottom_enable and support_bottom_pattern != 'concentric'", "settable_per_mesh": false,