Merge remote-tracking branch 'origin/main' into CURA-10951_gh_build_curapackage

# Conflicts:
#	conanfile.py
This commit is contained in:
Jelle Spijker 2023-08-29 16:13:39 +02:00
commit 87b6ad63a7
10 changed files with 112 additions and 7 deletions

View file

@ -154,6 +154,11 @@ jobs:
- name: Create the Packages (Bash) - 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" 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) - name: Set Environment variables for Cura (bash)
run: | run: |
. ./cura_inst/bin/activate_github_actions_env.sh . ./cura_inst/bin/activate_github_actions_env.sh

View file

@ -154,6 +154,11 @@ jobs:
- name: Create the Packages (Bash) - 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" 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) - name: Set Environment variables for Cura (bash)
run: | run: |
. ./cura_inst/bin/activate_github_actions_env.sh . ./cura_inst/bin/activate_github_actions_env.sh

View file

@ -124,6 +124,11 @@ jobs:
- name: Create the Packages (Powershell) - 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" 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) - name: Set Environment variables for Cura (Powershell)
run: | run: |
echo "${Env:WIX}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "${Env:WIX}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

View file

@ -10,7 +10,7 @@ from conan.tools.env import VirtualRunEnv, Environment, VirtualBuildEnv
from conan.tools.scm import Version from conan.tools.scm import Version
from conan.errors import ConanInvalidConfiguration, ConanException 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): class CuraConan(ConanFile):
@ -301,7 +301,7 @@ class CuraConan(ConanFile):
raise ConanInvalidConfiguration("Only versions 5+ are support") raise ConanInvalidConfiguration("Only versions 5+ are support")
def requirements(self): def requirements(self):
self.requires("boost/1.81.0") self.requires("boost/1.82.0")
self.requires("pyarcus/(latest)@ultimaker/cura_10951") self.requires("pyarcus/(latest)@ultimaker/cura_10951")
self.requires("curaengine/(latest)@ultimaker/cura_10446") self.requires("curaengine/(latest)@ultimaker/cura_10446")
self.requires("pysavitar/(latest)@ultimaker/cura_10951") self.requires("pysavitar/(latest)@ultimaker/cura_10951")

View file

@ -411,7 +411,9 @@ class CuraApplication(QtApplication):
SettingFunction.registerOperator("extruderValue", self._cura_formula_functions.getValueInExtruder) SettingFunction.registerOperator("extruderValue", self._cura_formula_functions.getValueInExtruder)
SettingFunction.registerOperator("extruderValues", self._cura_formula_functions.getValuesInAllExtruders) 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("anyExtruderNrWithOrDefault",
self._cura_formula_functions.getAnyExtruderPositionWithOrDefault)
SettingFunction.registerOperator("resolveOrValue", self._cura_formula_functions.getResolveOrValue) SettingFunction.registerOperator("resolveOrValue", self._cura_formula_functions.getResolveOrValue)
SettingFunction.registerOperator("defaultExtruderPosition", self._cura_formula_functions.getDefaultExtruderPosition) SettingFunction.registerOperator("defaultExtruderPosition", self._cura_formula_functions.getDefaultExtruderPosition)
SettingFunction.registerOperator("valueFromContainer", self._cura_formula_functions.getValueFromContainerAtIndex) SettingFunction.registerOperator("valueFromContainer", self._cura_formula_functions.getValueFromContainerAtIndex)

View file

@ -105,6 +105,15 @@ class CuraFormulaFunctions:
if value is None or not value: if value is None or not value:
continue continue
return str(extruder.position) 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:
for extruder in self._getActiveExtruders(context):
material_container = extruder.material
value = material_container.getProperty(filter_key, "value", context)
if value is not None:
return str(extruder.position)
return self.getDefaultExtruderPosition() return self.getDefaultExtruderPosition()
# Get the resolve value or value for a given key. # Get the resolve value or value for a given key.

View file

@ -54,7 +54,10 @@ 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 `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 `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 `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 `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 `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. * 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.

View file

@ -4500,7 +4500,7 @@
"type": "extruder", "type": "extruder",
"default_value": "0", "default_value": "0",
"enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1",
"value": "int(defaultExtruderPosition())", "value": "int(anyExtruderWithMaterial('material_is_support_material'))",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false, "settable_per_extruder": false,
"children": "children":

View file

@ -0,0 +1,60 @@
{
"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" }
}
}

View file

@ -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 }
}
}