From 61db7ce4006258c0db1d858702709f5305c23081 Mon Sep 17 00:00:00 2001 From: Randy Zwitch Date: Sat, 15 Jul 2023 13:07:22 -0400 Subject: [PATCH 01/17] Add E444M definition file --- .../matterhackers_pulsexe_e444m.def.json | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 resources/definitions/matterhackers_pulsexe_e444m.def.json diff --git a/resources/definitions/matterhackers_pulsexe_e444m.def.json b/resources/definitions/matterhackers_pulsexe_e444m.def.json new file mode 100644 index 0000000000..05757b0679 --- /dev/null +++ b/resources/definitions/matterhackers_pulsexe_e444m.def.json @@ -0,0 +1,62 @@ +{ + "version": 2, + "name": "Pulse XE E-444M", + "inherits": "fdmprinter", + "metadata": + { + "visible": true, + "author": "Zwitch Guitars", + "manufacturer": "MatterHackers", + "file_formats": "text/x-gcode", + "has_materials": true, + "has_variants": false, + "has_machine_quality": false, + "preferred_material": "generic_pla", + "preferred_quality_type": "normal", + "first_start_actions": [ "MachineSettingsAction" ], + "machine_extruder_trains": + { + "0": "matterhackers_extruder" + } + }, + "overrides": + { + "machine_name": { "default_value": "Pulse XE E-444M" }, + "machine_gcode_flavor": { "default_value": "Marlin" }, + "machine_depth": { "default_value": 220 }, + "machine_height": { "default_value": 215 }, + "machine_width": { "default_value": 250 }, + "gantry_height": { "value": 23 }, + "machine_heated_bed": { "default_value": true }, + "machine_head_with_fans_polygon": + { + "default_value": [[-28, 45], [-28, -18], [40, 45], [40, -18]] + }, + "machine_steps_per_mm_x": {"value": 80}, + "machine_steps_per_mm_y": {"value": 80}, + "machine_steps_per_mm_z": {"value": 400}, + "machine_steps_per_mm_e": {"value": 415}, + "machine_max_feedrate_x": {"value": 300}, + "machine_max_feedrate_y": {"value": 300}, + "machine_max_feedrate_z": {"value": 30}, + "machine_max_feedrate_e": {"value": 75}, + "machine_acceleration": {"value": 1300}, + "material_diameter": { "value": 1.75 }, + + "adhesion_type": { "value": "skirt" }, + "cool_fan_full_at_height": { "value": "layer_height_0 + 2 * layer_height" }, + "cool_min_layer_time": { "value": 10 }, + "z_seam_type": { "value": "back" }, + "travel_retract_before_outer_wall": { "value": true }, + "optimize_wall_printing_order": { "value": true }, + "top_bottom_thickness": { "value": "layer_height_0 + layer_height * 3" }, + "wall_thickness": { "value": "line_width * 2" }, + + "speed_print": { "value": 50 }, + "speed_layer_0": { "value": 20.0 }, + + "machine_start_gcode": { "default_value": "G21 ; set units to millimeters\nG90 ; use absolute positioning\nM82 ; absolute extrusion mode\nG28 ; home axes\nM104 S{material_print_temperature_layer_0} ; set extruder temp\nM140 S{material_bed_temperature_layer_0} ; set bed temp\nM190 S{material_bed_temperature_layer_0} ; wait for bed temp\nM109 S{material_print_temperature_layer_0} ; wait for extruder temp\nG29 ; mesh bed leveling\n\nG92 E0\nG1 X5 Y5 Z0.8 F1800\nG1 X100 Z0.3 E25 F900\nG92 E0\nG1 E-2 F2400"}, + "machine_end_gcode": { "default_value": "M104 S0 ; turn off extruder\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y{machine_depth}; home X axis and push Y forward\nG28 Z0\nM84 ; disable motors" } + + } +} \ No newline at end of file From d748e609f9ac3a20ac8eb0168f6ccfc3b6e8ccc1 Mon Sep 17 00:00:00 2001 From: Randy Zwitch Date: Sat, 15 Jul 2023 13:08:08 -0400 Subject: [PATCH 02/17] Add E444M extruder file --- .../extruders/matterhackers_extruder.def.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 resources/extruders/matterhackers_extruder.def.json diff --git a/resources/extruders/matterhackers_extruder.def.json b/resources/extruders/matterhackers_extruder.def.json new file mode 100644 index 0000000000..f05e4b4e20 --- /dev/null +++ b/resources/extruders/matterhackers_extruder.def.json @@ -0,0 +1,16 @@ +{ + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": + { + "machine": "matterhackers_pulsexe_e444m", + "position": "0" + }, + "overrides": + { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} \ No newline at end of file From 6870a3bce48f5115f390c1e93b41b3e9f87b721a Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 21 Aug 2023 10:06:51 +0200 Subject: [PATCH 03/17] improve number of iterations CURA-10685 --- cura/Settings/CuraFormulaFunctions.py | 8 ++++---- resources/definitions/fdmprinter.def.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cura/Settings/CuraFormulaFunctions.py b/cura/Settings/CuraFormulaFunctions.py index fd6555e679..8dd96cc03e 100644 --- a/cura/Settings/CuraFormulaFunctions.py +++ b/cura/Settings/CuraFormulaFunctions.py @@ -101,10 +101,10 @@ class CuraFormulaFunctions: def getAnyExtruderPositionWithOrDefault(self, filter_key: str, context: Optional["PropertyEvaluationContext"] = None) -> str: for extruder in self._getActiveExtruders(context): - value = extruder.getRawProperty(filter_key, "value", context=context) - if value is None or not value: - continue - return str(extruder.position) + material_container = extruder.material + value = material_container.getProperty(filter_key, "value", context) + if value is not None: + return extruder.position return self.getDefaultExtruderPosition() # Get the resolve value or value for a given key. diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 9c83431f54..525a5e1eee 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4488,7 +4488,7 @@ "type": "extruder", "default_value": "0", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", - "value": "int(defaultExtruderPosition())", + "value": "int(anyExtruderNrWithOrDefault('material_is_support_material'))", "settable_per_mesh": false, "settable_per_extruder": false, "children": From 9129a526ba25414570039a12efca3b699c706d43 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 21 Aug 2023 10:06:51 +0200 Subject: [PATCH 04/17] improve number of iterations CURA-10685 --- cura/Settings/CuraFormulaFunctions.py | 8 ++++---- resources/definitions/fdmprinter.def.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cura/Settings/CuraFormulaFunctions.py b/cura/Settings/CuraFormulaFunctions.py index fd6555e679..8dd96cc03e 100644 --- a/cura/Settings/CuraFormulaFunctions.py +++ b/cura/Settings/CuraFormulaFunctions.py @@ -101,10 +101,10 @@ class CuraFormulaFunctions: def getAnyExtruderPositionWithOrDefault(self, filter_key: str, context: Optional["PropertyEvaluationContext"] = None) -> str: for extruder in self._getActiveExtruders(context): - value = extruder.getRawProperty(filter_key, "value", context=context) - if value is None or not value: - continue - return str(extruder.position) + material_container = extruder.material + value = material_container.getProperty(filter_key, "value", context) + if value is not None: + return extruder.position return self.getDefaultExtruderPosition() # Get the resolve value or value for a given key. diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ccd92c9ba3..2f4b8cc3e2 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4500,7 +4500,7 @@ "type": "extruder", "default_value": "0", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", - "value": "int(defaultExtruderPosition())", + "value": "int(anyExtruderNrWithOrDefault('material_is_support_material'))", "settable_per_mesh": false, "settable_per_extruder": false, "children": From ab8b7c3ab560a84a98476e1b1d04bafde096b85f Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 25 Aug 2023 15:46:30 +0200 Subject: [PATCH 05/17] name changes CURA-10685 --- cura/CuraApplication.py | 2 +- cura/Settings/CuraFormulaFunctions.py | 6 +++--- docs/profiles/getting_a_setting_value.md | 2 +- resources/definitions/fdmprinter.def.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 64d88d13dc..f44393657f 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -409,7 +409,7 @@ class CuraApplication(QtApplication): SettingFunction.registerOperator("extruderValue", self._cura_formula_functions.getValueInExtruder) SettingFunction.registerOperator("extruderValues", self._cura_formula_functions.getValuesInAllExtruders) - SettingFunction.registerOperator("anyExtruderNrWithOrDefault", self._cura_formula_functions.getAnyExtruderPositionWithOrDefault) + SettingFunction.registerOperator("anyExtruderWithMaterial", self._cura_formula_functions.getExtruderPositionWithMaterial) SettingFunction.registerOperator("resolveOrValue", self._cura_formula_functions.getResolveOrValue) SettingFunction.registerOperator("defaultExtruderPosition", self._cura_formula_functions.getDefaultExtruderPosition) SettingFunction.registerOperator("valueFromContainer", self._cura_formula_functions.getValueFromContainerAtIndex) diff --git a/cura/Settings/CuraFormulaFunctions.py b/cura/Settings/CuraFormulaFunctions.py index 8dd96cc03e..08c24180bb 100644 --- a/cura/Settings/CuraFormulaFunctions.py +++ b/cura/Settings/CuraFormulaFunctions.py @@ -97,14 +97,14 @@ class CuraFormulaFunctions: return result - # Get the first extruder that adheres to a specific (boolean) property, like 'material_is_support_material'. - def getAnyExtruderPositionWithOrDefault(self, filter_key: str, + # Get the first extruder with material that adheres to a specific (boolean) property, like 'material_is_support_material'. + def getExtruderPositionWithMaterial(self, filter_key: str, context: Optional["PropertyEvaluationContext"] = None) -> str: for extruder in self._getActiveExtruders(context): material_container = extruder.material value = material_container.getProperty(filter_key, "value", context) if value is not None: - return extruder.position + return str(extruder.position) return self.getDefaultExtruderPosition() # Get the resolve value or value for a given key. diff --git a/docs/profiles/getting_a_setting_value.md b/docs/profiles/getting_a_setting_value.md index bd106eb2da..ab18be0f42 100644 --- a/docs/profiles/getting_a_setting_value.md +++ b/docs/profiles/getting_a_setting_value.md @@ -54,7 +54,7 @@ There are also a few extra things that can be used in these expressions: * The function `extruderValue(extruder, key)` will evaluate a particular setting for a particular extruder. * The function `resolveOrValue(key)` will perform the full setting evaluation as described in this document for the current context (so if this setting is being evaluated for the second extruder it would perform it as if coming from the second extruder). * The function `defaultExtruderPosition()` will get the first extruder that is not disabled. For instance, if a printer has three extruders but the first is disabled, this would return `1` to indicate the second extruder (0-indexed). -* The function `anyExtruderNrWithOrDefault(key)` will filter the list of extruders on the key, and then give the first index for which it is true, or if none of them are, the default one as specified by the 'default extruder position' function above. +* The function `anyExtruderWithMaterial(key)` will filter the list of extruders on the key of material quality, and then give the first index for which it is true, or if none of them are, the default one as specified by the 'default extruder position' function above. * The function `valueFromContainer(key, index)` will get a setting value from the global stack, but skip the first few containers in that stack. It will skip until it reaches a particular index in the container stack. * The function `extruderValueFromContainer(key, index)` will get a setting value from the current extruder stack, but skip the first few containers in that stack. It will skip until it reaches a particular index in the container stack. diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 2f4b8cc3e2..40d1eb3b1c 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4500,7 +4500,7 @@ "type": "extruder", "default_value": "0", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", - "value": "int(anyExtruderNrWithOrDefault('material_is_support_material'))", + "value": "int(anyExtruderWithMaterial('material_is_support_material'))", "settable_per_mesh": false, "settable_per_extruder": false, "children": From 711b4401007cbbcf7455c60114a63d8ee7976049 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 28 Aug 2023 12:42:16 +0200 Subject: [PATCH 06/17] Update conan version CURA-10446 --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 26d167db2b..6b4d4cffc8 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan==1.56.0 +conan==1.60.2 sip From 0362f8abe6af827d2af04190ed1628b2a9532879 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 28 Aug 2023 14:42:04 +0200 Subject: [PATCH 07/17] Revert "Update conan version" This reverts commit 711b4401007cbbcf7455c60114a63d8ee7976049. --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 6b4d4cffc8..26d167db2b 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan==1.60.2 +conan==1.56.0 sip From 0e67ff38c2655b5240657500ee964811a67db3f6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 28 Aug 2023 15:19:45 +0200 Subject: [PATCH 08/17] Update windows.yml --- .github/workflows/windows.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 88d9d84e94..df9056d454 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -124,6 +124,11 @@ jobs: - name: Create the Packages (Powershell) run: conan install $Env:CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$Env:ENTERPRISE -o cura:staging=$Env:STAGING --json "cura_inst/conan_install_info.json" + - name: Upload the Package(s) + if: always() + run: | + conan upload "*" -r cura --all -c + - name: Set Environment variables for Cura (Powershell) run: | echo "${Env:WIX}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append @@ -262,4 +267,4 @@ jobs: success_body: "Installers for ${{ inputs.cura_conan_version }}" failure_title: "Failed to create the Cura distributions" failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}" - secrets: inherit \ No newline at end of file + secrets: inherit From 2b39c73d56312663a5e6050787e9258ff827225f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 28 Aug 2023 15:20:17 +0200 Subject: [PATCH 09/17] Update linux.yml --- .github/workflows/linux.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4d58dcee34..5a18199e3c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -154,6 +154,11 @@ jobs: - name: Create the Packages (Bash) run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json" + - name: Upload the Package(s) + if: always() + run: | + conan upload "*" -r cura --all -c + - name: Set Environment variables for Cura (bash) run: | . ./cura_inst/bin/activate_github_actions_env.sh From 608878d7be4d7ecd6ff3a42890c3bc8b9447ee46 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 28 Aug 2023 15:21:09 +0200 Subject: [PATCH 10/17] Update macos.yml --- .github/workflows/macos.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4690d27878..af1fc3d12b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -154,6 +154,11 @@ jobs: - name: Create the Packages (Bash) run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json" + - name: Upload the Package(s) + if: always() + run: | + conan upload "*" -r cura --all -c + - name: Set Environment variables for Cura (bash) run: | . ./cura_inst/bin/activate_github_actions_env.sh From 7671705c1619f8439056c22d121dcbb6d35ce1cd Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 28 Aug 2023 16:35:27 +0200 Subject: [PATCH 11/17] Update requirements-conan-package.txt --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 26d167db2b..5efbf3f18b 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ conan==1.56.0 -sip +sip==6.7.9 From d70b209288acf9ade307666823681eba36f2d531 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 28 Aug 2023 17:32:03 +0200 Subject: [PATCH 12/17] Update requirements-conan-package.txt --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 5efbf3f18b..48121932b8 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ conan==1.56.0 -sip==6.7.9 +sip==6.7.1 From 3d48e51ac2c55e3852598d7261bd7f1439027cb7 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 29 Aug 2023 07:53:35 +0200 Subject: [PATCH 13/17] Update requirements-conan-package.txt --- .github/workflows/requirements-conan-package.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 48121932b8..6b4d4cffc8 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan==1.56.0 -sip==6.7.1 +conan==1.60.2 +sip From ef4665a55f24ddb842deab5815b891bda385ee62 Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Tue, 29 Aug 2023 11:12:17 +0000 Subject: [PATCH 14/17] Applied printer-linter format --- .../matterhackers_pulsexe_e444m.def.json | 120 +++++++++--------- 1 file changed, 59 insertions(+), 61 deletions(-) diff --git a/resources/definitions/matterhackers_pulsexe_e444m.def.json b/resources/definitions/matterhackers_pulsexe_e444m.def.json index 05757b0679..fc5d4f6dda 100644 --- a/resources/definitions/matterhackers_pulsexe_e444m.def.json +++ b/resources/definitions/matterhackers_pulsexe_e444m.def.json @@ -1,62 +1,60 @@ -{ - "version": 2, - "name": "Pulse XE E-444M", - "inherits": "fdmprinter", - "metadata": - { - "visible": true, - "author": "Zwitch Guitars", - "manufacturer": "MatterHackers", - "file_formats": "text/x-gcode", - "has_materials": true, - "has_variants": false, - "has_machine_quality": false, - "preferred_material": "generic_pla", - "preferred_quality_type": "normal", - "first_start_actions": [ "MachineSettingsAction" ], - "machine_extruder_trains": - { - "0": "matterhackers_extruder" - } - }, - "overrides": - { - "machine_name": { "default_value": "Pulse XE E-444M" }, - "machine_gcode_flavor": { "default_value": "Marlin" }, - "machine_depth": { "default_value": 220 }, - "machine_height": { "default_value": 215 }, - "machine_width": { "default_value": 250 }, - "gantry_height": { "value": 23 }, - "machine_heated_bed": { "default_value": true }, - "machine_head_with_fans_polygon": - { - "default_value": [[-28, 45], [-28, -18], [40, 45], [40, -18]] - }, - "machine_steps_per_mm_x": {"value": 80}, - "machine_steps_per_mm_y": {"value": 80}, - "machine_steps_per_mm_z": {"value": 400}, - "machine_steps_per_mm_e": {"value": 415}, - "machine_max_feedrate_x": {"value": 300}, - "machine_max_feedrate_y": {"value": 300}, - "machine_max_feedrate_z": {"value": 30}, - "machine_max_feedrate_e": {"value": 75}, - "machine_acceleration": {"value": 1300}, - "material_diameter": { "value": 1.75 }, - - "adhesion_type": { "value": "skirt" }, - "cool_fan_full_at_height": { "value": "layer_height_0 + 2 * layer_height" }, - "cool_min_layer_time": { "value": 10 }, - "z_seam_type": { "value": "back" }, - "travel_retract_before_outer_wall": { "value": true }, - "optimize_wall_printing_order": { "value": true }, - "top_bottom_thickness": { "value": "layer_height_0 + layer_height * 3" }, - "wall_thickness": { "value": "line_width * 2" }, - - "speed_print": { "value": 50 }, - "speed_layer_0": { "value": 20.0 }, - - "machine_start_gcode": { "default_value": "G21 ; set units to millimeters\nG90 ; use absolute positioning\nM82 ; absolute extrusion mode\nG28 ; home axes\nM104 S{material_print_temperature_layer_0} ; set extruder temp\nM140 S{material_bed_temperature_layer_0} ; set bed temp\nM190 S{material_bed_temperature_layer_0} ; wait for bed temp\nM109 S{material_print_temperature_layer_0} ; wait for extruder temp\nG29 ; mesh bed leveling\n\nG92 E0\nG1 X5 Y5 Z0.8 F1800\nG1 X100 Z0.3 E25 F900\nG92 E0\nG1 E-2 F2400"}, - "machine_end_gcode": { "default_value": "M104 S0 ; turn off extruder\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y{machine_depth}; home X axis and push Y forward\nG28 Z0\nM84 ; disable motors" } - - } +{ + "version": 2, + "name": "Pulse XE E-444M", + "inherits": "fdmprinter", + "metadata": + { + "visible": true, + "author": "Zwitch Guitars", + "manufacturer": "MatterHackers", + "file_formats": "text/x-gcode", + "first_start_actions": [ "MachineSettingsAction" ], + "has_machine_quality": false, + "has_materials": true, + "has_variants": false, + "machine_extruder_trains": { "0": "matterhackers_extruder" }, + "preferred_material": "generic_pla", + "preferred_quality_type": "normal" + }, + "overrides": + { + "adhesion_type": { "value": "skirt" }, + "cool_fan_full_at_height": { "value": "layer_height_0 + 2 * layer_height" }, + "cool_min_layer_time": { "value": 10 }, + "gantry_height": { "value": 23 }, + "machine_acceleration": { "value": 1300 }, + "machine_depth": { "default_value": 220 }, + "machine_end_gcode": { "default_value": "M104 S0 ; turn off extruder\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y{machine_depth}; home X axis and push Y forward\nG28 Z0\nM84 ; disable motors" }, + "machine_gcode_flavor": { "default_value": "Marlin" }, + "machine_head_with_fans_polygon": + { + "default_value": [ + [-28, 45], + [-28, -18], + [40, 45], + [40, -18] + ] + }, + "machine_heated_bed": { "default_value": true }, + "machine_height": { "default_value": 215 }, + "machine_max_feedrate_e": { "value": 75 }, + "machine_max_feedrate_x": { "value": 300 }, + "machine_max_feedrate_y": { "value": 300 }, + "machine_max_feedrate_z": { "value": 30 }, + "machine_name": { "default_value": "Pulse XE E-444M" }, + "machine_start_gcode": { "default_value": "G21 ; set units to millimeters\nG90 ; use absolute positioning\nM82 ; absolute extrusion mode\nG28 ; home axes\nM104 S{material_print_temperature_layer_0} ; set extruder temp\nM140 S{material_bed_temperature_layer_0} ; set bed temp\nM190 S{material_bed_temperature_layer_0} ; wait for bed temp\nM109 S{material_print_temperature_layer_0} ; wait for extruder temp\nG29 ; mesh bed leveling\n\nG92 E0\nG1 X5 Y5 Z0.8 F1800\nG1 X100 Z0.3 E25 F900\nG92 E0\nG1 E-2 F2400" }, + "machine_steps_per_mm_e": { "value": 415 }, + "machine_steps_per_mm_x": { "value": 80 }, + "machine_steps_per_mm_y": { "value": 80 }, + "machine_steps_per_mm_z": { "value": 400 }, + "machine_width": { "default_value": 250 }, + "material_diameter": { "value": 1.75 }, + "optimize_wall_printing_order": { "value": true }, + "speed_layer_0": { "value": 20.0 }, + "speed_print": { "value": 50 }, + "top_bottom_thickness": { "value": "layer_height_0 + layer_height * 3" }, + "travel_retract_before_outer_wall": { "value": true }, + "wall_thickness": { "value": "line_width * 2" }, + "z_seam_type": { "value": "back" } + } } \ No newline at end of file From 6e045e8b37619cea7ff484e6e99b857637204f8c Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 29 Aug 2023 14:11:36 +0200 Subject: [PATCH 15/17] Put back `getAnyExtruderPositionWithOrDefault` api function CURA-10685 --- cura/CuraApplication.py | 2 ++ cura/Settings/CuraFormulaFunctions.py | 9 +++++++++ docs/profiles/getting_a_setting_value.md | 3 +++ 3 files changed, 14 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f44393657f..0de3ccc780 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -410,6 +410,8 @@ class CuraApplication(QtApplication): SettingFunction.registerOperator("extruderValue", self._cura_formula_functions.getValueInExtruder) SettingFunction.registerOperator("extruderValues", self._cura_formula_functions.getValuesInAllExtruders) SettingFunction.registerOperator("anyExtruderWithMaterial", self._cura_formula_functions.getExtruderPositionWithMaterial) + SettingFunction.registerOperator("anyExtruderNrWithOrDefault", + self._cura_formula_functions.getAnyExtruderPositionWithOrDefault) SettingFunction.registerOperator("resolveOrValue", self._cura_formula_functions.getResolveOrValue) SettingFunction.registerOperator("defaultExtruderPosition", self._cura_formula_functions.getDefaultExtruderPosition) SettingFunction.registerOperator("valueFromContainer", self._cura_formula_functions.getValueFromContainerAtIndex) diff --git a/cura/Settings/CuraFormulaFunctions.py b/cura/Settings/CuraFormulaFunctions.py index 08c24180bb..d7b6228e09 100644 --- a/cura/Settings/CuraFormulaFunctions.py +++ b/cura/Settings/CuraFormulaFunctions.py @@ -97,6 +97,15 @@ class CuraFormulaFunctions: return result + # Get the first extruder that adheres to a specific (boolean) property, like 'material_is_support_material'. + def getAnyExtruderPositionWithOrDefault(self, filter_key: str, + context: Optional["PropertyEvaluationContext"] = None) -> str: + for extruder in self._getActiveExtruders(context): + value = extruder.getRawProperty(filter_key, "value", context=context) + if value is None or not value: + continue + return str(extruder.position) + # Get the first extruder with material that adheres to a specific (boolean) property, like 'material_is_support_material'. def getExtruderPositionWithMaterial(self, filter_key: str, context: Optional["PropertyEvaluationContext"] = None) -> str: diff --git a/docs/profiles/getting_a_setting_value.md b/docs/profiles/getting_a_setting_value.md index ab18be0f42..7cd912ac45 100644 --- a/docs/profiles/getting_a_setting_value.md +++ b/docs/profiles/getting_a_setting_value.md @@ -54,6 +54,9 @@ There are also a few extra things that can be used in these expressions: * The function `extruderValue(extruder, key)` will evaluate a particular setting for a particular extruder. * The function `resolveOrValue(key)` will perform the full setting evaluation as described in this document for the current context (so if this setting is being evaluated for the second extruder it would perform it as if coming from the second extruder). * The function `defaultExtruderPosition()` will get the first extruder that is not disabled. For instance, if a printer has three extruders but the first is disabled, this would return `1` to indicate the second extruder (0-indexed). +* The function `anyExtruderNrWithOrDefault(key)` will filter the list of extruders on the key, and then give the first + index for which it is true, or if none of them are, the default one as specified by the 'default extruder position' + function above. * The function `anyExtruderWithMaterial(key)` will filter the list of extruders on the key of material quality, and then give the first index for which it is true, or if none of them are, the default one as specified by the 'default extruder position' function above. * The function `valueFromContainer(key, index)` will get a setting value from the global stack, but skip the first few containers in that stack. It will skip until it reaches a particular index in the container stack. * The function `extruderValueFromContainer(key, index)` will get a setting value from the current extruder stack, but skip the first few containers in that stack. It will skip until it reaches a particular index in the container stack. From 0397095789dad159e6ff25eae06a31cbe679941a Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 29 Aug 2023 15:18:59 +0200 Subject: [PATCH 16/17] pyarcus pynest2d and pysavitar version changed conan build fix --- conanfile.py | 66 +++++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/conanfile.py b/conanfile.py index 77cecf1134..3c836dae2a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -10,7 +10,7 @@ from conan.tools.env import VirtualRunEnv, Environment, VirtualBuildEnv from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration, ConanException -required_conan_version = ">=1.54 <=1.56.0 || >=1.58.0 <2.0.0" +required_conan_version = ">=1.58.0 <2.0.0" class CuraConan(ConanFile): @@ -293,6 +293,7 @@ class CuraConan(ConanFile): self.options["pysavitar"].shared = True self.options["pynest2d"].shared = True self.options["cpython"].shared = True + self.options["boost"].header_only = True def validate(self): version = self.conf_info.get("user.cura:version", default = self.version, check_type = str) @@ -300,10 +301,11 @@ class CuraConan(ConanFile): raise ConanInvalidConfiguration("Only versions 5+ are support") def requirements(self): - self.requires("pyarcus/5.2.2") + self.requires("boost/1.82.0") + self.requires("pyarcus/(latest)@ultimaker/cura_10951") self.requires("curaengine/(latest)@ultimaker/testing") - self.requires("pysavitar/5.2.2") - self.requires("pynest2d/5.2.2") + self.requires("pysavitar/(latest)@ultimaker/cura_10951") + self.requires("pynest2d/(latest)@ultimaker/cura_10951") self.requires("uranium/(latest)@ultimaker/testing") self.requires("cura_binary_data/(latest)@ultimaker/testing") self.requires("cpython/3.10.4") @@ -338,7 +340,38 @@ class CuraConan(ConanFile): vr.generate() self._generate_cura_version(os.path.join(self.source_folder, "cura")) + self._generate_about_versions(os.path.join(self.source_folder, "resources","qml", "Dialogs")) + if not self.in_local_cache: + # Copy CuraEngine.exe to bindirs of Virtual Python Environment + curaengine = self.dependencies["curaengine"].cpp_info + copy(self, "CuraEngine.exe", curaengine.bindirs[0], self.source_folder, keep_path = False) + copy(self, "CuraEngine", curaengine.bindirs[0], self.source_folder, keep_path = False) + + # Copy resources of cura_binary_data + cura_binary_data = self.dependencies["cura_binary_data"].cpp_info + copy(self, "*", cura_binary_data.resdirs[0], str(self._share_dir.joinpath("cura")), keep_path = True) + copy(self, "*", cura_binary_data.resdirs[1], str(self._share_dir.joinpath("uranium")), keep_path = True) + if self.settings.os == "Windows": + copy(self, "*", cura_binary_data.resdirs[2], str(self._share_dir.joinpath("windows")), keep_path = True) + + for dependency in self.dependencies.host.values(): + for bindir in dependency.cpp_info.bindirs: + copy(self, "*.dll", bindir, str(self._site_packages), keep_path = False) + for libdir in dependency.cpp_info.libdirs: + copy(self, "*.pyd", libdir, str(self._site_packages), keep_path = False) + copy(self, "*.pyi", libdir, str(self._site_packages), keep_path = False) + copy(self, "*.dylib", libdir, str(self._base_dir.joinpath("lib")), keep_path = False) + + # Copy materials (flat) + rmdir(self, os.path.join(self.source_folder, "resources", "materials")) + fdm_materials = self.dependencies["fdm_materials"].cpp_info + copy(self, "*", fdm_materials.resdirs[0], str(self._share_dir.joinpath("cura"))) + + # Copy internal resources + if self.options.internal: + cura_private_data = self.dependencies["cura_private_data"].cpp_info + copy(self, "*", cura_private_data.resdirs[0], str(self._share_dir.joinpath("cura"))) if self.options.devtools: entitlements_file = "'{}'".format(os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements")) @@ -357,8 +390,6 @@ class CuraConan(ConanFile): pot = self.python_requires["translationextractor"].module.ExtractTranslations(self, cpp_info.bindirs[0]) pot.generate() - self._generate_about_versions(os.path.join(self.source_folder, "resources","qml", "Dialogs")) - def build(self): if self.options.devtools: if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type = str): @@ -370,29 +401,6 @@ class CuraConan(ConanFile): cpp_info = self.dependencies["gettext"].cpp_info self.run(f"{cpp_info.bindirs[0]}/msgfmt {po_file} -o {mo_file} -f", env="conanbuild", ignore_errors=True) - def imports(self): - self.copy("CuraEngine.exe", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False) - self.copy("CuraEngine", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False) - - rmdir(self, os.path.join(self.source_folder, "resources", "materials")) - self.copy("*.fdm_material", root_package = "fdm_materials", src = "@resdirs", dst = "resources/materials", keep_path = False) - self.copy("*.sig", root_package = "fdm_materials", src = "@resdirs", dst = "resources/materials", keep_path = False) - - if self.options.internal: - self.copy("*", root_package = "cura_private_data", src = self.deps_cpp_info["cura_private_data"].resdirs[0], - dst = self._share_dir.joinpath("cura", "resources"), keep_path = True) - - # Copy resources of cura_binary_data - self.copy("*", root_package = "cura_binary_data", src = self.deps_cpp_info["cura_binary_data"].resdirs[0], - dst = self._share_dir.joinpath("cura", "resources"), keep_path = True) - self.copy("*", root_package = "cura_binary_data", src = self.deps_cpp_info["cura_binary_data"].resdirs[1], - dst =self._share_dir.joinpath("uranium", "resources"), keep_path = True) - - self.copy("*.dll", src = "@bindirs", dst = self._site_packages) - self.copy("*.pyd", src = "@libdirs", dst = self._site_packages) - self.copy("*.pyi", src = "@libdirs", dst = self._site_packages) - self.copy("*.dylib", src = "@libdirs", dst = self._script_dir) - def deploy(self): # Copy CuraEngine.exe to bindirs of Virtual Python Environment curaengine = self.dependencies["curaengine"].cpp_info From d80e349f0b22985b027ecd376242cf0b5b4f1652 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 29 Aug 2023 15:27:47 +0200 Subject: [PATCH 17/17] source_folder as root for materials conan build fix --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 3c836dae2a..1ab7d939af 100644 --- a/conanfile.py +++ b/conanfile.py @@ -366,7 +366,7 @@ class CuraConan(ConanFile): # Copy materials (flat) rmdir(self, os.path.join(self.source_folder, "resources", "materials")) fdm_materials = self.dependencies["fdm_materials"].cpp_info - copy(self, "*", fdm_materials.resdirs[0], str(self._share_dir.joinpath("cura"))) + copy(self, "*", fdm_materials.resdirs[0], self.source_folder) # Copy internal resources if self.options.internal: