From 9941c2d8f41fe6496fd74c52b8f68eac7852b145 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Sun, 22 Apr 2018 10:13:51 +0100 Subject: [PATCH 01/18] Added support_fan_enable and support_supported_skin_fan_speed settings. These let you override the fan speed when printing the skin regions immediately above support. --- resources/definitions/fdmprinter.def.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 1ec210b99e..d1f50af134 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4164,6 +4164,27 @@ } } }, + "support_fan_enable": + { + "label": "Fan Speed Override", + "description": "When enabled, the print cooling fan speed is altered for the skin regions immediately above the support.", + "type": "bool", + "default_value": false, + "enabled": "support_enable", + "settable_per_mesh": false + }, + "support_supported_skin_fan_speed": + { + "label": "Supported Skin Fan Speed", + "description": "Percentage fan speed to use when printing the skin regions immediately above the support. Using a high fan speed can make the support easier to remove.", + "unit": "%", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "type": "float", + "enabled": "support_enable and support_fan_enable", + "settable_per_mesh": false + }, "support_use_towers": { "label": "Use Towers", From c2600786315a148490876c5998c8325fff03699d Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 3 Jul 2018 09:40:42 +0200 Subject: [PATCH 02/18] Remove temperature commands for pause at height for UM3. CURA-5491 --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index ad83aa2a24..313dff251c 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -137,6 +137,8 @@ class PauseAtHeight(Script): redo_layers = self.getSettingValueByKey("redo_layers") standby_temperature = self.getSettingValueByKey("standby_temperature") + is_griffin = False + # T = ExtruderManager.getInstance().getActiveExtruderStack().getProperty("material_print_temperature", "value") # use offset to calculate the current height: = - @@ -153,6 +155,8 @@ class PauseAtHeight(Script): # Scroll each line of instruction for each layer in the G-code for line in lines: + if ";FLAVOR:Griffin" in line: + is_griffin = True # Fist positive layer reached if ";LAYER:0" in line: layers_started = True @@ -266,14 +270,16 @@ class PauseAtHeight(Script): if current_z < 15: prepend_gcode += self.putValue(G=1, Z=15, F=300) + "\n" - # Set extruder standby temperature - prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" + if not is_griffin: + # Set extruder standby temperature + prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" # Wait till the user continues printing prepend_gcode += self.putValue(M=0) + ";Do the actual pause\n" - # Set extruder resume temperature - prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" + if not is_griffin: + # Set extruder resume temperature + prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" # Push the filament back, if retraction_amount != 0: From e61ad750b7111d1c38e84e01b531aa87529f78c7 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 3 Jul 2018 13:13:33 +0200 Subject: [PATCH 03/18] Fixed UM3 Griffin and UM2 UltiGCode for Pause At Height. CURA-5491 --- .../scripts/PauseAtHeight.py | 82 +++++++++++-------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 313dff251c..751336878d 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -138,6 +138,7 @@ class PauseAtHeight(Script): standby_temperature = self.getSettingValueByKey("standby_temperature") is_griffin = False + is_ultigcode = False # T = ExtruderManager.getInstance().getActiveExtruderStack().getProperty("material_print_temperature", "value") @@ -157,6 +158,8 @@ class PauseAtHeight(Script): for line in lines: if ";FLAVOR:Griffin" in line: is_griffin = True + if ";FLAVOR:UltiGCode" in line: + is_ultigcode = True # Fist positive layer reached if ";LAYER:0" in line: layers_started = True @@ -256,54 +259,63 @@ class PauseAtHeight(Script): else: prepend_gcode += ";current layer: {layer}\n".format(layer=current_layer) - # Retraction - prepend_gcode += self.putValue(M=83) + "\n" - if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" + if not is_griffin: # Griffin does all these movements and retraction in the M0, no need to do it double + prepend_gcode += self.putValue(M=83) + "\n" - # Move the head away - prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" + # Retraction + if retraction_amount != 0: + if is_ultigcode: + prepend_gcode += self.putValue(G=10) + "; retract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" - # This line should be ok - prepend_gcode += self.putValue(G=1, X=park_x, Y=park_y, F=9000) + "\n" + # Move the head away + prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" - if current_z < 15: - prepend_gcode += self.putValue(G=1, Z=15, F=300) + "\n" + # This line should be ok + prepend_gcode += self.putValue(G=1, X=park_x, Y=park_y, F=9000) + "\n" - if not is_griffin: - # Set extruder standby temperature - prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" + if current_z < 15: + prepend_gcode += self.putValue(G=1, Z=15, F=300) + "\n" + + if not is_ultigcode: # We don't know about what temperatures are used in ultigcode, so do not touch + # Set extruder standby temperature + prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" # Wait till the user continues printing - prepend_gcode += self.putValue(M=0) + ";Do the actual pause\n" + prepend_gcode += self.putValue(M=0) + "; do the actual pause\n" if not is_griffin: - # Set extruder resume temperature - prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" + if not is_ultigcode: # will be 0 for ultigcode + # Set extruder resume temperature + prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" - # Push the filament back, - if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" + # Push the filament back, + if retraction_amount != 0: + if is_ultigcode: + prepend_gcode += self.putValue(G=11) + "; unretract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" - # Optionally extrude material - if extrude_amount != 0: - prepend_gcode += self.putValue(G=1, E=extrude_amount, F=extrude_speed * 60) + "\n" + # Optionally extrude material + if extrude_amount != 0: + prepend_gcode += self.putValue(G=1, E=extrude_amount, F=extrude_speed * 60) + "\n" - # and retract again, the properly primes the nozzle - # when changing filament. - if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" + # and retract again, the properly primes the nozzle + # when changing filament. + if retraction_amount != 0: + prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" - # Move the head back - prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" - prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n" - if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" - prepend_gcode += self.putValue(G=1, F=9000) + "\n" - prepend_gcode += self.putValue(M=82) + "\n" + # Move the head back + prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" + prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n" + if retraction_amount != 0: + prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" + prepend_gcode += self.putValue(G=1, F=9000) + "\n" + prepend_gcode += self.putValue(M=82) + "\n" - # reset extrude value to pre pause value - prepend_gcode += self.putValue(G=92, E=current_e) + "\n" + # reset extrude value to pre pause value + prepend_gcode += self.putValue(G=92, E=current_e) + "\n" layer = prepend_gcode + layer From b77220b260a9e122ff099c5b814bdf0b57f2f31c Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 3 Jul 2018 13:41:14 +0200 Subject: [PATCH 04/18] Add more ultigcode retract and unretract. CURA-5491 --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 751336878d..a8ade23c67 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -304,14 +304,22 @@ class PauseAtHeight(Script): # and retract again, the properly primes the nozzle # when changing filament. if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" + if is_ultigcode: + prepend_gcode += self.putValue(G=10) + "; retract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" # Move the head back prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n" if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" + if is_ultigcode: + prepend_gcode += self.putValue(G=11) + "; unretract for ultigcode\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" + + prepend_gcode += self.putValue(M=82) + "\n" # reset extrude value to pre pause value From 7b2a5c9160b93ad8f31661f64e9fc49e00c574ce Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 13:45:44 +0200 Subject: [PATCH 05/18] Remove prime_tower_wall_thickness setting The wall thickness now depends on the order in which the prime towers are folded, which is really hard to obtain within an inheritance formula. So we forego one of the settings and compute the required thickness to obtain the desired volume in the engine where the shell order is known. Contributes to issue CURA-5457. --- .../VersionUpgrade34to40.py | 4 ++++ resources/definitions/fdmprinter.def.json | 21 +------------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py index 593655a046..aacae2cfcf 100644 --- a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py @@ -6,6 +6,7 @@ import io from UM.VersionUpgrade import VersionUpgrade +deleted_settings = {"prime_tower_wall_thickness"} ## Upgrades configurations from the state they were in at version 3.4 to the # state they should be in at version 4.0. @@ -68,6 +69,9 @@ class VersionUpgrade34to40(VersionUpgrade): parser["metadata"]["setting_version"] = "5" self._resetConcentric3DInfillPattern(parser) + if "values" in parser: + for deleted_setting in deleted_settings: + del parser["values"][deleted_setting] result = io.StringIO() parser.write(result) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index b458316686..710dcbb87f 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4998,26 +4998,7 @@ "maximum_value_warning": "round((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height'), 2) if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')", "enabled": "resolveOrValue('prime_tower_enable')", "settable_per_mesh": false, - "settable_per_extruder": true, - "children": - { - "prime_tower_wall_thickness": - { - "label": "Prime Tower Thickness", - "description": "The thickness of the hollow prime tower. A thickness larger than half the Prime Tower Minimum Volume will result in a dense prime tower.", - "unit": "mm", - "type": "float", - "default_value": 2, - "value": "round(max(2 * prime_tower_line_width, (0.5 * (prime_tower_size - math.sqrt(max(0, prime_tower_size ** 2 - 4 * prime_tower_min_volume / (3.14159 * layer_height))))) if prime_tower_circular else (0.5 * (prime_tower_size - math.sqrt(max(0, prime_tower_size ** 2 - prime_tower_min_volume / layer_height))))), 3)", - "resolve": "max(extruderValues('prime_tower_wall_thickness'))", - "minimum_value": "0.001", - "minimum_value_warning": "2 * min(extruderValues('prime_tower_line_width')) - 0.0001", - "maximum_value_warning": "prime_tower_size / 2", - "enabled": "prime_tower_enable", - "settable_per_mesh": false, - "settable_per_extruder": false - } - } + "settable_per_extruder": true }, "prime_tower_position_x": { From 8ff4327c41f62ab9d0503e02be86751f94690f48 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 14:17:57 +0200 Subject: [PATCH 06/18] Remove Wipe Nozzle After Switch and Purge Volume settings The entire purging algorithm is gone now since it purges by printing the prime tower. The prime tower should be sufficiently strong now to not need this. Contributes to issue CURA-5457. --- .../VersionUpgrade34to40.py | 2 +- resources/definitions/fdmprinter.def.json | 23 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py index aacae2cfcf..2877985921 100644 --- a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py @@ -6,7 +6,7 @@ import io from UM.VersionUpgrade import VersionUpgrade -deleted_settings = {"prime_tower_wall_thickness"} +deleted_settings = {"prime_tower_wall_thickness", "dual_pre_wipe", "prime_tower_purge_volume"} ## Upgrades configurations from the state they were in at version 3.4 to the # state they should be in at version 4.0. diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 710dcbb87f..8bd49daebe 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5053,29 +5053,6 @@ "settable_per_mesh": false, "settable_per_extruder": true }, - "dual_pre_wipe": - { - "label": "Wipe Nozzle After Switch", - "description": "After switching extruder, wipe the oozed material off of the nozzle on the first thing printed. This performs a safe slow wipe move at a place where the oozed material causes least harm to the surface quality of your print.", - "type": "bool", - "enabled": "resolveOrValue('prime_tower_enable')", - "default_value": true, - "settable_per_mesh": false, - "settable_per_extruder": true - }, - "prime_tower_purge_volume": - { - "label": "Prime Tower Purge Volume", - "description": "Amount of filament to be purged when wiping on the prime tower. Purging is useful for compensating the filament lost by oozing during inactivity of the nozzle.", - "type": "float", - "enabled": "resolveOrValue('prime_tower_enable') and dual_pre_wipe", - "unit": "mm³", - "default_value": 0, - "minimum_value": "0", - "maximum_value_warning": "2.5", - "settable_per_mesh": false, - "settable_per_extruder": true - }, "ooze_shield_enabled": { "label": "Enable Ooze Shield", From 192a581d6db91b71dd61c0333e413c1069ad42b1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 09:50:05 +0200 Subject: [PATCH 07/18] Don't round the warning threshold The threshold is not visible. It's not necessary to round. Contributes to issue CURA-5457. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8bd49daebe..8760d2e9d7 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4995,7 +4995,7 @@ "default_value": 10, "value": "8.48 if prime_tower_circular else 10", "minimum_value": "0", - "maximum_value_warning": "round((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height'), 2) if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')", + "maximum_value_warning": "(resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height') if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')", "enabled": "resolveOrValue('prime_tower_enable')", "settable_per_mesh": false, "settable_per_extruder": true From 807e8410c081d9091aea822cb0c9f7c764d907b9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 10:31:23 +0200 Subject: [PATCH 08/18] Give warning when sum of volumes exceeds volume of prime tower It could happen that the desired volume is not entirely reached in the inner shells because of rounding the volume up to the nearest perimeter on the outer shells. Contributes to issue CURA-5457. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8760d2e9d7..0df057453f 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4995,7 +4995,7 @@ "default_value": 10, "value": "8.48 if prime_tower_circular else 10", "minimum_value": "0", - "maximum_value_warning": "(resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height') if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')", + "maximum_value_warning": "((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height') if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')) - sum(extruderValues('prime_tower_min_volume')) + prime_tower_min_volume", "enabled": "resolveOrValue('prime_tower_enable')", "settable_per_mesh": false, "settable_per_extruder": true From ef2250b88934fde2f9450ed0c984e23cc131b229 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 12:31:42 +0200 Subject: [PATCH 09/18] Don't check if keys are str Our type checking should take care of that. --- plugins/CuraEngineBackend/StartSliceJob.py | 46 ++++++++++------------ 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 78dd4eafd2..12d95b94bc 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -45,35 +45,31 @@ class GcodeStartEndFormatter(Formatter): # The kwargs dictionary contains a dictionary for each stack (with a string of the extruder_nr as their key), # and a default_extruder_nr to use when no extruder_nr is specified - if isinstance(key, str): + try: + extruder_nr = int(kwargs["default_extruder_nr"]) + except ValueError: + extruder_nr = -1 + + key_fragments = [fragment.strip() for fragment in key.split(",")] + if len(key_fragments) == 2: try: - extruder_nr = int(kwargs["default_extruder_nr"]) + extruder_nr = int(key_fragments[1]) except ValueError: - extruder_nr = -1 - - key_fragments = [fragment.strip() for fragment in key.split(",")] - if len(key_fragments) == 2: try: - extruder_nr = int(key_fragments[1]) - except ValueError: - try: - extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack - except (KeyError, ValueError): - # either the key does not exist, or the value is not an int - Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0]) - elif len(key_fragments) != 1: - Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key) - return "{" + str(key) + "}" - - key = key_fragments[0] - try: - return kwargs[str(extruder_nr)][key] - except KeyError: - Logger.log("w", "Unable to replace '%s' placeholder in start/end g-code", key) - return "{" + key + "}" - else: + extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack + except (KeyError, ValueError): + # either the key does not exist, or the value is not an int + Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0]) + elif len(key_fragments) != 1: Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key) - return "{" + str(key) + "}" + return "{" + key + "}" + + key = key_fragments[0] + try: + return kwargs[str(extruder_nr)][key] + except KeyError: + Logger.log("w", "Unable to replace '%s' placeholder in start/end g-code", key) + return "{" + key + "}" ## Job class that builds up the message of scene data to send to CuraEngine. From 8f8c5154388bb249f1651df800bc1a3520f14cfa Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 12:51:27 +0200 Subject: [PATCH 10/18] Fix bug when default_extruder_nr is not provided Then this would not slice because of a KeyError that is not caught. Contributes to issue CURA-5457. --- plugins/CuraEngineBackend/StartSliceJob.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 12d95b94bc..20c426209f 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -41,14 +41,11 @@ class StartJobResult(IntEnum): ## Formatter class that handles token expansion in start/end gcode class GcodeStartEndFormatter(Formatter): - def get_value(self, key: str, *args: str, **kwargs) -> str: #type: ignore # [CodeStyle: get_value is an overridden function from the Formatter class] + def get_value(self, key: str, *args: str, default_extruder_nr: str = "-1", **kwargs) -> str: #type: ignore # [CodeStyle: get_value is an overridden function from the Formatter class] # The kwargs dictionary contains a dictionary for each stack (with a string of the extruder_nr as their key), # and a default_extruder_nr to use when no extruder_nr is specified - try: - extruder_nr = int(kwargs["default_extruder_nr"]) - except ValueError: - extruder_nr = -1 + extruder_nr = int(default_extruder_nr) key_fragments = [fragment.strip() for fragment in key.split(",")] if len(key_fragments) == 2: @@ -56,7 +53,7 @@ class GcodeStartEndFormatter(Formatter): extruder_nr = int(key_fragments[1]) except ValueError: try: - extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack + extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack #TODO: How can you ever provide the '-1' kwarg? except (KeyError, ValueError): # either the key does not exist, or the value is not an int Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0]) From ec00e5b721d45be891e89afe2e603d0b4653c85d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 13:22:17 +0200 Subject: [PATCH 11/18] Remove references to deleted settings Also convert the values for prime_tower_min_volume to make it behave similar to what the minimum volume used to be. This feature fixed a bug with the computation from volume to thickness. Now it's correct but we have to correct the old values to be still the same (approximately) as what used to be the end result. Contributes to issue CURA-5457. --- resources/definitions/builder_premium_large.def.json | 1 - resources/definitions/builder_premium_medium.def.json | 1 - resources/definitions/builder_premium_small.def.json | 1 - resources/definitions/cartesio.def.json | 2 +- resources/definitions/fdmprinter.def.json | 3 +-- .../quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg | 2 +- .../quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg | 2 +- .../quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg | 2 +- .../gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg | 2 +- .../ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg | 3 +-- .../ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg | 3 +-- .../quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg | 1 - .../ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg | 1 - .../ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg | 2 +- .../ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg | 2 +- .../quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg | 2 +- .../quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg | 2 +- .../ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg | 2 +- .../ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg | 5 ++--- .../ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg | 2 +- resources/setting_visibility/advanced.cfg | 1 - resources/setting_visibility/expert.cfg | 3 --- resources/variants/ultimaker3_bb0.8.inst.cfg | 3 +-- resources/variants/ultimaker3_bb04.inst.cfg | 3 +-- resources/variants/ultimaker3_extended_bb0.8.inst.cfg | 3 +-- resources/variants/ultimaker3_extended_bb04.inst.cfg | 3 +-- resources/variants/ultimaker_s5_bb0.8.inst.cfg | 3 +-- resources/variants/ultimaker_s5_bb04.inst.cfg | 3 +-- 47 files changed, 34 insertions(+), 66 deletions(-) diff --git a/resources/definitions/builder_premium_large.def.json b/resources/definitions/builder_premium_large.def.json index 155ce8e962..2e0cd4f839 100644 --- a/resources/definitions/builder_premium_large.def.json +++ b/resources/definitions/builder_premium_large.def.json @@ -54,7 +54,6 @@ "prime_tower_position_y": { "default_value": 178 }, "prime_tower_wipe_enabled": { "default_value": false }, "prime_tower_min_volume": { "default_value": 50 }, - "dual_pre_wipe": { "default_value": false }, "prime_blob_enable": { "enabled": true }, diff --git a/resources/definitions/builder_premium_medium.def.json b/resources/definitions/builder_premium_medium.def.json index c390c3719b..58e7c18ed8 100644 --- a/resources/definitions/builder_premium_medium.def.json +++ b/resources/definitions/builder_premium_medium.def.json @@ -54,7 +54,6 @@ "prime_tower_position_y": { "default_value": 178 }, "prime_tower_wipe_enabled": { "default_value": false }, "prime_tower_min_volume": { "default_value": 50 }, - "dual_pre_wipe": { "default_value": false }, "prime_blob_enable": { "enabled": true }, diff --git a/resources/definitions/builder_premium_small.def.json b/resources/definitions/builder_premium_small.def.json index ec7bf0a345..89e172592c 100644 --- a/resources/definitions/builder_premium_small.def.json +++ b/resources/definitions/builder_premium_small.def.json @@ -53,7 +53,6 @@ "prime_tower_position_y": { "default_value": 178 }, "prime_tower_wipe_enabled": { "default_value": false }, "prime_tower_min_volume": { "default_value": 50 }, - "dual_pre_wipe": { "default_value": false }, "prime_blob_enable": { "enabled": true }, diff --git a/resources/definitions/cartesio.def.json b/resources/definitions/cartesio.def.json index d2b7242d8c..04279ce392 100644 --- a/resources/definitions/cartesio.def.json +++ b/resources/definitions/cartesio.def.json @@ -44,7 +44,7 @@ "material_print_temp_wait": { "default_value": false }, "material_bed_temp_wait": { "default_value": false }, "prime_tower_enable": { "default_value": false }, - "prime_tower_wall_thickness": { "resolve": 0.7 }, + "prime_tower_min_volume": { "value": "0.7" }, "prime_tower_size": { "value": 24.0 }, "prime_tower_position_x": { "value": 125 }, "prime_tower_position_y": { "value": 70 }, diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 0df057453f..d96aeaa52a 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4992,8 +4992,7 @@ "description": "The minimum volume for each layer of the prime tower in order to purge enough material.", "unit": "mm³", "type": "float", - "default_value": 10, - "value": "8.48 if prime_tower_circular else 10", + "default_value": 5, "minimum_value": "0", "maximum_value_warning": "((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height') if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')) - sum(extruderValues('prime_tower_min_volume')) + prime_tower_min_volume", "enabled": "resolveOrValue('prime_tower_enable')", diff --git a/resources/quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg b/resources/quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg index 90a17d5efd..7fd2ab2296 100644 --- a/resources/quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg +++ b/resources/quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg @@ -64,7 +64,7 @@ ooze_shield_enabled = True prime_tower_enable = False prime_tower_position_x = 350 prime_tower_position_y = 350 -prime_tower_wall_thickness = 2 +prime_tower_min_volume = 18 switch_extruder_retraction_amount = 6 switch_extruder_retraction_speeds = 60 diff --git a/resources/quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg b/resources/quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg index a4860def71..30a99ef243 100644 --- a/resources/quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg +++ b/resources/quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg @@ -64,7 +64,7 @@ ooze_shield_enabled = True prime_tower_enable = False prime_tower_position_x = 350 prime_tower_position_y = 350 -prime_tower_wall_thickness = 2 +prime_tower_min_volume = 18 switch_extruder_retraction_amount = 6 switch_extruder_retraction_speeds = 60 diff --git a/resources/quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg b/resources/quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg index 8fe0b07c76..decafac241 100644 --- a/resources/quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg +++ b/resources/quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg @@ -64,7 +64,7 @@ ooze_shield_enabled = True prime_tower_enable = False prime_tower_position_x = 350 prime_tower_position_y = 350 -prime_tower_wall_thickness = 2 +prime_tower_min_volume = 18 switch_extruder_retraction_amount = 6 switch_extruder_retraction_speeds = 60 diff --git a/resources/quality/gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg b/resources/quality/gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg index bfa45804d0..a74bdfdd78 100644 --- a/resources/quality/gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg +++ b/resources/quality/gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg @@ -63,7 +63,7 @@ ooze_shield_enabled = True prime_tower_enable = False prime_tower_position_x = 350 prime_tower_position_y = 350 -prime_tower_wall_thickness = 2 +prime_tower_min_volume = 18 switch_extruder_retraction_amount = 6 switch_extruder_retraction_speeds = 60 diff --git a/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg index be67da4c12..428f5c1101 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg @@ -15,9 +15,8 @@ variant = AA 0.25 cool_fan_speed = 40 infill_overlap = 15 material_final_print_temperature = =material_print_temperature - 5 -prime_tower_purge_volume = 0.6 prime_tower_size = 12 -prime_tower_wall_thickness = 0.9 +prime_tower_min_volume = 2 retraction_prime_speed = 25 speed_topbottom = =math.ceil(speed_print * 30 / 55) wall_thickness = 0.92 diff --git a/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg index 6ca8bff496..127032e118 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg @@ -12,9 +12,8 @@ material = generic_cpe variant = AA 0.25 [values] -prime_tower_purge_volume = 1 prime_tower_size = 12 -prime_tower_wall_thickness = 0.9 +prime_tower_min_volume = 2 retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg index ed8055bd18..1891a274c8 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg @@ -16,7 +16,6 @@ material_print_temperature = =default_material_print_temperature + 10 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 -prime_tower_purge_volume = 1 skin_overlap = 20 speed_print = 60 speed_layer_0 = =math.ceil(speed_print * 20 / 60) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg index 70b679888f..e4cfdb67fc 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg @@ -17,7 +17,6 @@ material_print_temperature = =default_material_print_temperature + 5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 -prime_tower_purge_volume = 1 speed_print = 60 speed_layer_0 = =math.ceil(speed_print * 20 / 60) speed_topbottom = =math.ceil(speed_print * 30 / 60) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg index 2555193a9e..cec4b950cf 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg @@ -19,7 +19,6 @@ material_print_temperature = =default_material_print_temperature - 5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 -prime_tower_purge_volume = 1 speed_print = 50 speed_layer_0 = =math.ceil(speed_print * 20 / 50) speed_topbottom = =math.ceil(speed_print * 30 / 50) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg index 775cac95cf..892083b264 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg @@ -17,7 +17,6 @@ machine_nozzle_heat_up_speed = 1.5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 -prime_tower_purge_volume = 1 speed_print = 55 speed_layer_0 = =math.ceil(speed_print * 20 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg index 25e74e0687..170643275c 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg @@ -17,7 +17,6 @@ line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 15 material_standby_temperature = 100 prime_tower_enable = True -prime_tower_purge_volume = 1 speed_print = 40 speed_topbottom = =math.ceil(speed_print * 25 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg index 5d08b6f430..5b3cb52f18 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg @@ -18,7 +18,6 @@ line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 20 material_standby_temperature = 100 prime_tower_enable = True -prime_tower_purge_volume = 1 speed_print = 45 speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg index 3dafde24c1..fff96ba9fc 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg @@ -18,7 +18,6 @@ line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 17 material_standby_temperature = 100 prime_tower_enable = True -prime_tower_purge_volume = 1 speed_print = 40 speed_topbottom = =math.ceil(speed_print * 25 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg index c2bfc84ea8..19496565bc 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 10 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg index 7ff5ab264e..aeee3b4e09 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 20 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg index c38980a198..fcd4fcd999 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 15 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg index 79d388d4c3..52fe1cb01d 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg @@ -35,7 +35,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 10 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg index a19bc9be91..857ea39491 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -36,7 +36,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 15 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg index dd28610db5..10673c133a 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -35,7 +35,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 20 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg index 8a2b6e75a5..e58a1bd87d 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg @@ -15,9 +15,8 @@ variant = AA 0.25 cool_fan_speed = 40 infill_overlap = 15 material_final_print_temperature = =material_print_temperature - 5 -prime_tower_purge_volume = 0.6 prime_tower_size = 12 -prime_tower_wall_thickness = 0.9 +prime_tower_min_volume = 2 retraction_prime_speed = 25 speed_topbottom = =math.ceil(speed_print * 30 / 55) wall_thickness = 0.92 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg index 91258147fd..1c1833a385 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg @@ -13,10 +13,9 @@ variant = AA 0.25 [values] prime_tower_size = 12 -prime_tower_wall_thickness = 0.9 +prime_tower_min_volume = 2 retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) top_bottom_thickness = 0.8 -wall_thickness = 0.92 -prime_tower_purge_volume = 1 +wall_thickness = 0.92 \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg index 2bd217676b..c51e5652e1 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg @@ -26,4 +26,3 @@ wall_thickness = 1 infill_pattern = zigzag speed_infill = =math.ceil(speed_print * 50 / 60) -prime_tower_purge_volume = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg index 53f7a4b9f4..b80d3ccf22 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg @@ -23,5 +23,4 @@ speed_wall = =math.ceil(speed_print * 40 / 60) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) infill_pattern = zigzag -speed_infill = =math.ceil(speed_print * 50 / 60) -prime_tower_purge_volume = 1 +speed_infill = =math.ceil(speed_print * 50 / 60) \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg index 807718c7e8..c90eedaec3 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg @@ -24,5 +24,4 @@ speed_topbottom = =math.ceil(speed_print * 30 / 50) speed_wall = =math.ceil(speed_print * 30 / 50) infill_pattern = zigzag -speed_infill = =math.ceil(speed_print * 40 / 50) -prime_tower_purge_volume = 1 +speed_infill = =math.ceil(speed_print * 40 / 50) \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg index 3e7db52e6a..e098b0ffb4 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg @@ -22,5 +22,4 @@ speed_topbottom = =math.ceil(speed_print * 30 / 55) speed_wall = =math.ceil(speed_print * 30 / 55) infill_pattern = zigzag -speed_infill = =math.ceil(speed_print * 45 / 55) -prime_tower_purge_volume = 1 +speed_infill = =math.ceil(speed_print * 45 / 55) \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg index b11ecfcad9..532aacabf7 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg @@ -21,5 +21,4 @@ speed_print = 40 speed_topbottom = =math.ceil(speed_print * 25 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) -jerk_travel = 50 -prime_tower_purge_volume = 1 +jerk_travel = 50 \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg index 4cd0fb22d7..55b9ae8315 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg @@ -22,5 +22,4 @@ speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) -jerk_travel = 50 -prime_tower_purge_volume = 1 +jerk_travel = 50 \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg index ce851fb467..01761062a4 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg @@ -22,4 +22,3 @@ speed_topbottom = =math.ceil(speed_print * 25 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) jerk_travel = 50 -prime_tower_purge_volume = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg index 7b99a4d6bd..fee58b367d 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 10 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg index 4a7ec288f5..aaa810e864 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 20 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg index e72e87da92..5b8aa6d2e1 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg @@ -28,7 +28,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 15 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg index d097b34a61..889ffaf567 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg @@ -33,7 +33,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 10 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg index 4fc67e68b2..fca907e8fd 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -34,7 +34,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 20 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg index d0ff5ebac5..673d64d432 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -33,7 +33,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 15 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/setting_visibility/advanced.cfg b/resources/setting_visibility/advanced.cfg index 4d4129f2cb..43edb13495 100644 --- a/resources/setting_visibility/advanced.cfg +++ b/resources/setting_visibility/advanced.cfg @@ -123,7 +123,6 @@ brim_outside_only prime_tower_enable prime_tower_position_x prime_tower_position_y -prime_tower_purge_volume [meshfix] diff --git a/resources/setting_visibility/expert.cfg b/resources/setting_visibility/expert.cfg index 5cb8c4fd2b..0f15247eb7 100644 --- a/resources/setting_visibility/expert.cfg +++ b/resources/setting_visibility/expert.cfg @@ -291,13 +291,10 @@ prime_tower_enable prime_tower_circular prime_tower_size prime_tower_min_volume -prime_tower_wall_thickness prime_tower_position_x prime_tower_position_y prime_tower_flow prime_tower_wipe_enabled -dual_pre_wipe -prime_tower_purge_volume ooze_shield_enabled ooze_shield_angle ooze_shield_dist diff --git a/resources/variants/ultimaker3_bb0.8.inst.cfg b/resources/variants/ultimaker3_bb0.8.inst.cfg index e49efa7144..9ad4284b40 100644 --- a/resources/variants/ultimaker3_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_bb0.8.inst.cfg @@ -40,8 +40,7 @@ material_print_temperature = =default_material_print_temperature + 10 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 2.2 +prime_tower_min_volume = 20 prime_tower_wipe_enabled = True raft_acceleration = =acceleration_layer_0 raft_airgap = 0 diff --git a/resources/variants/ultimaker3_bb04.inst.cfg b/resources/variants/ultimaker3_bb04.inst.cfg index 9741ff6aff..f07a4a55f9 100644 --- a/resources/variants/ultimaker3_bb04.inst.cfg +++ b/resources/variants/ultimaker3_bb04.inst.cfg @@ -22,8 +22,7 @@ jerk_support_bottom = =math.ceil(jerk_support_interface * 1 / 10) machine_nozzle_heat_up_speed = 1.5 machine_nozzle_id = BB 0.4 machine_nozzle_tip_outer_diameter = 1.0 -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 1.5 +prime_tower_min_volume = 15 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 diff --git a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg index a2aa7cd843..d7a76d538a 100644 --- a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg @@ -40,8 +40,7 @@ material_print_temperature = =default_material_print_temperature + 10 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 2.2 +prime_tower_min_volume = 20 prime_tower_wipe_enabled = True raft_acceleration = =acceleration_layer_0 raft_airgap = 0 diff --git a/resources/variants/ultimaker3_extended_bb04.inst.cfg b/resources/variants/ultimaker3_extended_bb04.inst.cfg index 89bfdf69b9..6e882cfa04 100644 --- a/resources/variants/ultimaker3_extended_bb04.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb04.inst.cfg @@ -22,8 +22,7 @@ jerk_support_bottom = =math.ceil(jerk_support_interface * 1 / 10) machine_nozzle_heat_up_speed = 1.5 machine_nozzle_id = BB 0.4 machine_nozzle_tip_outer_diameter = 1.0 -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 1.5 +prime_tower_min_volume = 15 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 diff --git a/resources/variants/ultimaker_s5_bb0.8.inst.cfg b/resources/variants/ultimaker_s5_bb0.8.inst.cfg index 16ab998dc3..6b954041ab 100644 --- a/resources/variants/ultimaker_s5_bb0.8.inst.cfg +++ b/resources/variants/ultimaker_s5_bb0.8.inst.cfg @@ -40,8 +40,7 @@ material_print_temperature = =default_material_print_temperature + 10 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 2.2 +prime_tower_min_volume = 20 prime_tower_wipe_enabled = True raft_acceleration = =acceleration_layer_0 raft_airgap = 0 diff --git a/resources/variants/ultimaker_s5_bb04.inst.cfg b/resources/variants/ultimaker_s5_bb04.inst.cfg index 473baf2a5c..634920ca65 100644 --- a/resources/variants/ultimaker_s5_bb04.inst.cfg +++ b/resources/variants/ultimaker_s5_bb04.inst.cfg @@ -22,8 +22,7 @@ jerk_support_bottom = =math.ceil(jerk_support_interface * 1 / 10) machine_nozzle_heat_up_speed = 1.5 machine_nozzle_id = BB 0.4 machine_nozzle_tip_outer_diameter = 1.0 -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 1.5 +prime_tower_min_volume = 20 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 From 9c40b1de921b335d20a98a4eb6a5077f0ba68b8f Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 6 Jul 2018 15:13:04 +0200 Subject: [PATCH 12/18] Remove code that is likely for debugging CURA-5545 --- plugins/3MFReader/ThreeMFReader.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 6bfe920863..0280600834 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -169,8 +169,6 @@ class ThreeMFReader(MeshReader): archive = zipfile.ZipFile(file_name, "r") self._base_name = os.path.basename(file_name) parser = Savitar.ThreeMFParser() - with open("/tmp/test.xml", "wb") as f: - f.write(archive.open("3D/3dmodel.model").read()) scene_3mf = parser.parse(archive.open("3D/3dmodel.model").read()) self._unit = scene_3mf.getUnit() for node in scene_3mf.getSceneNodes(): From 6977b8de6e39d8bd7feab8b10d23ffd755f4b76e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 09:01:52 +0200 Subject: [PATCH 13/18] Make getValue return an int if it's an integer number This is a more generic solution to what's done in 7058ddbb66084bee9cd507ed69f031ec1262163e. Contributes to issue CURA-5491. --- plugins/PostProcessingPlugin/Script.py | 9 ++++++--- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/PostProcessingPlugin/Script.py b/plugins/PostProcessingPlugin/Script.py index d844705f1c..cc839ca485 100644 --- a/plugins/PostProcessingPlugin/Script.py +++ b/plugins/PostProcessingPlugin/Script.py @@ -105,9 +105,12 @@ class Script: if m is None: return default try: - return float(m.group(0)) - except: - return default + return int(m.group(0)) + except ValueError: #Not an integer. + try: + return float(m.group(0)) + except ValueError: #Not a number at all. + return default ## Convenience function to produce a line of g-code. # diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index c78351909d..a70a54559c 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -162,12 +162,12 @@ class PauseAtHeight(Script): #Track the latest printing temperature in order to resume at the correct temperature. if line.startswith("T"): - current_t = int(self.getValue(line, "T")) + current_t = self.getValue(line, "T") m = self.getValue(line, "M") - if m is not None and (int(m) == 104 or int(m) == 109) and self.getValue(line, "S") is not None: + if m is not None and (m == 104 or m == 109) and self.getValue(line, "S") is not None: extruder = current_t if self.getValue(line, "T") is not None: - extruder = int(self.getValue(line, "T")) + extruder = self.getValue(line, "T") target_temperature[extruder] = self.getValue(line, "S") if not layers_started: From 41857338cbd13d337742b4e000048e7f85c3e779 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 09:27:11 +0200 Subject: [PATCH 14/18] Use firmware retraction and temperature control settings Instead of deriving this from the g-code flavour, just use the actual settings that are made to control these two properties. Contributes to issue CURA-5491. --- .../scripts/PauseAtHeight.py | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 4d8bee76f3..545db24048 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -1,5 +1,9 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + from ..Script import Script -# from cura.Settings.ExtruderManager import ExtruderManager + +from UM.Application import Application #To get the current printer's settings. class PauseAtHeight(Script): def __init__(self): @@ -136,9 +140,10 @@ class PauseAtHeight(Script): layers_started = False redo_layers = self.getSettingValueByKey("redo_layers") standby_temperature = self.getSettingValueByKey("standby_temperature") + firmware_retract = Application.getInstance().getGlobalContainerStack().getProperty("machine_firmware_retract", "value") + control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value") is_griffin = False - is_ultigcode = False # T = ExtruderManager.getInstance().getActiveExtruderStack().getProperty("material_print_temperature", "value") @@ -158,8 +163,6 @@ class PauseAtHeight(Script): for line in lines: if ";FLAVOR:Griffin" in line: is_griffin = True - if ";FLAVOR:UltiGCode" in line: - is_ultigcode = True # Fist positive layer reached if ";LAYER:0" in line: layers_started = True @@ -263,8 +266,8 @@ class PauseAtHeight(Script): # Retraction prepend_gcode += self.putValue(M = 83) + "\n" if retraction_amount != 0: - if is_ultigcode: - prepend_gcode += self.putValue(G = 10) + "; retract for ultigcode\n" + if firmware_retract: + prepend_gcode += self.putValue(G = 10) else: prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n" @@ -277,7 +280,7 @@ class PauseAtHeight(Script): if current_z < 15: prepend_gcode += self.putValue(G = 1, Z = 15, F = 300) + "\n" - if not is_ultigcode: # We don't know about what temperatures are used in ultigcode, so do not touch + if control_temperatures: # Set extruder standby temperature prepend_gcode += self.putValue(M = 104, S = standby_temperature) + "; standby temperature\n" @@ -285,7 +288,7 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(M = 0) + ";Do the actual pause\n" if not is_griffin: - if not is_ultigcode: # will be 0 for ultigcode + if control_temperatures: # Set extruder resume temperature prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" @@ -306,8 +309,8 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" if retraction_amount != 0: - if is_ultigcode: - prepend_gcode += self.putValue(G = 11) + "; unretract for ultigcode\n" + if firmware_retract: + prepend_gcode += self.putValue(G = 11) else: prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" prepend_gcode += self.putValue(G = 1, F = 9000) + "\n" From 853266e8a81cf87370387cc32bdfcf5e4f19006c Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Jul 2018 10:57:24 +0200 Subject: [PATCH 15/18] Fix upgrade from 3.4 to 4.0 --- .../VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py index 2877985921..0cf7ef0cc4 100644 --- a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py @@ -71,6 +71,8 @@ class VersionUpgrade34to40(VersionUpgrade): self._resetConcentric3DInfillPattern(parser) if "values" in parser: for deleted_setting in deleted_settings: + if deleted_setting not in parser["values"]: + continue del parser["values"][deleted_setting] result = io.StringIO() From 54b990c0bd32dc7d2ee231a3453e89cb8440e954 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 11:21:16 +0200 Subject: [PATCH 16/18] Retract further if we can't set the temperature to stand-by temp Because we can't set the temperature and we don't know the correct temperature to set it back to, we will just retract further in order to prevent damage to the material. Contributes to issue CURA-5491. --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 545db24048..6354dd4f04 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -266,8 +266,10 @@ class PauseAtHeight(Script): # Retraction prepend_gcode += self.putValue(M = 83) + "\n" if retraction_amount != 0: - if firmware_retract: - prepend_gcode += self.putValue(G = 10) + if firmware_retract: #Can't set the distance directly to what the user wants. We have to choose ourselves. + retraction_count = 1 if control_temperatures else 3 #Retract more if we don't control the temperature. + for i in range(retraction_count): + prepend_gcode += self.putValue(G = 10) + "\n" else: prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n" @@ -309,8 +311,10 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" if retraction_amount != 0: - if firmware_retract: - prepend_gcode += self.putValue(G = 11) + if firmware_retract: #Can't set the distance directly to what the user wants. We have to choose ourselves. + retraction_count = 1 if control_temperatures else 3 #Retract more if we don't control the temperature. + for i in range(retraction_count): + 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" From dec9d7cac661bce69356399ad112854329d2f799 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 11:32:53 +0200 Subject: [PATCH 17/18] Still store disabled extruders as a set They should be unique anyway. Contributes to issue CURA-5456. --- plugins/CuraEngineBackend/StartSliceJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 20c426209f..e208c9480b 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -227,7 +227,7 @@ class StartSliceJob(Job): if has_model_with_disabled_extruders: self.setResult(StartJobResult.ObjectsWithDisabledExtruder) - associated_disabled_extruders = [str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])] + associated_disabled_extruders = {str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])} self.setMessage(", ".join(associated_disabled_extruders)) return From f59f23c027a4918be96552eba9e33c44d7beefef Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 11:41:02 +0200 Subject: [PATCH 18/18] Fix sending print job name via USB --- plugins/USBPrinting/USBPrinterOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 69a0ecb40c..f9c6011f7b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -423,7 +423,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): elapsed_time = int(time() - self._print_start_time) print_job = self._printers[0].activePrintJob if print_job is None: - print_job = PrintJobOutputModel(output_controller = GenericOutputController(self), name= Application.getInstance().getPrintInformation().jobName) + print_job = PrintJobOutputModel(output_controller = GenericOutputController(self), name= CuraApplication.getInstance().getPrintInformation().jobName) print_job.updateState("printing") self._printers[0].updateActivePrintJob(print_job)