diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 913be4e966..3a25b7781a 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): @@ -160,6 +162,7 @@ class PauseAtHeight(Script): # use offset to calculate the current height: = - layer_0_z = 0 current_z = 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. @@ -193,6 +196,10 @@ class PauseAtHeight(Script): if not layers_started: continue + # 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: current_z = self.getValue(line, "Z") @@ -331,7 +338,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_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") + prepend_gcode += self.putValue(M = 82) + " ; switch back to absolute E values\n" # reset extrude value to pre pause value diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py index f6c93d9ae6..0353574289 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_extrusion_f = 0 current_z = 0. pause_z = self.getSettingValueByKey("pause_height") retraction_amount = self.getSettingValueByKey("retraction_amount") @@ -94,9 +96,11 @@ class PauseAtHeightforRepetier(Script): if self.getValue(line, 'G') == 1 or self.getValue(line, 'G') == 0: current_z = self.getValue(line, 'Z') + 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) @@ -150,7 +154,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_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") + prepend_gcode +="M82\n" # reset extrude value to pre pause value diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 503f04e1c5..4234ec9e5a 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" @@ -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, 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},