diff --git a/conandata.yml b/conandata.yml index fa0305261c7..1d4139ed07a 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,16 +1,16 @@ -version: "5.9.0-beta.1" +version: "5.10.0-alpha.0" requirements: - - "cura_resources/5.9.0-beta.1" - - "uranium/5.9.0-beta.1" - - "curaengine/5.9.0-beta.1" - - "cura_binary_data/5.9.0-beta.1" - - "fdm_materials/5.9.0-beta.1" + - "cura_resources/(latest)@ultimaker/testing" + - "uranium/(latest)@ultimaker/testing" + - "curaengine/(latest)@ultimaker/testing" + - "cura_binary_data/(latest)@ultimaker/testing" + - "fdm_materials/(latest)@ultimaker/testing" - "dulcificum/0.2.1" - "pysavitar/5.3.0" - "pynest2d/5.3.0" - "native_cad_plugin/2.0.0" requirements_internal: - - "fdm_materials/5.9.0-beta.1" + - "fdm_materials/(latest)@ultimaker/testing" - "cura_private_data/(latest)@internal/testing" urls: default: diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 0789e8a6845..875bbe153bb 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -614,6 +614,7 @@ def _buildExtruderMessage(self, stack: ContainerStack) -> None: # Replace the setting tokens in start and end g-code. extruder_nr = stack.getProperty("extruder_nr", "value") + settings["machine_extruder_prestart_code"] = self._expandGcodeTokens(settings["machine_extruder_prestart_code"], extruder_nr) settings["machine_extruder_start_code"] = self._expandGcodeTokens(settings["machine_extruder_start_code"], extruder_nr) settings["machine_extruder_end_code"] = self._expandGcodeTokens(settings["machine_extruder_end_code"], extruder_nr) diff --git a/plugins/MachineSettingsAction/MachineSettingsExtruderTab.qml b/plugins/MachineSettingsAction/MachineSettingsExtruderTab.qml index ab7442bd4e8..6f5bc54def5 100644 --- a/plugins/MachineSettingsAction/MachineSettingsExtruderTab.qml +++ b/plugins/MachineSettingsAction/MachineSettingsExtruderTab.qml @@ -54,7 +54,7 @@ Item { anchors.top: parent.top anchors.left: parent.left - width: parent.width * 2 / 3 + width: parent.width / 2 spacing: base.columnSpacing @@ -139,6 +139,39 @@ Item decimals: 0 forceUpdateOnChangeFunction: forceUpdateFunction } + } + + + // ======================================= + // Right-side column "Nozzle Settings" + // ======================================= + Column + { + anchors.top: parent.top + anchors.right: parent.right + width: parent.width / 2 + + spacing: base.columnSpacing + + UM.Label // Title Label + { + text: catalog.i18nc("@title:label", " ") + font: UM.Theme.getFont("medium_bold") + } + + Cura.NumericTextFieldWithUnit + { + id: extruderChangeDurationFieldId + containerStackId: base.extruderStackId + settingKey: "machine_extruder_change_duration" + settingStoreIndex: propertyStoreIndex + labelText: catalog.i18nc("@label", "Extruder Change duration") + labelFont: base.labelFont + labelWidth: base.labelWidth + controlWidth: base.controlWidth + unitText: catalog.i18nc("@label", "s") + forceUpdateOnChangeFunction: forceUpdateFunction + } Cura.NumericTextFieldWithUnit { @@ -179,18 +212,42 @@ Item anchors.right: parent.right anchors.margins: UM.Theme.getSize("default_margin").width - Cura.GcodeTextArea // "Extruder Start G-code" + Column { anchors.top: parent.top + anchors.left: parent.left anchors.bottom: buttonLearnMore.top anchors.bottomMargin: UM.Theme.getSize("default_margin").height - anchors.left: parent.left - width: base.columnWidth - UM.Theme.getSize("default_margin").width + + width: parent.width / 2 - labelText: catalog.i18nc("@title:label", "Extruder Start G-code") - containerStackId: base.extruderStackId - settingKey: "machine_extruder_start_code" - settingStoreIndex: propertyStoreIndex + spacing: base.columnSpacing + + Cura.GcodeTextArea // "Extruder Prestart G-code" + { + anchors.top: parent.top + anchors.left: parent.left + height: (parent.height / 2) - UM.Theme.getSize("default_margin").height + width: base.columnWidth - UM.Theme.getSize("default_margin").width + + labelText: catalog.i18nc("@title:label", "Extruder Prestart G-code") + containerStackId: base.extruderStackId + settingKey: "machine_extruder_prestart_code" + settingStoreIndex: propertyStoreIndex + } + + Cura.GcodeTextArea // "Extruder Start G-code" + { + anchors.bottom: parent.bottom + anchors.left: parent.left + height: (parent.height / 2) - UM.Theme.getSize("default_margin").height + width: base.columnWidth - UM.Theme.getSize("default_margin").width + + labelText: catalog.i18nc("@title:label", "Extruder Start G-code") + containerStackId: base.extruderStackId + settingKey: "machine_extruder_start_code" + settingStoreIndex: propertyStoreIndex + } } Cura.GcodeTextArea // "Extruder End G-code" diff --git a/plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml b/plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml index b01060c1dfd..c2238d2205c 100644 --- a/plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml +++ b/plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml @@ -344,6 +344,21 @@ Item labelWidth: base.labelWidth forceUpdateOnChangeFunction: forceUpdateFunction } + + /* + - Allows user to toggle if Start Gcode is the absolute first gcode. + */ + Cura.SimpleCheckBox // "Make sure Start Code is before all gcodes" + { + id: applyStartGcodeFirstCheckbox + containerStackId: machineStackId + settingKey: "machine_start_gcode_first" + settingStoreIndex: propertyStoreIndex + labelText: catalog.i18nc("@label", "Start GCode must be first") + labelFont: base.labelFont + labelWidth: base.labelWidth + forceUpdateOnChangeFunction: forceUpdateFunction + } /* The "Shared Heater" feature is temporarily disabled because its diff --git a/resources/definitions/eazao_m500.def.json b/resources/definitions/eazao_m500.def.json index 70ab78a5a66..263fd551a73 100644 --- a/resources/definitions/eazao_m500.def.json +++ b/resources/definitions/eazao_m500.def.json @@ -9,7 +9,7 @@ "manufacturer": "Eazao", "file_formats": "text/x-gcode", "has_machine_quality": false, - "has_materials": false, + "has_materials": true, "machine_extruder_trains": { "0": "eazao_m500_extruder_0" }, "preferred_quality_type": "normal" }, @@ -58,7 +58,7 @@ "retraction_amount": { "value": 7 }, "retraction_combing": { "value": "'noskin'" }, "retraction_count_max": { "value": 100 }, - "retraction_enable": { "value": false }, + "retraction_enable": { "value": true }, "retraction_extrusion_window": { "value": 10 }, "retraction_hop": { "value": 0.2 }, "speed_print": { "value": 20.0 }, @@ -71,4 +71,4 @@ "top_bottom_thickness": { "value": 3 }, "wall_thickness": { "value": 5.0 } } -} \ No newline at end of file +} diff --git a/resources/definitions/eazao_m600.def.json b/resources/definitions/eazao_m600.def.json index 35a946e25e5..dc5af2d3181 100644 --- a/resources/definitions/eazao_m600.def.json +++ b/resources/definitions/eazao_m600.def.json @@ -9,7 +9,7 @@ "manufacturer": "Eazao", "file_formats": "text/x-gcode", "has_machine_quality": false, - "has_materials": false, + "has_materials": true, "machine_extruder_trains": { "0": "eazao_m600_extruder_0" }, "preferred_quality_type": "normal" }, @@ -58,7 +58,7 @@ "retraction_amount": { "value": 7 }, "retraction_combing": { "value": "'noskin'" }, "retraction_count_max": { "value": 100 }, - "retraction_enable": { "value": false }, + "retraction_enable": { "value": true }, "retraction_extrusion_window": { "value": 10 }, "retraction_hop": { "value": 0.2 }, "speed_print": { "value": 20.0 }, @@ -71,4 +71,4 @@ "top_bottom_thickness": { "value": 3 }, "wall_thickness": { "value": 5.0 } } -} \ No newline at end of file +} diff --git a/resources/definitions/eazao_m700.def.json b/resources/definitions/eazao_m700.def.json index 8459b3625da..d532299e890 100644 --- a/resources/definitions/eazao_m700.def.json +++ b/resources/definitions/eazao_m700.def.json @@ -9,7 +9,7 @@ "manufacturer": "Eazao", "file_formats": "text/x-gcode", "has_machine_quality": false, - "has_materials": false, + "has_materials": true, "machine_extruder_trains": { "0": "eazao_m700_extruder_0" }, "preferred_quality_type": "normal" }, @@ -58,7 +58,7 @@ "retraction_amount": { "value": 7 }, "retraction_combing": { "value": "'noskin'" }, "retraction_count_max": { "value": 100 }, - "retraction_enable": { "value": false }, + "retraction_enable": { "value": true }, "retraction_extrusion_window": { "value": 10 }, "retraction_hop": { "value": 0.2 }, "speed_print": { "value": 20.0 }, @@ -71,4 +71,4 @@ "top_bottom_thickness": { "value": 3 }, "wall_thickness": { "value": 5.0 } } -} \ No newline at end of file +} diff --git a/resources/definitions/eazao_potter.def.json b/resources/definitions/eazao_potter.def.json index 0ff84ab4291..5fbdb46b53d 100644 --- a/resources/definitions/eazao_potter.def.json +++ b/resources/definitions/eazao_potter.def.json @@ -9,7 +9,7 @@ "manufacturer": "Eazao", "file_formats": "text/x-gcode", "has_machine_quality": false, - "has_materials": false, + "has_materials": true, "machine_extruder_trains": { "0": "eazao_potter_extruder_0" }, "preferred_quality_type": "normal" }, @@ -58,7 +58,7 @@ "retraction_amount": { "value": 7 }, "retraction_combing": { "value": "'noskin'" }, "retraction_count_max": { "value": 100 }, - "retraction_enable": { "value": false }, + "retraction_enable": { "value": true }, "retraction_extrusion_window": { "value": 10 }, "retraction_hop": { "value": 0.2 }, "speed_print": { "value": 25.0 }, @@ -71,4 +71,4 @@ "top_bottom_thickness": { "value": 3 }, "wall_thickness": { "value": 3.0 } } -} \ No newline at end of file +} diff --git a/resources/definitions/eazao_zero.def.json b/resources/definitions/eazao_zero.def.json index df6f4faa183..314e831eaaf 100644 --- a/resources/definitions/eazao_zero.def.json +++ b/resources/definitions/eazao_zero.def.json @@ -9,7 +9,7 @@ "manufacturer": "Eazao", "file_formats": "text/x-gcode", "has_machine_quality": false, - "has_materials": false, + "has_materials": true, "machine_extruder_trains": { "0": "eazao_zero_extruder_0" }, "preferred_quality_type": "normal" }, @@ -60,7 +60,7 @@ "retraction_combing": { "value": "'noskin'" }, "retraction_combing_max_distance": { "value": 0 }, "retraction_count_max": { "value": 100 }, - "retraction_enable": { "value": false }, + "retraction_enable": { "value": true }, "retraction_extrusion_window": { "value": 10 }, "retraction_hop": { "value": 0.2 }, "speed_print": { "value": 25.0 }, @@ -69,4 +69,4 @@ "top_bottom_thickness": { "value": 3 }, "wall_thickness": { "value": 3.0 } } -} \ No newline at end of file +} diff --git a/resources/definitions/fdmextruder.def.json b/resources/definitions/fdmextruder.def.json index 0b2f3ff33d1..684fff180b7 100644 --- a/resources/definitions/fdmextruder.def.json +++ b/resources/definitions/fdmextruder.def.json @@ -39,6 +39,18 @@ "type": "float", "unit": "mm" }, + "machine_extruder_change_duration": + { + "default_value": 0, + "description": "When using a multi tool setup, this value is the tool change time in seconds. This value will be added to the estimate time based on the number of changes that occur.", + "label": "Extruder Change duration", + "minimum_value": "0", + "settable_globally": false, + "settable_per_extruder": true, + "settable_per_mesh": false, + "settable_per_meshgroup": false, + "type": "float" + }, "machine_extruder_cooling_fan_number": { "default_value": 0, @@ -109,6 +121,17 @@ "type": "float", "unit": "mm" }, + "machine_extruder_prestart_code": + { + "default_value": "", + "description": "Prestart g-code to execute before switching to this extruder.", + "label": "Extruder Prestart G-Code", + "settable_globally": false, + "settable_per_extruder": true, + "settable_per_mesh": false, + "settable_per_meshgroup": false, + "type": "str" + }, "machine_extruder_start_code": { "default_value": "", diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 54d92af015f..75f7873246b 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -513,6 +513,16 @@ "settable_per_extruder": false, "settable_per_meshgroup": false }, + "machine_start_gcode_first": + { + "label": "Start GCode must be first", + "description": "This setting controls if the start-gcode is forced to always be the first g-code. Without this option other g-code, such as a T0 can be inserted before the start g-code.", + "type": "bool", + "default_value": false, + "settable_per_mesh": false, + "settable_per_extruder": false, + "settable_per_meshgroup": false + }, "extruder_prime_pos_z": { "label": "Extruder Prime Z Position", diff --git a/resources/definitions/voron2_stealthchanger_base.def.json b/resources/definitions/voron2_stealthchanger_base.def.json index e1db1d24c3d..3fccc15db3b 100644 --- a/resources/definitions/voron2_stealthchanger_base.def.json +++ b/resources/definitions/voron2_stealthchanger_base.def.json @@ -24,6 +24,7 @@ "machine_end_gcode": { "default_value": "PRINT_END" }, "machine_extruder_count": { "default_value": 1 }, "machine_name": { "default_value": "VORON2 StealthChanger" }, - "machine_start_gcode": { "default_value": "PRINT_START TOOL_TEMP={material_print_temperature_layer_0} T{initial_extruder_nr}_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} TOOL={initial_extruder_nr}" } + "machine_start_gcode": { "default_value": "PRINT_START TOOL_TEMP={material_print_temperature_layer_0} T{initial_extruder_nr}_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} TOOL={initial_extruder_nr}" }, + "machine_start_gcode_first": { "default_value": true } } } \ No newline at end of file diff --git a/resources/extruders/voron2_stealthchanger_extruder_0.def.json b/resources/extruders/voron2_stealthchanger_extruder_0.def.json index 55ddf8f90b5..e3f8cd07016 100644 --- a/resources/extruders/voron2_stealthchanger_extruder_0.def.json +++ b/resources/extruders/voron2_stealthchanger_extruder_0.def.json @@ -14,9 +14,11 @@ "default_value": 0, "maximum_value": 7 }, + "machine_extruder_change_duration": { "default_value": 10.0 }, "machine_extruder_end_pos_abs": { "default_value": true }, "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_prestart_code": { "default_value": "M104 S{material_print_temperature} T{extruder_nr}" }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, diff --git a/resources/extruders/voron2_stealthchanger_extruder_1.def.json b/resources/extruders/voron2_stealthchanger_extruder_1.def.json index ad299669608..b6338a38f59 100644 --- a/resources/extruders/voron2_stealthchanger_extruder_1.def.json +++ b/resources/extruders/voron2_stealthchanger_extruder_1.def.json @@ -14,9 +14,11 @@ "default_value": 1, "maximum_value": 7 }, + "machine_extruder_change_duration": { "default_value": 10.0 }, "machine_extruder_end_pos_abs": { "default_value": true }, "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_prestart_code": { "default_value": "M104 S{material_print_temperature} T{extruder_nr}" }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, diff --git a/resources/extruders/voron2_stealthchanger_extruder_2.def.json b/resources/extruders/voron2_stealthchanger_extruder_2.def.json index ec3b6ff3a98..f101cdaf689 100644 --- a/resources/extruders/voron2_stealthchanger_extruder_2.def.json +++ b/resources/extruders/voron2_stealthchanger_extruder_2.def.json @@ -14,9 +14,11 @@ "default_value": 2, "maximum_value": 7 }, + "machine_extruder_change_duration": { "default_value": 10.0 }, "machine_extruder_end_pos_abs": { "default_value": true }, "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_prestart_code": { "default_value": "M104 S{material_print_temperature} T{extruder_nr}" }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, diff --git a/resources/extruders/voron2_stealthchanger_extruder_3.def.json b/resources/extruders/voron2_stealthchanger_extruder_3.def.json index dfaa249e5d5..1011910025c 100644 --- a/resources/extruders/voron2_stealthchanger_extruder_3.def.json +++ b/resources/extruders/voron2_stealthchanger_extruder_3.def.json @@ -14,9 +14,11 @@ "default_value": 3, "maximum_value": 7 }, + "machine_extruder_change_duration": { "default_value": 10.0 }, "machine_extruder_end_pos_abs": { "default_value": true }, "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_prestart_code": { "default_value": "M104 S{material_print_temperature} T{extruder_nr}" }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, diff --git a/resources/extruders/voron2_stealthchanger_extruder_4.def.json b/resources/extruders/voron2_stealthchanger_extruder_4.def.json index eeb6fbbe601..35170fdb0b0 100644 --- a/resources/extruders/voron2_stealthchanger_extruder_4.def.json +++ b/resources/extruders/voron2_stealthchanger_extruder_4.def.json @@ -14,9 +14,11 @@ "default_value": 4, "maximum_value": 7 }, + "machine_extruder_change_duration": { "default_value": 10.0 }, "machine_extruder_end_pos_abs": { "default_value": true }, "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_prestart_code": { "default_value": "M104 S{material_print_temperature} T{extruder_nr}" }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, diff --git a/resources/extruders/voron2_stealthchanger_extruder_5.def.json b/resources/extruders/voron2_stealthchanger_extruder_5.def.json index 61e05b69456..4f8471d50f7 100644 --- a/resources/extruders/voron2_stealthchanger_extruder_5.def.json +++ b/resources/extruders/voron2_stealthchanger_extruder_5.def.json @@ -14,9 +14,11 @@ "default_value": 5, "maximum_value": 7 }, + "machine_extruder_change_duration": { "default_value": 10.0 }, "machine_extruder_end_pos_abs": { "default_value": true }, "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_prestart_code": { "default_value": "M104 S{material_print_temperature} T{extruder_nr}" }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, diff --git a/resources/extruders/voron2_stealthchanger_extruder_6.def.json b/resources/extruders/voron2_stealthchanger_extruder_6.def.json index 3b3f614ae76..7a58e80f8b1 100644 --- a/resources/extruders/voron2_stealthchanger_extruder_6.def.json +++ b/resources/extruders/voron2_stealthchanger_extruder_6.def.json @@ -14,9 +14,11 @@ "default_value": 6, "maximum_value": 7 }, + "machine_extruder_change_duration": { "default_value": 10.0 }, "machine_extruder_end_pos_abs": { "default_value": true }, "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_prestart_code": { "default_value": "M104 S{material_print_temperature} T{extruder_nr}" }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, diff --git a/resources/extruders/voron2_stealthchanger_extruder_7.def.json b/resources/extruders/voron2_stealthchanger_extruder_7.def.json index 071cd5d0644..196f6607d6b 100644 --- a/resources/extruders/voron2_stealthchanger_extruder_7.def.json +++ b/resources/extruders/voron2_stealthchanger_extruder_7.def.json @@ -14,9 +14,11 @@ "default_value": 7, "maximum_value": 7 }, + "machine_extruder_change_duration": { "default_value": 10.0 }, "machine_extruder_end_pos_abs": { "default_value": true }, "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_prestart_code": { "default_value": "M104 S{material_print_temperature} T{extruder_nr}" }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" },