From df589cfe95a3da7b407ee0b4b2f268ba0544a492 Mon Sep 17 00:00:00 2001 From: Paul Kuiper <46715907+pkuiper-ultimaker@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:38:53 +0100 Subject: [PATCH 01/30] Fan speeds are in 0..1 range and not in 0..255 range for the Method machines. This needs to be corrected in the switch over routine formula's. PP-417 --- resources/extruders/ultimaker_methodx_extruder_left.def.json | 4 ++-- resources/extruders/ultimaker_methodx_extruder_right.def.json | 4 ++-- resources/extruders/ultimaker_methodxl_extruder_left.def.json | 4 ++-- .../extruders/ultimaker_methodxl_extruder_right.def.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/extruders/ultimaker_methodx_extruder_left.def.json b/resources/extruders/ultimaker_methodx_extruder_left.def.json index 97e8a1f2c3..273a2c922e 100644 --- a/resources/extruders/ultimaker_methodx_extruder_left.def.json +++ b/resources/extruders/ultimaker_methodx_extruder_left.def.json @@ -14,8 +14,8 @@ "default_value": 0, "maximum_value": "1" }, - "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S255\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, - "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_final_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed*255/100}" }, + "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, + "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_initial_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodx_extruder_right.def.json b/resources/extruders/ultimaker_methodx_extruder_right.def.json index 8a4ef33404..bb8f1d89c2 100644 --- a/resources/extruders/ultimaker_methodx_extruder_right.def.json +++ b/resources/extruders/ultimaker_methodx_extruder_right.def.json @@ -14,8 +14,8 @@ "default_value": 1, "maximum_value": "1" }, - "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S255\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, - "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_final_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed*255/100}" }, + "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, + "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_initial_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodxl_extruder_left.def.json b/resources/extruders/ultimaker_methodxl_extruder_left.def.json index 2bedf9a62c..ba4a3f0157 100644 --- a/resources/extruders/ultimaker_methodxl_extruder_left.def.json +++ b/resources/extruders/ultimaker_methodxl_extruder_left.def.json @@ -14,8 +14,8 @@ "default_value": 0, "maximum_value": "1" }, - "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S255\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, - "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_final_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed*255/100}" }, + "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, + "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_initial_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodxl_extruder_right.def.json b/resources/extruders/ultimaker_methodxl_extruder_right.def.json index 2fd5b37663..32fbf1dd08 100644 --- a/resources/extruders/ultimaker_methodxl_extruder_right.def.json +++ b/resources/extruders/ultimaker_methodxl_extruder_right.def.json @@ -14,8 +14,8 @@ "default_value": 1, "maximum_value": "1" }, - "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S255\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, - "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_final_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed*255/100}" }, + "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, + "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_initial_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, From 44441dfe5b119e66d7e671f780f3dffe3a66f7aa Mon Sep 17 00:00:00 2001 From: Paul Kuiper <46715907+pkuiper-ultimaker@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:54:24 +0100 Subject: [PATCH 02/30] Improve the time estimates for the Method machines be increasing the acceleration and reducing the jerk. For dual extrusion a rough switch over time estimate is taken into account. PP-377 --- resources/definitions/ultimaker_method_base.def.json | 6 +++--- .../extruders/ultimaker_methodx_extruder_left.def.json | 1 + .../extruders/ultimaker_methodx_extruder_right.def.json | 1 + .../extruders/ultimaker_methodxl_extruder_left.def.json | 1 + .../extruders/ultimaker_methodxl_extruder_right.def.json | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/resources/definitions/ultimaker_method_base.def.json b/resources/definitions/ultimaker_method_base.def.json index 4f03a8dbe1..972d69e0d3 100644 --- a/resources/definitions/ultimaker_method_base.def.json +++ b/resources/definitions/ultimaker_method_base.def.json @@ -99,7 +99,7 @@ "acceleration_print": { "enabled": false, - "value": 300 + "value": 800 }, "acceleration_print_layer_0": { @@ -234,7 +234,7 @@ "jerk_print": { "enabled": false, - "value": 12.5 + "value": 6.25 }, "jerk_print_layer_0": { @@ -279,7 +279,7 @@ "jerk_travel": { "enabled": false, - "value": 12.5 + "value": "jerk_print" }, "jerk_travel_enabled": { diff --git a/resources/extruders/ultimaker_methodx_extruder_left.def.json b/resources/extruders/ultimaker_methodx_extruder_left.def.json index 97e8a1f2c3..7051f056f3 100644 --- a/resources/extruders/ultimaker_methodx_extruder_left.def.json +++ b/resources/extruders/ultimaker_methodx_extruder_left.def.json @@ -16,6 +16,7 @@ }, "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S255\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_final_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed*255/100}" }, + "machine_extruder_start_code_duration": { "default_value": 8 }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodx_extruder_right.def.json b/resources/extruders/ultimaker_methodx_extruder_right.def.json index 8a4ef33404..1fea854877 100644 --- a/resources/extruders/ultimaker_methodx_extruder_right.def.json +++ b/resources/extruders/ultimaker_methodx_extruder_right.def.json @@ -16,6 +16,7 @@ }, "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S255\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_final_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed*255/100}" }, + "machine_extruder_start_code_duration": { "default_value": 8 }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodxl_extruder_left.def.json b/resources/extruders/ultimaker_methodxl_extruder_left.def.json index 2bedf9a62c..66670fe994 100644 --- a/resources/extruders/ultimaker_methodxl_extruder_left.def.json +++ b/resources/extruders/ultimaker_methodxl_extruder_left.def.json @@ -16,6 +16,7 @@ }, "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S255\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_final_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed*255/100}" }, + "machine_extruder_start_code_duration": { "default_value": 10 }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodxl_extruder_right.def.json b/resources/extruders/ultimaker_methodxl_extruder_right.def.json index 2fd5b37663..9f483e39bc 100644 --- a/resources/extruders/ultimaker_methodxl_extruder_right.def.json +++ b/resources/extruders/ultimaker_methodxl_extruder_right.def.json @@ -16,6 +16,7 @@ }, "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S255\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_final_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed*255/100}" }, + "machine_extruder_start_code_duration": { "default_value": 10 }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, From 11aa71a5dfa6e6bf321313511df61c019b80717b Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 8 Jan 2024 14:41:41 +0100 Subject: [PATCH 03/30] Singleton management in Cura -QualityManagementModel, MaterialManagementModel, SimpleModeSettingsManager, MachineActionManager and CustomQualityProfilesDropDownMenuModel *deleted* -QualityProfilesDropDownmenuModel changed to RegisterType CURA-7812 --- cura/CuraApplication.py | 22 +++++++++---------- resources/qml/Preferences/MachinesPage.qml | 4 +++- .../Custom/QualitiesWithIntentMenu.qml | 2 +- .../ProfileWarningReset.qml | 4 ++-- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 1ef2f63a9e..3243260b6e 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1138,6 +1138,10 @@ class CuraApplication(QtApplication): return cast(MachineActionManager.MachineActionManager, self._machine_action_manager) + @pyqtSlot(result = QObject) + def getMachineActionManagerQml(self)-> MachineActionManager.MachineActionManager: + return cast(QObject, self._machine_action_manager) + @pyqtSlot(result = QObject) def getMaterialManagementModel(self) -> MaterialManagementModel: if not self._material_management_model: @@ -1150,7 +1154,8 @@ class CuraApplication(QtApplication): self._quality_management_model = QualityManagementModel(parent = self) return self._quality_management_model - def getSimpleModeSettingsManager(self, *args): + @pyqtSlot(result=QObject) + def getSimpleModeSettingsManager(self)-> SimpleModeSettingsManager: if self._simple_mode_settings_manager is None: self._simple_mode_settings_manager = SimpleModeSettingsManager() return self._simple_mode_settings_manager @@ -1193,12 +1198,14 @@ class CuraApplication(QtApplication): return self._print_information - def getQualityProfilesDropDownMenuModel(self, *args, **kwargs): + pyqtSlot(result =QObject) + def getQualityProfilesDropDownMenuModel(self, *args, **kwargs)-> QualityProfilesDropDownMenuModel: if self._quality_profile_drop_down_menu_model is None: self._quality_profile_drop_down_menu_model = QualityProfilesDropDownMenuModel(self) return self._quality_profile_drop_down_menu_model - def getCustomQualityProfilesDropDownMenuModel(self, *args, **kwargs): + pyqtSlot(result=QObject) + def getCustomQualityProfilesDropDownMenuModel(self, *args, **kwargs)->CustomQualityProfilesDropDownMenuModel: if self._custom_quality_profile_drop_down_menu_model is None: self._custom_quality_profile_drop_down_menu_model = CustomQualityProfilesDropDownMenuModel(self) return self._custom_quality_profile_drop_down_menu_model @@ -1231,8 +1238,6 @@ class CuraApplication(QtApplication): qmlRegisterSingletonType(MachineManager, "Cura", 1, 0, self.getMachineManager, "MachineManager") qmlRegisterSingletonType(IntentManager, "Cura", 1, 6, self.getIntentManager, "IntentManager") qmlRegisterSingletonType(SettingInheritanceManager, "Cura", 1, 0, self.getSettingInheritanceManager, "SettingInheritanceManager") - qmlRegisterSingletonType(SimpleModeSettingsManager, "Cura", 1, 0, self.getSimpleModeSettingsManager, "SimpleModeSettingsManager") - qmlRegisterSingletonType(MachineActionManager.MachineActionManager, "Cura", 1, 0, self.getMachineActionManager, "MachineActionManager") self.processEvents() qmlRegisterType(NetworkingUtil, "Cura", 1, 5, "NetworkingUtil") @@ -1257,16 +1262,11 @@ class CuraApplication(QtApplication): qmlRegisterType(FavoriteMaterialsModel, "Cura", 1, 0, "FavoriteMaterialsModel") qmlRegisterType(GenericMaterialsModel, "Cura", 1, 0, "GenericMaterialsModel") qmlRegisterType(MaterialBrandsModel, "Cura", 1, 0, "MaterialBrandsModel") - qmlRegisterSingletonType(QualityManagementModel, "Cura", 1, 0, self.getQualityManagementModel, "QualityManagementModel") - qmlRegisterSingletonType(MaterialManagementModel, "Cura", 1, 5, self.getMaterialManagementModel, "MaterialManagementModel") self.processEvents() qmlRegisterType(DiscoveredPrintersModel, "Cura", 1, 0, "DiscoveredPrintersModel") qmlRegisterType(DiscoveredCloudPrintersModel, "Cura", 1, 7, "DiscoveredCloudPrintersModel") - qmlRegisterSingletonType(QualityProfilesDropDownMenuModel, "Cura", 1, 0, - self.getQualityProfilesDropDownMenuModel, "QualityProfilesDropDownMenuModel") - qmlRegisterSingletonType(CustomQualityProfilesDropDownMenuModel, "Cura", 1, 0, - self.getCustomQualityProfilesDropDownMenuModel, "CustomQualityProfilesDropDownMenuModel") + qmlRegisterType(QualityProfilesDropDownMenuModel, "Cura", 1, 0, "QualityProfilesDropDownMenuModel") qmlRegisterType(NozzleModel, "Cura", 1, 0, "NozzleModel") qmlRegisterType(IntentModel, "Cura", 1, 6, "IntentModel") qmlRegisterType(IntentCategoryModel, "Cura", 1, 6, "IntentCategoryModel") diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index fb98cb59c5..971de03696 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -12,6 +12,7 @@ import Cura 1.0 as Cura UM.ManagementPage { id: base + property var machineActionManager: CuraApplication.getMachineActionManagerQml() Item { enabled: false; UM.I18nCatalog { id: catalog; name: "cura"} } title: catalog.i18nc("@title:tab", "Printers") @@ -58,10 +59,11 @@ UM.ManagementPage anchors.fill: parent spacing: UM.Theme.getSize("default_margin").height + Repeater { id: machineActionRepeater - model: base.currentItem ? Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null + model: base.currentItem ? machineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null Item { diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index 646e835cb2..9facc5095e 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml @@ -187,7 +187,7 @@ Popup //Add all the custom profiles. Repeater { - model: Cura.CustomQualityProfilesDropDownMenuModel + model: CuraApplication.getCustomQualityProfilesDropDownMenuModel() MenuButton { onClicked: Cura.MachineManager.setQualityChangesGroup(model.quality_changes_group) diff --git a/resources/qml/PrintSetupSelector/ProfileWarningReset.qml b/resources/qml/PrintSetupSelector/ProfileWarningReset.qml index c44fcc8cc2..bf4385446d 100644 --- a/resources/qml/PrintSetupSelector/ProfileWarningReset.qml +++ b/resources/qml/PrintSetupSelector/ProfileWarningReset.qml @@ -11,7 +11,7 @@ import "../Dialogs" Item { property bool fullWarning: true // <- Can you see the warning icon and the text, or is it just the buttons? - + property var simpleModeSettingsManager :CuraApplication.getSimpleModeSettingsManager() height: visible ? UM.Theme.getSize("action_button_icon").height : 0 width: visible ? childrenRect.width: 0 visible: Cura.MachineManager.hasUserSettings || (fullWarning && Cura.MachineManager.hasCustomQuality) @@ -96,7 +96,7 @@ Item State { name: "custom settings changed" - when: Cura.SimpleModeSettingsManager.isProfileCustomized + when: simpleModeSettingsManager.isProfileCustomized PropertyChanges { target: warning From d01b5c17678a853b87f1af1eb26b13fbae1f78e6 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 8 Jan 2024 17:46:04 +0100 Subject: [PATCH 04/30] Renmoved singleton Um.Application CURA-7812 --- cura/CuraApplication.py | 2 +- resources/qml/Dialogs/AboutDialog.qml | 2 +- .../qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 3243260b6e..20048e3d3f 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1266,7 +1266,7 @@ class CuraApplication(QtApplication): self.processEvents() qmlRegisterType(DiscoveredPrintersModel, "Cura", 1, 0, "DiscoveredPrintersModel") qmlRegisterType(DiscoveredCloudPrintersModel, "Cura", 1, 7, "DiscoveredCloudPrintersModel") - qmlRegisterType(QualityProfilesDropDownMenuModel, "Cura", 1, 0, "QualityProfilesDropDownMenuModel") + qmlRegisterType(CustomQualityProfilesDropDownMenuModel, "Cura", 1, 0, "CustomQualityProfilesDropDownMenuModel") qmlRegisterType(NozzleModel, "Cura", 1, 0, "NozzleModel") qmlRegisterType(IntentModel, "Cura", 1, 6, "IntentModel") qmlRegisterType(IntentCategoryModel, "Cura", 1, 6, "IntentCategoryModel") diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 947b46269a..79cad92b25 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -58,7 +58,7 @@ UM.Dialog UM.Label { id: version - text: catalog.i18nc("@label","version: %1").arg(UM.Application.version) + text: catalog.i18nc("@label","version: %1").arg(CuraApplication.applicationVersion()) font: UM.Theme.getFont("large_bold") color: UM.Theme.getColor("button_text") anchors.right : logo.right diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index 9facc5095e..646e835cb2 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml @@ -187,7 +187,7 @@ Popup //Add all the custom profiles. Repeater { - model: CuraApplication.getCustomQualityProfilesDropDownMenuModel() + model: Cura.CustomQualityProfilesDropDownMenuModel MenuButton { onClicked: Cura.MachineManager.setQualityChangesGroup(model.quality_changes_group) From 676099ccf6455576cfe444e9823817c678ed29d9 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 9 Jan 2024 10:29:45 +0100 Subject: [PATCH 05/30] Removed singleton UM.OperationStack, merged with CuraActions Removed ActiveTool singleton added to controller singleton CURA-7812 --- cura/CuraActions.py | 26 ++++++++++++++++++- .../PerObjectSettingsTool/PerObjectItem.qml | 2 +- .../PerObjectSettingsPanel.qml | 22 ++++++++-------- resources/qml/Actions.qml | 8 +++--- .../Custom/CustomPrintSetup.qml | 2 +- resources/qml/Settings/SettingTextField.qml | 2 +- resources/qml/Toolbar.qml | 4 +-- 7 files changed, 45 insertions(+), 21 deletions(-) diff --git a/cura/CuraActions.py b/cura/CuraActions.py index 9a61a1c4f0..36c69618dd 100644 --- a/cura/CuraActions.py +++ b/cura/CuraActions.py @@ -3,10 +3,11 @@ from typing import List, cast -from PyQt6.QtCore import QObject, QUrl, QMimeData +from PyQt6.QtCore import QObject, QUrl, pyqtSignal, pyqtProperty from PyQt6.QtGui import QDesktopServices from PyQt6.QtWidgets import QApplication +from UM.Application import Application from UM.Event import CallFunctionEvent from UM.FlameProfiler import pyqtSlot from UM.Math.Vector import Vector @@ -37,6 +38,10 @@ class CuraActions(QObject): def __init__(self, parent: QObject = None) -> None: super().__init__(parent) + self._operation_stack = Application.getInstance().getOperationStack() + self._operation_stack.changed.connect(self._onUndoStackChanged) + + undoStackChanged = pyqtSignal() @pyqtSlot() def openDocumentation(self) -> None: # Starting a web browser from a signal handler connected to a menu will crash on windows. @@ -45,6 +50,25 @@ class CuraActions(QObject): event = CallFunctionEvent(self._openUrl, [QUrl("https://ultimaker.com/en/resources/manuals/software?utm_source=cura&utm_medium=software&utm_campaign=dropdown-documentation")], {}) cura.CuraApplication.CuraApplication.getInstance().functionEvent(event) + @pyqtProperty(bool, notify=undoStackChanged) + def canUndo(self): + return self._operation_stack.canUndo() + + @pyqtProperty(bool, notify=undoStackChanged) + def canRedo(self): + return self._operation_stack.canRedo() + + @pyqtSlot() + def undo(self): + self._operation_stack.undo() + + @pyqtSlot() + def redo(self): + self._operation_stack.redo() + + def _onUndoStackChanged(self): + self.undoStackChanged.emit() + @pyqtSlot() def openBugReportPage(self) -> None: event = CallFunctionEvent(self._openUrl, [QUrl("https://github.com/Ultimaker/Cura/issues/new/choose")], {}) diff --git a/plugins/PerObjectSettingsTool/PerObjectItem.qml b/plugins/PerObjectSettingsTool/PerObjectItem.qml index b6cf13943b..cd406c80af 100644 --- a/plugins/PerObjectSettingsTool/PerObjectItem.qml +++ b/plugins/PerObjectSettingsTool/PerObjectItem.qml @@ -25,7 +25,7 @@ UM.TooltipArea onClicked: { addedSettingsModel.setVisible(model.key, checked); - UM.ActiveTool.forceUpdate(); + UM.Controller.forceUpdate(); } } diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 0ddedee897..78d6643034 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -23,7 +23,7 @@ Item readonly property string infillMeshType: "infill_mesh" readonly property string antiOverhangMeshType: "anti_overhang_mesh" - property var currentMeshType: UM.ActiveTool.properties.getValue("MeshType") + property var currentMeshType: UM.Controller.properties.getValue("MeshType") // Update the view every time the currentMeshType changes onCurrentMeshTypeChanged: @@ -56,7 +56,7 @@ Item function setMeshType(type) { - UM.ActiveTool.setProperty("MeshType", type) + UM.Controller.setProperty("MeshType", type) updateMeshTypeCheckedState(type) } @@ -224,7 +224,7 @@ Item visibilityHandler: Cura.PerObjectSettingVisibilityHandler { id: visibility_handler - selectedObjectId: UM.ActiveTool.properties.getValue("SelectedObjectId") + selectedObjectId: UM.Controller.properties.getValue("SelectedObjectId") } // For some reason the model object is updated after removing him from the memory and @@ -320,7 +320,7 @@ Item { id: provider - containerStackId: UM.ActiveTool.properties.getValue("ContainerID") + containerStackId: UM.Controller.properties.getValue("ContainerID") key: model.key watchedProperties: [ "value", "enabled", "validationState" ] storeIndex: 0 @@ -330,7 +330,7 @@ Item UM.SettingPropertyProvider { id: inheritStackProvider - containerStackId: UM.ActiveTool.properties.getValue("ContainerID") + containerStackId: UM.Controller.properties.getValue("ContainerID") key: model.key watchedProperties: [ "limit_to_extruder" ] } @@ -381,22 +381,22 @@ Item Connections { - target: UM.ActiveTool + target: UM.Controller function onPropertiesChanged() { - // the values cannot be bound with UM.ActiveTool.properties.getValue() calls, + // the values cannot be bound with UM.Controller.properties.getValue() calls, // so here we connect to the signal and update the those values. - if (typeof UM.ActiveTool.properties.getValue("SelectedObjectId") !== "undefined") + if (typeof UM.Controller.properties.getValue("SelectedObjectId") !== "undefined") { - const selectedObjectId = UM.ActiveTool.properties.getValue("SelectedObjectId") + const selectedObjectId = UM.Controller.properties.getValue("SelectedObjectId") if (addedSettingsModel.visibilityHandler.selectedObjectId != selectedObjectId) { addedSettingsModel.visibilityHandler.selectedObjectId = selectedObjectId } } - if (typeof UM.ActiveTool.properties.getValue("ContainerID") !== "undefined") + if (typeof UM.Controller.properties.getValue("ContainerID") !== "undefined") { - const containerId = UM.ActiveTool.properties.getValue("ContainerID") + const containerId = UM.Controller.properties.getValue("ContainerID") if (provider.containerStackId !== containerId) { provider.containerStackId = containerId diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 458d7fcaae..7eac124a8f 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -120,8 +120,8 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit", "&Undo") icon.name: "edit-undo" shortcut: StandardKey.Undo - onTriggered: UM.OperationStack.undo() - enabled: UM.OperationStack.canUndo + onTriggered: UM.CuraActions.undo() + enabled: UM.CuraActions.canUndo } Action @@ -130,8 +130,8 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit", "&Redo") icon.name: "edit-redo" shortcut: StandardKey.Redo - onTriggered: UM.OperationStack.redo() - enabled: UM.OperationStack.canRedo + onTriggered: UM.CuraActions.redo() + enabled: UM.CuraActions.canRedo } Action diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml index 41ab40eb31..4cc1e3034a 100644 --- a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml @@ -160,7 +160,7 @@ Item ProfileWarningReset { id: profileWarningReset - width: childrenRect.width + width: parent.width anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter fullWarning: false diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index d8e90e4951..f49b688c18 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -223,7 +223,7 @@ SettingItem cursorShape: Qt.IBeamCursor - onPressed: { + onPressed:(mouse)=> { if (!input.activeFocus) { base.focusGainedByClick = true diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index fd48ef7448..1af4e958f4 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -203,7 +203,7 @@ Item x: UM.Theme.getSize("default_margin").width y: UM.Theme.getSize("default_margin").height - source: UM.ActiveTool.valid ? UM.ActiveTool.activeToolPanel : "" + source: UM.Controller.valid ? UM.Controller.activeToolPanel : "" enabled: UM.Controller.toolsEnabled } } @@ -222,7 +222,7 @@ Item UM.Label { id: toolHint - text: UM.ActiveTool.properties.getValue("ToolHint") != undefined ? UM.ActiveTool.properties.getValue("ToolHint") : "" + text: UM.Controller.properties.getValue("ToolHint") != undefined ? UM.ActiveTool.properties.getValue("ToolHint") : "" color: UM.Theme.getColor("tooltip_text") anchors.horizontalCenter: parent.horizontalCenter } From 0ddf92ce62ff69b8e06a6704d0bae59edd49463e Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 9 Jan 2024 10:33:02 +0100 Subject: [PATCH 06/30] fix for proper path for CuraAction undo redo CURA-7812 --- resources/qml/Actions.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 7eac124a8f..3717e778d3 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -120,8 +120,8 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit", "&Undo") icon.name: "edit-undo" shortcut: StandardKey.Undo - onTriggered: UM.CuraActions.undo() - enabled: UM.CuraActions.canUndo + onTriggered: CuraActions.undo() + enabled: CuraActions.canUndo } Action @@ -130,8 +130,8 @@ Item text: catalog.i18nc("@action:inmenu menubar:edit", "&Redo") icon.name: "edit-redo" shortcut: StandardKey.Redo - onTriggered: UM.CuraActions.redo() - enabled: UM.CuraActions.canRedo + onTriggered: CuraActions.redo() + enabled: CuraActions.canRedo } Action From e47698c9ec312c666a14290bdd3440e1dda76e36 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 10 Jan 2024 06:49:27 +0100 Subject: [PATCH 07/30] Use engine version from branch CURA-11482 Contributes to CURA-11482 --- conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conandata.yml b/conandata.yml index a0a5a204ca..dcf883c630 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,7 +1,7 @@ version: "5.7.0-alpha.0" requirements: - "uranium/(latest)@ultimaker/testing" - - "curaengine/(latest)@ultimaker/testing" + - "curaengine/(latest)@ultimaker/cura_11482" - "cura_binary_data/(latest)@ultimaker/testing" - "fdm_materials/(latest)@ultimaker/testing" - "curaengine_plugin_gradual_flow/(latest)@ultimaker/stable" From c64dcb785cb2abbcee0f7ceb98d2be0ea466fef5 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 10 Jan 2024 08:55:56 +0100 Subject: [PATCH 08/30] Remove 'support_interface_skip_height' setting. Was used for run-time efficiency, but it wasn't really ever set beyond one layer-height, which made it rather useless. frontend part of CURA-11157 -- needed version upgrader as well, since it's the first alteration --- .../VersionUpgrade56to57.py | 95 +++++++++++++++++++ .../VersionUpgrade56to57/__init__.py | 61 ++++++++++++ .../VersionUpgrade56to57/plugin.json | 8 ++ resources/definitions/ankermake_m5.def.json | 1 - resources/definitions/artillery_base.def.json | 1 - .../atmat_signal_pro_base.def.json | 1 - resources/definitions/biqu_base.def.json | 1 - resources/definitions/blocks_base.def.json | 1 - resources/definitions/fdmprinter.def.json | 14 --- .../definitions/flyingbear_base.def.json | 1 - resources/definitions/fusion3_f410.def.json | 1 - resources/definitions/kingroon_base.def.json | 1 - resources/definitions/koonovo_base.def.json | 1 - resources/definitions/koonovo_kn3.def.json | 1 - resources/definitions/koonovo_kn5.def.json | 1 - resources/definitions/longer_base.def.json | 1 - resources/definitions/mingda_base.def.json | 1 - resources/definitions/tank_m_base.def.json | 1 - resources/definitions/tronxy_x.def.json | 1 - resources/definitions/two_trees_base.def.json | 1 - resources/definitions/vivedino_base.def.json | 1 - resources/i18n/fdmprinter.def.json.pot | 8 -- .../quality/beamup_l/beamup_l_coarse.inst.cfg | 1 - .../quality/beamup_l/beamup_l_draft.inst.cfg | 1 - .../beamup_l/beamup_l_extra_fine.inst.cfg | 1 - .../quality/beamup_l/beamup_l_fine.inst.cfg | 1 - .../quality/beamup_l/beamup_l_normal.inst.cfg | 1 - .../quality/beamup_s/beamup_s_coarse.inst.cfg | 1 - .../quality/beamup_s/beamup_s_draft.inst.cfg | 1 - .../beamup_s/beamup_s_extra_fine.inst.cfg | 1 - .../quality/beamup_s/beamup_s_fine.inst.cfg | 1 - .../quality/beamup_s/beamup_s_normal.inst.cfg | 1 - .../quality/flsun_sr/flsun_sr_fine.inst.cfg | 1 - .../quality/flsun_sr/flsun_sr_normal.inst.cfg | 1 - .../flsun_v400/flsun_v400_normal.inst.cfg | 1 - .../imade3d_jellybox_coarse.inst.cfg | 1 - .../imade3d_jellybox_fine.inst.cfg | 1 - .../imade3d_jellybox_normal.inst.cfg | 1 - .../imade3d_jellybox_ultrafine.inst.cfg | 1 - .../jb2_global_coarse.inst.cfg | 1 - .../jb2_global_fine.inst.cfg | 1 - .../jb2_global_normal.inst.cfg | 1 - .../jb2_global_ultrafine.inst.cfg | 1 - resources/setting_visibility/expert.cfg | 1 - .../variants/arjun/arjun300_pva_0.2.inst.cfg | 1 - .../variants/arjun/arjun300_pva_0.3.inst.cfg | 1 - .../variants/arjun/arjun300_pva_0.4.inst.cfg | 1 - .../variants/arjun/arjun300_pva_0.5.inst.cfg | 1 - .../variants/arjun/arjun300_pva_0.6.inst.cfg | 1 - .../variants/arjun/arjun300_pva_0.8.inst.cfg | 1 - .../arjun/arjunpro300_pva_0.2.inst.cfg | 1 - .../arjun/arjunpro300_pva_0.3.inst.cfg | 1 - .../arjun/arjunpro300_pva_0.4.inst.cfg | 1 - .../arjun/arjunpro300_pva_0.5.inst.cfg | 1 - .../arjun/arjunpro300_pva_0.6.inst.cfg | 1 - .../arjun/arjunpro300_pva_0.8.inst.cfg | 1 - .../kosher/kosher220_pva_0.2.inst.cfg | 1 - .../kosher/kosher220_pva_0.3.inst.cfg | 1 - .../kosher/kosher220_pva_0.4.inst.cfg | 1 - .../kosher/kosher220_pva_0.5.inst.cfg | 1 - .../kosher/kosher220_pva_0.6.inst.cfg | 1 - .../kosher/kosher220_pva_0.8.inst.cfg | 1 - 62 files changed, 164 insertions(+), 79 deletions(-) create mode 100644 plugins/VersionUpgrade/VersionUpgrade56to57/VersionUpgrade56to57.py create mode 100644 plugins/VersionUpgrade/VersionUpgrade56to57/__init__.py create mode 100644 plugins/VersionUpgrade/VersionUpgrade56to57/plugin.json diff --git a/plugins/VersionUpgrade/VersionUpgrade56to57/VersionUpgrade56to57.py b/plugins/VersionUpgrade/VersionUpgrade56to57/VersionUpgrade56to57.py new file mode 100644 index 0000000000..8e94f7963c --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade56to57/VersionUpgrade56to57.py @@ -0,0 +1,95 @@ +# Copyright (c) 2024 UltiMaker +# Cura is released under the terms of the LGPLv3 or higher. + +import configparser +from typing import Tuple, List +import io +from UM.VersionUpgrade import VersionUpgrade + +_REMOVED_SETTINGS = { + "support_interface_skip_height", +} +_NEW_SETTING_VERSION = "23" + + +class VersionUpgrade56to57(VersionUpgrade): + def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]: + """ + Upgrades preferences to remove from the visibility list the settings that were removed in this version. + It also changes the preferences to have the new version number. + + This removes any settings that were removed in the new Cura version. + :param serialized: The original contents of the preferences file. + :param filename: The file name of the preferences file. + :return: A list of new file names, and a list of the new contents for + those files. + """ + parser = configparser.ConfigParser(interpolation = None) + parser.read_string(serialized) + + # Update version number. + parser["metadata"]["setting_version"] = _NEW_SETTING_VERSION + + # Remove deleted settings from the visible settings list. + if "general" in parser and "visible_settings" in parser["general"]: + visible_settings = set(parser["general"]["visible_settings"].split(";")) + for removed in _REMOVED_SETTINGS: + if removed in visible_settings: + visible_settings.remove(removed) + + parser["general"]["visible_settings"] = ";".join(visible_settings) + + result = io.StringIO() + parser.write(result) + return [filename], [result.getvalue()] + + def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]: + """ + Upgrades instance containers to remove the settings that were removed in this version. + It also changes the instance containers to have the new version number. + + This removes any settings that were removed in the new Cura version and updates settings that need to be updated + with a new value. + + :param serialized: The original contents of the instance container. + :param filename: The original file name of the instance container. + :return: A list of new file names, and a list of the new contents for + those files. + """ + parser = configparser.ConfigParser(interpolation = None, comment_prefixes = ()) + parser.read_string(serialized) + + # Update version number. + parser["metadata"]["setting_version"] = _NEW_SETTING_VERSION + + if "values" in parser: + # Remove deleted settings from the instance containers. + for removed in _REMOVED_SETTINGS: + if removed in parser["values"]: + del parser["values"][removed] + + result = io.StringIO() + parser.write(result) + return [filename], [result.getvalue()] + + def upgradeStack(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]: + """ + Upgrades stacks to have the new version number. + + :param serialized: The original contents of the stack. + :param filename: The original file name of the stack. + :return: A list of new file names, and a list of the new contents for + those files. + """ + parser = configparser.ConfigParser(interpolation = None) + parser.read_string(serialized) + + # Update version number. + if "metadata" not in parser: + parser["metadata"] = {} + + parser["metadata"]["setting_version"] = _NEW_SETTING_VERSION + + result = io.StringIO() + parser.write(result) + return [filename], [result.getvalue()] diff --git a/plugins/VersionUpgrade/VersionUpgrade56to57/__init__.py b/plugins/VersionUpgrade/VersionUpgrade56to57/__init__.py new file mode 100644 index 0000000000..62e72c8da4 --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade56to57/__init__.py @@ -0,0 +1,61 @@ +# Copyright (c) 2024 UltiMaker +# Cura is released under the terms of the LGPLv3 or higher. + +from typing import Any, Dict, TYPE_CHECKING + +from . import VersionUpgrade56to57 + +if TYPE_CHECKING: + from UM.Application import Application + +upgrade = VersionUpgrade56to57.VersionUpgrade56to57() + + +def getMetaData() -> Dict[str, Any]: + return { + "version_upgrade": { + # From To Upgrade function + ("preferences", 7000022): ("preferences", 7000023, upgrade.upgradePreferences), + ("machine_stack", 6000022): ("machine_stack", 6000023, upgrade.upgradeStack), + ("extruder_train", 6000022): ("extruder_train", 6000023, upgrade.upgradeStack), + ("definition_changes", 4000022): ("definition_changes", 4000023, upgrade.upgradeInstanceContainer), + ("quality_changes", 4000022): ("quality_changes", 4000023, upgrade.upgradeInstanceContainer), + ("quality", 4000022): ("quality", 4000023, upgrade.upgradeInstanceContainer), + ("user", 4000022): ("user", 4000023, upgrade.upgradeInstanceContainer), + ("intent", 4000022): ("intent", 4000023, upgrade.upgradeInstanceContainer), + }, + "sources": { + "preferences": { + "get_version": upgrade.getCfgVersion, + "location": {"."} + }, + "machine_stack": { + "get_version": upgrade.getCfgVersion, + "location": {"./machine_instances"} + }, + "extruder_train": { + "get_version": upgrade.getCfgVersion, + "location": {"./extruders"} + }, + "definition_changes": { + "get_version": upgrade.getCfgVersion, + "location": {"./definition_changes"} + }, + "quality_changes": { + "get_version": upgrade.getCfgVersion, + "location": {"./quality_changes"} + }, + "quality": { + "get_version": upgrade.getCfgVersion, + "location": {"./quality"} + }, + "user": { + "get_version": upgrade.getCfgVersion, + "location": {"./user"} + } + } + } + + +def register(app: "Application") -> Dict[str, Any]: + return {"version_upgrade": upgrade} diff --git a/plugins/VersionUpgrade/VersionUpgrade56to57/plugin.json b/plugins/VersionUpgrade/VersionUpgrade56to57/plugin.json new file mode 100644 index 0000000000..1752d64aa0 --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade56to57/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "Version Upgrade 5.6 to 5.7", + "author": "UltiMaker", + "version": "1.0.0", + "description": "Upgrades configurations from Cura 5.6 to Cura 5.7.", + "api": 8, + "i18n-catalog": "cura" +} diff --git a/resources/definitions/ankermake_m5.def.json b/resources/definitions/ankermake_m5.def.json index 0880f0b007..4e4b3498b3 100644 --- a/resources/definitions/ankermake_m5.def.json +++ b/resources/definitions/ankermake_m5.def.json @@ -112,7 +112,6 @@ "support_interface_density": { "value": 33.333 }, "support_interface_enable": { "value": true }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_roof_enable": { "value": true }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, "support_xy_distance_overhang": { "value": "wall_line_width_0" }, diff --git a/resources/definitions/artillery_base.def.json b/resources/definitions/artillery_base.def.json index d9e71e4333..38d9531f7f 100644 --- a/resources/definitions/artillery_base.def.json +++ b/resources/definitions/artillery_base.def.json @@ -114,7 +114,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, "support_xy_distance_overhang": { "value": "wall_line_width_0" }, "support_xy_overrides_z": { "value": "'xy_overrides_z'" }, diff --git a/resources/definitions/atmat_signal_pro_base.def.json b/resources/definitions/atmat_signal_pro_base.def.json index f19dc8920d..cd59e1c169 100644 --- a/resources/definitions/atmat_signal_pro_base.def.json +++ b/resources/definitions/atmat_signal_pro_base.def.json @@ -154,7 +154,6 @@ "support_infill_rate": { "value": "20" }, "support_interface_enable": { "value": "True" }, "support_interface_height": { "value": "1" }, - "support_interface_skip_height": { "value": "layer_height" }, "support_join_distance": { "value": "1" }, "support_offset": { "value": "1.5" }, "support_pattern": { "default_value": "zigzag" }, diff --git a/resources/definitions/biqu_base.def.json b/resources/definitions/biqu_base.def.json index 78edc62b74..a42f4044a0 100755 --- a/resources/definitions/biqu_base.def.json +++ b/resources/definitions/biqu_base.def.json @@ -108,7 +108,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/blocks_base.def.json b/resources/definitions/blocks_base.def.json index d83e6b31f6..fde5f912da 100644 --- a/resources/definitions/blocks_base.def.json +++ b/resources/definitions/blocks_base.def.json @@ -97,7 +97,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, "support_xy_distance_overhang": { "value": "wall_line_width_0" }, diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8531fdcbe3..31a67d0122 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5423,20 +5423,6 @@ } } }, - "support_interface_skip_height": - { - "label": "Support Interface Resolution", - "description": "When checking where there's model above and below the support, take steps of the given height. Lower values will slice slower, while higher values may cause normal support to be printed in some places where there should have been support interface.", - "unit": "mm", - "type": "float", - "default_value": 0.2, - "value": "layer_height", - "minimum_value": "0", - "maximum_value_warning": "support_interface_height", - "limit_to_extruder": "support_interface_extruder_nr", - "enabled": "support_interface_enable and (support_enable or support_meshes_present)", - "settable_per_mesh": true - }, "support_interface_density": { "label": "Support Interface Density", diff --git a/resources/definitions/flyingbear_base.def.json b/resources/definitions/flyingbear_base.def.json index 268d8a169b..8733a85a84 100644 --- a/resources/definitions/flyingbear_base.def.json +++ b/resources/definitions/flyingbear_base.def.json @@ -92,7 +92,6 @@ "support_interface_height": { "value": "layer_height * 4" }, "support_interface_line_width": { "value": "line_width - 0.1" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/fusion3_f410.def.json b/resources/definitions/fusion3_f410.def.json index 6f50a15fd8..83fdb8affd 100644 --- a/resources/definitions/fusion3_f410.def.json +++ b/resources/definitions/fusion3_f410.def.json @@ -112,7 +112,6 @@ "support_interface_density": { "value": 33.333 }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 0 }, "support_xy_distance": { "value": "wall_line_width_0 * 3" }, diff --git a/resources/definitions/kingroon_base.def.json b/resources/definitions/kingroon_base.def.json index 7b318018f7..b800b81cca 100644 --- a/resources/definitions/kingroon_base.def.json +++ b/resources/definitions/kingroon_base.def.json @@ -133,7 +133,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/koonovo_base.def.json b/resources/definitions/koonovo_base.def.json index b22a4267d1..f46c39ec1e 100644 --- a/resources/definitions/koonovo_base.def.json +++ b/resources/definitions/koonovo_base.def.json @@ -70,7 +70,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/koonovo_kn3.def.json b/resources/definitions/koonovo_kn3.def.json index ae978b12e0..06cf226ff4 100644 --- a/resources/definitions/koonovo_kn3.def.json +++ b/resources/definitions/koonovo_kn3.def.json @@ -88,7 +88,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/koonovo_kn5.def.json b/resources/definitions/koonovo_kn5.def.json index 96ae03a6d9..c8e444f5d4 100644 --- a/resources/definitions/koonovo_kn5.def.json +++ b/resources/definitions/koonovo_kn5.def.json @@ -88,7 +88,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/longer_base.def.json b/resources/definitions/longer_base.def.json index fdc78b838b..6010b7af46 100644 --- a/resources/definitions/longer_base.def.json +++ b/resources/definitions/longer_base.def.json @@ -109,7 +109,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/mingda_base.def.json b/resources/definitions/mingda_base.def.json index 23dcf21f48..b07dbe458f 100644 --- a/resources/definitions/mingda_base.def.json +++ b/resources/definitions/mingda_base.def.json @@ -119,7 +119,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/tank_m_base.def.json b/resources/definitions/tank_m_base.def.json index 3692793259..dfeaa7e9d8 100644 --- a/resources/definitions/tank_m_base.def.json +++ b/resources/definitions/tank_m_base.def.json @@ -70,7 +70,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/tronxy_x.def.json b/resources/definitions/tronxy_x.def.json index 683761a81b..233dbb1c64 100644 --- a/resources/definitions/tronxy_x.def.json +++ b/resources/definitions/tronxy_x.def.json @@ -111,7 +111,6 @@ "support_interface_density": { "value": 33.333 }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": "1 if (support_structure == 'tree') else 0" }, "support_xy_distance": { "value": "wall_line_width_0 * 3" }, diff --git a/resources/definitions/two_trees_base.def.json b/resources/definitions/two_trees_base.def.json index ff01e46f6f..c83476db65 100644 --- a/resources/definitions/two_trees_base.def.json +++ b/resources/definitions/two_trees_base.def.json @@ -68,7 +68,6 @@ "support_interface_density": { "value": 33.333 }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": "1 if (support_structure == 'tree') else 0" }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/definitions/vivedino_base.def.json b/resources/definitions/vivedino_base.def.json index a638fc105c..a5cf0def87 100644 --- a/resources/definitions/vivedino_base.def.json +++ b/resources/definitions/vivedino_base.def.json @@ -99,7 +99,6 @@ "support_interface_enable": { "value": true }, "support_interface_height": { "value": "layer_height * 4" }, "support_interface_pattern": { "value": "'grid'" }, - "support_interface_skip_height": { "value": 0.2 }, "support_pattern": { "value": "'zigzag'" }, "support_wall_count": { "value": 1 }, "support_xy_distance": { "value": "wall_line_width_0 * 2" }, diff --git a/resources/i18n/fdmprinter.def.json.pot b/resources/i18n/fdmprinter.def.json.pot index 6b61ec3173..ab63530018 100644 --- a/resources/i18n/fdmprinter.def.json.pot +++ b/resources/i18n/fdmprinter.def.json.pot @@ -3548,14 +3548,6 @@ msgctxt "support_bottom_height description" msgid "The thickness of the support floors. This controls the number of dense layers that are printed on top of places of a model on which support rests." msgstr "" -msgctxt "support_interface_skip_height label" -msgid "Support Interface Resolution" -msgstr "" - -msgctxt "support_interface_skip_height description" -msgid "When checking where there's model above and below the support, take steps of the given height. Lower values will slice slower, while higher values may cause normal support to be printed in some places where there should have been support interface." -msgstr "" - msgctxt "support_interface_density label" msgid "Support Interface Density" msgstr "" diff --git a/resources/quality/beamup_l/beamup_l_coarse.inst.cfg b/resources/quality/beamup_l/beamup_l_coarse.inst.cfg index e298d659f7..2fd1b8afca 100644 --- a/resources/quality/beamup_l/beamup_l_coarse.inst.cfg +++ b/resources/quality/beamup_l/beamup_l_coarse.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.60 support_interface_pattern = zigzag -support_interface_skip_height = 0.30 support_offset = 0.8 support_z_distance = 0.4 wall_thickness = 1.6 diff --git a/resources/quality/beamup_l/beamup_l_draft.inst.cfg b/resources/quality/beamup_l/beamup_l_draft.inst.cfg index 16f8536a02..e3cf82651b 100644 --- a/resources/quality/beamup_l/beamup_l_draft.inst.cfg +++ b/resources/quality/beamup_l/beamup_l_draft.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.60 support_interface_pattern = zigzag -support_interface_skip_height = 0.20 support_offset = 0.8 support_z_distance = 0.3 wall_thickness = 1.6 diff --git a/resources/quality/beamup_l/beamup_l_extra_fine.inst.cfg b/resources/quality/beamup_l/beamup_l_extra_fine.inst.cfg index cacf5289e7..8b4e8eccc7 100644 --- a/resources/quality/beamup_l/beamup_l_extra_fine.inst.cfg +++ b/resources/quality/beamup_l/beamup_l_extra_fine.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.30 support_interface_pattern = zigzag -support_interface_skip_height = 0.06 support_offset = 0.8 support_z_distance = 0.12 wall_thickness = 1.6 diff --git a/resources/quality/beamup_l/beamup_l_fine.inst.cfg b/resources/quality/beamup_l/beamup_l_fine.inst.cfg index f977de059b..87ed50905c 100644 --- a/resources/quality/beamup_l/beamup_l_fine.inst.cfg +++ b/resources/quality/beamup_l/beamup_l_fine.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.30 support_interface_pattern = zigzag -support_interface_skip_height = 0.10 support_offset = 0.8 support_z_distance = 0.2 wall_thickness = 1.6 diff --git a/resources/quality/beamup_l/beamup_l_normal.inst.cfg b/resources/quality/beamup_l/beamup_l_normal.inst.cfg index cc78f01198..59ad26fc03 100644 --- a/resources/quality/beamup_l/beamup_l_normal.inst.cfg +++ b/resources/quality/beamup_l/beamup_l_normal.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.45 support_interface_pattern = zigzag -support_interface_skip_height = 0.15 support_offset = 0.8 support_z_distance = 0.25 wall_thickness = 1.6 diff --git a/resources/quality/beamup_s/beamup_s_coarse.inst.cfg b/resources/quality/beamup_s/beamup_s_coarse.inst.cfg index d4d8b3551b..673950dca8 100644 --- a/resources/quality/beamup_s/beamup_s_coarse.inst.cfg +++ b/resources/quality/beamup_s/beamup_s_coarse.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.60 support_interface_pattern = zigzag -support_interface_skip_height = 0.30 support_offset = 0.8 support_z_distance = 0.2 wall_thickness = 0.8 diff --git a/resources/quality/beamup_s/beamup_s_draft.inst.cfg b/resources/quality/beamup_s/beamup_s_draft.inst.cfg index 14dc4ad964..a307f2d872 100644 --- a/resources/quality/beamup_s/beamup_s_draft.inst.cfg +++ b/resources/quality/beamup_s/beamup_s_draft.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.40 support_interface_pattern = zigzag -support_interface_skip_height = 0.20 support_offset = 0.8 support_z_distance = 0.2 wall_thickness = 0.8 diff --git a/resources/quality/beamup_s/beamup_s_extra_fine.inst.cfg b/resources/quality/beamup_s/beamup_s_extra_fine.inst.cfg index fe490f5dd4..daf1c8c5e5 100644 --- a/resources/quality/beamup_s/beamup_s_extra_fine.inst.cfg +++ b/resources/quality/beamup_s/beamup_s_extra_fine.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.30 support_interface_pattern = zigzag -support_interface_skip_height = 0.06 support_offset = 0.8 support_z_distance = 0.2 wall_thickness = 0.8 diff --git a/resources/quality/beamup_s/beamup_s_fine.inst.cfg b/resources/quality/beamup_s/beamup_s_fine.inst.cfg index ea86894268..798cc6bb68 100644 --- a/resources/quality/beamup_s/beamup_s_fine.inst.cfg +++ b/resources/quality/beamup_s/beamup_s_fine.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.30 support_interface_pattern = zigzag -support_interface_skip_height = 0.10 support_offset = 0.8 support_z_distance = 0.2 wall_thickness = 0.8 diff --git a/resources/quality/beamup_s/beamup_s_normal.inst.cfg b/resources/quality/beamup_s/beamup_s_normal.inst.cfg index c034f9bfd4..cab5840330 100644 --- a/resources/quality/beamup_s/beamup_s_normal.inst.cfg +++ b/resources/quality/beamup_s/beamup_s_normal.inst.cfg @@ -33,7 +33,6 @@ support_infill_rate = 20 support_interface_enable = True support_interface_height = 0.45 support_interface_pattern = zigzag -support_interface_skip_height = 0.15 support_offset = 0.8 support_z_distance = 0.2 wall_thickness = 0.8 diff --git a/resources/quality/flsun_sr/flsun_sr_fine.inst.cfg b/resources/quality/flsun_sr/flsun_sr_fine.inst.cfg index 7ba7f82e9a..c54130d953 100644 --- a/resources/quality/flsun_sr/flsun_sr_fine.inst.cfg +++ b/resources/quality/flsun_sr/flsun_sr_fine.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 60 support_interface_enable = True support_interface_height = 0.96 support_interface_pattern = grid -support_interface_skip_height = 0.12 support_roof_density = 60 support_type = everywhere support_wall_count = 1 diff --git a/resources/quality/flsun_sr/flsun_sr_normal.inst.cfg b/resources/quality/flsun_sr/flsun_sr_normal.inst.cfg index 5091ec6d97..373e5dbf6f 100644 --- a/resources/quality/flsun_sr/flsun_sr_normal.inst.cfg +++ b/resources/quality/flsun_sr/flsun_sr_normal.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 60 support_interface_enable = True support_interface_height = 0.6 support_interface_pattern = grid -support_interface_skip_height = 0.2 support_roof_density = 60 support_type = everywhere support_wall_count = 1 diff --git a/resources/quality/flsun_v400/flsun_v400_normal.inst.cfg b/resources/quality/flsun_v400/flsun_v400_normal.inst.cfg index 321f44a8bd..9c99046939 100644 --- a/resources/quality/flsun_v400/flsun_v400_normal.inst.cfg +++ b/resources/quality/flsun_v400/flsun_v400_normal.inst.cfg @@ -100,7 +100,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 0.6 support_interface_pattern = lines -support_interface_skip_height = 0.2 support_pattern = zigzag support_roof_density = 70 support_type = everywhere diff --git a/resources/quality/imade3d_jellybox/imade3d_jellybox_coarse.inst.cfg b/resources/quality/imade3d_jellybox/imade3d_jellybox_coarse.inst.cfg index 4363815718..b84019e791 100644 --- a/resources/quality/imade3d_jellybox/imade3d_jellybox_coarse.inst.cfg +++ b/resources/quality/imade3d_jellybox/imade3d_jellybox_coarse.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 2 support_interface_pattern = concentric -support_interface_skip_height = 0.1 support_type = everywhere support_use_towers = False support_xy_distance = 0.8 diff --git a/resources/quality/imade3d_jellybox/imade3d_jellybox_fine.inst.cfg b/resources/quality/imade3d_jellybox/imade3d_jellybox_fine.inst.cfg index ad1786e646..8aa8ee6203 100644 --- a/resources/quality/imade3d_jellybox/imade3d_jellybox_fine.inst.cfg +++ b/resources/quality/imade3d_jellybox/imade3d_jellybox_fine.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 2 support_interface_pattern = concentric -support_interface_skip_height = 0.1 support_type = everywhere support_use_towers = False support_xy_distance = 0.8 diff --git a/resources/quality/imade3d_jellybox/imade3d_jellybox_normal.inst.cfg b/resources/quality/imade3d_jellybox/imade3d_jellybox_normal.inst.cfg index 9d20162475..5e6ed2682c 100644 --- a/resources/quality/imade3d_jellybox/imade3d_jellybox_normal.inst.cfg +++ b/resources/quality/imade3d_jellybox/imade3d_jellybox_normal.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 2 support_interface_pattern = concentric -support_interface_skip_height = 0.1 support_type = everywhere support_use_towers = False support_xy_distance = 0.8 diff --git a/resources/quality/imade3d_jellybox/imade3d_jellybox_ultrafine.inst.cfg b/resources/quality/imade3d_jellybox/imade3d_jellybox_ultrafine.inst.cfg index 9cf8367db5..db92713bd0 100644 --- a/resources/quality/imade3d_jellybox/imade3d_jellybox_ultrafine.inst.cfg +++ b/resources/quality/imade3d_jellybox/imade3d_jellybox_ultrafine.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 2 support_interface_pattern = concentric -support_interface_skip_height = 0.1 support_type = everywhere support_use_towers = False support_xy_distance = 0.8 diff --git a/resources/quality/imade3d_jellybox_2/jb2_global_coarse.inst.cfg b/resources/quality/imade3d_jellybox_2/jb2_global_coarse.inst.cfg index a445dc28be..9fde6a87ea 100644 --- a/resources/quality/imade3d_jellybox_2/jb2_global_coarse.inst.cfg +++ b/resources/quality/imade3d_jellybox_2/jb2_global_coarse.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 2 support_interface_pattern = concentric -support_interface_skip_height = 0.1 support_type = everywhere support_use_towers = False support_xy_distance = 0.8 diff --git a/resources/quality/imade3d_jellybox_2/jb2_global_fine.inst.cfg b/resources/quality/imade3d_jellybox_2/jb2_global_fine.inst.cfg index df0a0bf3f0..419fa6b300 100644 --- a/resources/quality/imade3d_jellybox_2/jb2_global_fine.inst.cfg +++ b/resources/quality/imade3d_jellybox_2/jb2_global_fine.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 2 support_interface_pattern = concentric -support_interface_skip_height = 0.1 support_type = everywhere support_use_towers = False support_xy_distance = 0.8 diff --git a/resources/quality/imade3d_jellybox_2/jb2_global_normal.inst.cfg b/resources/quality/imade3d_jellybox_2/jb2_global_normal.inst.cfg index be43962f72..c352981f2d 100644 --- a/resources/quality/imade3d_jellybox_2/jb2_global_normal.inst.cfg +++ b/resources/quality/imade3d_jellybox_2/jb2_global_normal.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 2 support_interface_pattern = concentric -support_interface_skip_height = 0.1 support_type = everywhere support_use_towers = False support_xy_distance = 0.8 diff --git a/resources/quality/imade3d_jellybox_2/jb2_global_ultrafine.inst.cfg b/resources/quality/imade3d_jellybox_2/jb2_global_ultrafine.inst.cfg index b3b35aca97..a1496e36cc 100644 --- a/resources/quality/imade3d_jellybox_2/jb2_global_ultrafine.inst.cfg +++ b/resources/quality/imade3d_jellybox_2/jb2_global_ultrafine.inst.cfg @@ -65,7 +65,6 @@ support_interface_density = 70 support_interface_enable = True support_interface_height = 2 support_interface_pattern = concentric -support_interface_skip_height = 0.1 support_type = everywhere support_use_towers = False support_xy_distance = 0.8 diff --git a/resources/setting_visibility/expert.cfg b/resources/setting_visibility/expert.cfg index ab0d2aa920..2a71993998 100644 --- a/resources/setting_visibility/expert.cfg +++ b/resources/setting_visibility/expert.cfg @@ -293,7 +293,6 @@ support_bottom_wall_count support_interface_height support_roof_height support_bottom_height -support_interface_skip_height support_interface_density support_roof_density support_bottom_density diff --git a/resources/variants/arjun/arjun300_pva_0.2.inst.cfg b/resources/variants/arjun/arjun300_pva_0.2.inst.cfg index 26440e5486..065fecd92b 100644 --- a/resources/variants/arjun/arjun300_pva_0.2.inst.cfg +++ b/resources/variants/arjun/arjun300_pva_0.2.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjun300_pva_0.3.inst.cfg b/resources/variants/arjun/arjun300_pva_0.3.inst.cfg index 5edaddba92..cef64896b1 100644 --- a/resources/variants/arjun/arjun300_pva_0.3.inst.cfg +++ b/resources/variants/arjun/arjun300_pva_0.3.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjun300_pva_0.4.inst.cfg b/resources/variants/arjun/arjun300_pva_0.4.inst.cfg index a5ca8ffb7a..273bab3848 100644 --- a/resources/variants/arjun/arjun300_pva_0.4.inst.cfg +++ b/resources/variants/arjun/arjun300_pva_0.4.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjun300_pva_0.5.inst.cfg b/resources/variants/arjun/arjun300_pva_0.5.inst.cfg index 2145714b0d..4ac74b10b0 100644 --- a/resources/variants/arjun/arjun300_pva_0.5.inst.cfg +++ b/resources/variants/arjun/arjun300_pva_0.5.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjun300_pva_0.6.inst.cfg b/resources/variants/arjun/arjun300_pva_0.6.inst.cfg index 40e0c5f3ba..9522f1a103 100644 --- a/resources/variants/arjun/arjun300_pva_0.6.inst.cfg +++ b/resources/variants/arjun/arjun300_pva_0.6.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjun300_pva_0.8.inst.cfg b/resources/variants/arjun/arjun300_pva_0.8.inst.cfg index ee6e5557fb..1e47424034 100644 --- a/resources/variants/arjun/arjun300_pva_0.8.inst.cfg +++ b/resources/variants/arjun/arjun300_pva_0.8.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjunpro300_pva_0.2.inst.cfg b/resources/variants/arjun/arjunpro300_pva_0.2.inst.cfg index 60d7f77d7b..3fc340152c 100644 --- a/resources/variants/arjun/arjunpro300_pva_0.2.inst.cfg +++ b/resources/variants/arjun/arjunpro300_pva_0.2.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjunpro300_pva_0.3.inst.cfg b/resources/variants/arjun/arjunpro300_pva_0.3.inst.cfg index f4c0c7e37a..8ae2ffb70a 100644 --- a/resources/variants/arjun/arjunpro300_pva_0.3.inst.cfg +++ b/resources/variants/arjun/arjunpro300_pva_0.3.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjunpro300_pva_0.4.inst.cfg b/resources/variants/arjun/arjunpro300_pva_0.4.inst.cfg index 25f40aa829..b444d14925 100644 --- a/resources/variants/arjun/arjunpro300_pva_0.4.inst.cfg +++ b/resources/variants/arjun/arjunpro300_pva_0.4.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjunpro300_pva_0.5.inst.cfg b/resources/variants/arjun/arjunpro300_pva_0.5.inst.cfg index cbb9ea3deb..e78ca2f27a 100644 --- a/resources/variants/arjun/arjunpro300_pva_0.5.inst.cfg +++ b/resources/variants/arjun/arjunpro300_pva_0.5.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjunpro300_pva_0.6.inst.cfg b/resources/variants/arjun/arjunpro300_pva_0.6.inst.cfg index d9459b476a..d6a3770cd9 100644 --- a/resources/variants/arjun/arjunpro300_pva_0.6.inst.cfg +++ b/resources/variants/arjun/arjunpro300_pva_0.6.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/arjun/arjunpro300_pva_0.8.inst.cfg b/resources/variants/arjun/arjunpro300_pva_0.8.inst.cfg index cf5df5f37d..c19c8ca79a 100644 --- a/resources/variants/arjun/arjunpro300_pva_0.8.inst.cfg +++ b/resources/variants/arjun/arjunpro300_pva_0.8.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/kosher/kosher220_pva_0.2.inst.cfg b/resources/variants/kosher/kosher220_pva_0.2.inst.cfg index e5893c3e65..ea3b821cea 100644 --- a/resources/variants/kosher/kosher220_pva_0.2.inst.cfg +++ b/resources/variants/kosher/kosher220_pva_0.2.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/kosher/kosher220_pva_0.3.inst.cfg b/resources/variants/kosher/kosher220_pva_0.3.inst.cfg index e1fbeaaf69..216388c64b 100644 --- a/resources/variants/kosher/kosher220_pva_0.3.inst.cfg +++ b/resources/variants/kosher/kosher220_pva_0.3.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/kosher/kosher220_pva_0.4.inst.cfg b/resources/variants/kosher/kosher220_pva_0.4.inst.cfg index 40de699118..024d842630 100644 --- a/resources/variants/kosher/kosher220_pva_0.4.inst.cfg +++ b/resources/variants/kosher/kosher220_pva_0.4.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/kosher/kosher220_pva_0.5.inst.cfg b/resources/variants/kosher/kosher220_pva_0.5.inst.cfg index 2a4c88d022..6197e0ab9c 100644 --- a/resources/variants/kosher/kosher220_pva_0.5.inst.cfg +++ b/resources/variants/kosher/kosher220_pva_0.5.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/kosher/kosher220_pva_0.6.inst.cfg b/resources/variants/kosher/kosher220_pva_0.6.inst.cfg index a3781a00bd..211a361c2b 100644 --- a/resources/variants/kosher/kosher220_pva_0.6.inst.cfg +++ b/resources/variants/kosher/kosher220_pva_0.6.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles diff --git a/resources/variants/kosher/kosher220_pva_0.8.inst.cfg b/resources/variants/kosher/kosher220_pva_0.8.inst.cfg index 4faf6729b6..6f6a9dd6b4 100644 --- a/resources/variants/kosher/kosher220_pva_0.8.inst.cfg +++ b/resources/variants/kosher/kosher220_pva_0.8.inst.cfg @@ -21,7 +21,6 @@ support_interface_density = 100 support_interface_enable = True support_interface_height = =layer_height * 5 support_interface_pattern = concentric -support_interface_skip_height = =layer_height support_join_distance = 3 support_offset = 3 support_pattern = triangles From 34da282275073432f04ce37cda9d7fbcd3670702 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Wed, 10 Jan 2024 15:09:26 +0100 Subject: [PATCH 09/30] Uranium fixing API breaks. deprecated message shows up when user uses it. will remove them in future CURA-7812 --- resources/qml/Dialogs/AboutDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 79cad92b25..5c80964e38 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -58,7 +58,7 @@ UM.Dialog UM.Label { id: version - text: catalog.i18nc("@label","version: %1").arg(CuraApplication.applicationVersion()) + text: catalog.i18nc("@label","version: %1").arg(CuraApplication.version()) font: UM.Theme.getFont("large_bold") color: UM.Theme.getColor("button_text") anchors.right : logo.right From d0560ae790ad027ee32ab4b87c456299c9642056 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Wed, 10 Jan 2024 17:54:02 +0100 Subject: [PATCH 10/30] restoring qmlregistersingletons in Cura adding wrapper for deprecation warning CURA-7812 --- cura/CuraApplication.py | 42 ++++++++++++++++--- .../Custom/QualitiesWithIntentMenu.qml | 2 +- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 20048e3d3f..67c420028b 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -15,13 +15,13 @@ import numpy from PyQt6.QtCore import QObject, QTimer, QUrl, QUrlQuery, pyqtSignal, pyqtProperty, QEvent, pyqtEnum, QCoreApplication, \ QByteArray from PyQt6.QtGui import QColor, QIcon -from PyQt6.QtQml import qmlRegisterUncreatableType, qmlRegisterUncreatableMetaObject, qmlRegisterSingletonType, qmlRegisterType +from PyQt6.QtQml import qmlRegisterUncreatableMetaObject, qmlRegisterSingletonType, qmlRegisterType from PyQt6.QtWidgets import QMessageBox import UM.Util import cura.Settings.cura_empty_instance_containers from UM.Application import Application -from UM.Decorators import override +from UM.Decorators import override, deprecated from UM.FlameProfiler import pyqtSlot from UM.Logger import Logger from UM.Math.AxisAlignedBox import AxisAlignedBox @@ -191,7 +191,7 @@ class CuraApplication(QtApplication): self.empty_container = None # type: EmptyInstanceContainer self.empty_definition_changes_container = None # type: EmptyInstanceContainer self.empty_variant_container = None # type: EmptyInstanceContainer - self.empty_intent_container = None # type: EmptyInstanceContainer + self.empty_intent_container = None # type: EmptyInstanceContainer self.empty_material_container = None # type: EmptyInstanceContainer self.empty_quality_container = None # type: EmptyInstanceContainer self.empty_quality_changes_container = None # type: EmptyInstanceContainer @@ -1198,18 +1198,43 @@ class CuraApplication(QtApplication): return self._print_information - pyqtSlot(result =QObject) + @pyqtSlot(result=QObject) def getQualityProfilesDropDownMenuModel(self, *args, **kwargs)-> QualityProfilesDropDownMenuModel: if self._quality_profile_drop_down_menu_model is None: self._quality_profile_drop_down_menu_model = QualityProfilesDropDownMenuModel(self) return self._quality_profile_drop_down_menu_model - pyqtSlot(result=QObject) + @pyqtSlot(result=QObject) def getCustomQualityProfilesDropDownMenuModel(self, *args, **kwargs)->CustomQualityProfilesDropDownMenuModel: if self._custom_quality_profile_drop_down_menu_model is None: self._custom_quality_profile_drop_down_menu_model = CustomQualityProfilesDropDownMenuModel(self) return self._custom_quality_profile_drop_down_menu_model + @deprecated("SimpleModeSettingsManager is deprecated and will be removed in major SDK release, Use getSimpleModeSettingsManager() instead", since = "5.7.0") + def getSimpleModeSettingsManagerWrapper(self, *args, **kwargs): + return self.getSimpleModeSettingsManager() + + @deprecated("MachineActionManager is deprecated and will be removed in major SDK release, Use getMachineActionManager() instead", since="5.7.0") + def getMachineActionManagerWrapper(self, *args, **kwargs): + return self.getMachineActionManager() + + @deprecated("QualityManagementModel is deprecated and will be removed in major SDK release, Use getQualityManagementModel() instead", since="5.7.0") + def getQualityManagementModelWrapper(self, *args, **kwargs): + return self.getQualityManagementModel() + + @deprecated("MaterialManagementModel is deprecated and will be removed in major SDK release, Use getMaterialManagementModel() instead", since = "5.7.0") + def getMaterialManagementModelWrapper(self, *args, **kwargs): + return self.getMaterialManagementModel() + + @deprecated("QualityProfilesDropDownMenuModel is deprecated and will be removed in major SDK release, Use getQualityProfilesDropDownMenuModel() instead", since = "5.7.0") + def getQualityProfilesDropDownMenuModelWrapper(self, *args, **kwargs): + return self.getQualityProfilesDropDownMenuModel() + + @deprecated("CustomQualityProfilesDropDownMenuModel is deprecated and will be removed in major SDK release, Use getCustomQualityProfilesDropDownMenuModel() instead", since = "5.7.0") + def getCustomQualityProfilesDropDownMenuModelWrapper(self, *args, **kwargs): + return self.getCustomQualityProfilesDropDownMenuModel() + + def getCuraAPI(self, *args, **kwargs) -> "CuraAPI": return self._cura_API @@ -1238,6 +1263,8 @@ class CuraApplication(QtApplication): qmlRegisterSingletonType(MachineManager, "Cura", 1, 0, self.getMachineManager, "MachineManager") qmlRegisterSingletonType(IntentManager, "Cura", 1, 6, self.getIntentManager, "IntentManager") qmlRegisterSingletonType(SettingInheritanceManager, "Cura", 1, 0, self.getSettingInheritanceManager, "SettingInheritanceManager") + qmlRegisterSingletonType(SimpleModeSettingsManager, "Cura", 1, 0, self.getSimpleModeSettingsManagerWrapper, "SimpleModeSettingsManager") + qmlRegisterSingletonType(MachineActionManager.MachineActionManager, "Cura", 1, 0, self.getMachineActionManagerWrapper, "MachineActionManager") self.processEvents() qmlRegisterType(NetworkingUtil, "Cura", 1, 5, "NetworkingUtil") @@ -1262,11 +1289,14 @@ class CuraApplication(QtApplication): qmlRegisterType(FavoriteMaterialsModel, "Cura", 1, 0, "FavoriteMaterialsModel") qmlRegisterType(GenericMaterialsModel, "Cura", 1, 0, "GenericMaterialsModel") qmlRegisterType(MaterialBrandsModel, "Cura", 1, 0, "MaterialBrandsModel") + qmlRegisterSingletonType(QualityManagementModel, "Cura", 1, 0, self.getQualityManagementModelWrapper,"QualityManagementModel") + qmlRegisterSingletonType(MaterialManagementModel, "Cura", 1, 5, self.getMaterialManagementModelWrapper,"MaterialManagementModel") self.processEvents() qmlRegisterType(DiscoveredPrintersModel, "Cura", 1, 0, "DiscoveredPrintersModel") qmlRegisterType(DiscoveredCloudPrintersModel, "Cura", 1, 7, "DiscoveredCloudPrintersModel") - qmlRegisterType(CustomQualityProfilesDropDownMenuModel, "Cura", 1, 0, "CustomQualityProfilesDropDownMenuModel") + qmlRegisterSingletonType(QualityProfilesDropDownMenuModel, "Cura", 1, 0, self.getQualityProfilesDropDownMenuModelWrapper, "QualityProfilesDropDownMenuModel") + qmlRegisterSingletonType(CustomQualityProfilesDropDownMenuModel, "Cura", 1, 0, self.getCustomQualityProfilesDropDownMenuModelWrapper, "CustomQualityProfilesDropDownMenuModel") qmlRegisterType(NozzleModel, "Cura", 1, 0, "NozzleModel") qmlRegisterType(IntentModel, "Cura", 1, 6, "IntentModel") qmlRegisterType(IntentCategoryModel, "Cura", 1, 6, "IntentCategoryModel") diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index 646e835cb2..9facc5095e 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml @@ -187,7 +187,7 @@ Popup //Add all the custom profiles. Repeater { - model: Cura.CustomQualityProfilesDropDownMenuModel + model: CuraApplication.getCustomQualityProfilesDropDownMenuModel() MenuButton { onClicked: Cura.MachineManager.setQualityChangesGroup(model.quality_changes_group) From 8f29e8d77bdd141a52528932af9c1a298981990b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 11 Jan 2024 09:00:19 +0100 Subject: [PATCH 11/30] Fix wrongful removal of i18n option This caused the option to be always be removed, while we only needed the info of the option to be removed Contributes to CURA-11497 --- conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index a3ca8f1c89..ea1ac2e1f9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -518,7 +518,8 @@ echo "CURA_APP_NAME={{ cura_app_name }}" >> ${{ env_prefix }}GITHUB_ENV del self.info.options.cloud_api_version del self.info.options.display_name del self.info.options.cura_debug_mode - self.options.rm_safe("enable_i18n") + if self.options.get_safe("enable_i18n", False): + del self.info.options.enable_i18n # TODO: Use the hash of requirements.txt and requirements-ultimaker.txt, Because changing these will actually result in a different # Cura. This is needed because the requirements.txt aren't managed by Conan and therefor not resolved in the package_id. This isn't From b7970dadee75b0c4f029f4503062624f4b873410 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Thu, 11 Jan 2024 13:03:48 +0100 Subject: [PATCH 12/30] Setting QT_QUICK_FLICKABLE_WHEEL_DECELERATION only while opening cura application CURA-11468 --- conanfile.py | 1 - cura_app.py | 9 ++++----- packaging/AppImage-builder/AppImageBuilder.yml.jinja | 1 - packaging/AppImage/AppRun | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/conanfile.py b/conanfile.py index 5ebcf5a4c4..a3ca8f1c89 100644 --- a/conanfile.py +++ b/conanfile.py @@ -71,7 +71,6 @@ class CuraConan(ConanFile): self._cura_env = Environment() self._cura_env.define("QML2_IMPORT_PATH", str(self._site_packages.joinpath("PyQt6", "Qt6", "qml"))) self._cura_env.define("QT_PLUGIN_PATH", str(self._site_packages.joinpath("PyQt6", "Qt6", "plugins"))) - self._cura_env.define("QT_QUICK_FLICKABLE_WHEEL_DECELERATION", "5000") if not self.in_local_cache: self._cura_env.define("CURA_DATA_ROOT", str(self._share_dir.joinpath("cura"))) diff --git a/cura_app.py b/cura_app.py index 7e80bbac79..87cd1a59ed 100755 --- a/cura_app.py +++ b/cura_app.py @@ -15,13 +15,12 @@ if "" in sys.path: import argparse import faulthandler import os + +# try converting to integer +os.environ["QT_QUICK_FLICKABLE_WHEEL_DECELERATION"] = str(int(os.environ.get("QT_QUICK_FLICKABLE_WHEEL_DECELERATION", "5000"))) + if sys.platform != "linux": # Turns out the Linux build _does_ use this, but we're not making an Enterprise release for that system anyway. os.environ["QT_PLUGIN_PATH"] = "" # Security workaround: Don't need it, and introduces an attack vector, so set to nul. - try: - # try converting to integer - os.environ["QT_QUICK_FLICKABLE_WHEEL_DECELERATION"] = str(int(os.environ["QT_QUICK_FLICKABLE_WHEEL_DECELERATION"])) - except ValueError: - os.environ["QT_QUICK_FLICKABLE_WHEEL_DECELERATION"] = "5000" os.environ["QML2_IMPORT_PATH"] = "" # Security workaround: Don't need it, and introduces an attack vector, so set to nul. os.environ["QT_OPENGL_DLL"] = "" # Security workaround: Don't need it, and introduces an attack vector, so set to nul. diff --git a/packaging/AppImage-builder/AppImageBuilder.yml.jinja b/packaging/AppImage-builder/AppImageBuilder.yml.jinja index ae6cabcaa1..9090a5f209 100644 --- a/packaging/AppImage-builder/AppImageBuilder.yml.jinja +++ b/packaging/AppImage-builder/AppImageBuilder.yml.jinja @@ -45,7 +45,6 @@ AppDir: LD_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders" PYTHONPATH: "$APPDIR" QT_PLUGIN_PATH: "$APPDIR/qt/plugins" - QT_QUICK_FLICKABLE_WHEEL_DECELERATION: "5000" QML2_IMPORT_PATH: "$APPDIR/qt/qml" QT_QPA_PLATFORMTHEME: xdgdesktopportal GDK_PIXBUF_MODULEDIR: $APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders diff --git a/packaging/AppImage/AppRun b/packaging/AppImage/AppRun index 9926df1878..369ce54c6c 100644 --- a/packaging/AppImage/AppRun +++ b/packaging/AppImage/AppRun @@ -5,7 +5,6 @@ scriptdir=$(dirname $0) export PYTHONPATH="$scriptdir/lib/python3.10" export LD_LIBRARY_PATH=$scriptdir export QT_PLUGIN_PATH="$scriptdir/qt/plugins" -export QT_QUICK_FLICKABLE_WHEEL_DECELERATION="5000" export QML2_IMPORT_PATH="$scriptdir/qt/qml" export QT_QPA_FONTDIR=/usr/share/fonts export QT_QPA_PLATFORMTHEME=xdgdesktopportal From db94117cf18ec9f9ec93ceb9d92844401c52292e Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Thu, 11 Jan 2024 13:08:47 +0100 Subject: [PATCH 13/30] description changed CURA-11468 --- cura_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index 87cd1a59ed..bcea032789 100755 --- a/cura_app.py +++ b/cura_app.py @@ -16,7 +16,7 @@ import argparse import faulthandler import os -# try converting to integer +# set the environment variable QT_QUICK_FLICKABLE_WHEEL_DECELERATION to 5000 as mentioned in qt6.6 update log to overcome scroll related issues os.environ["QT_QUICK_FLICKABLE_WHEEL_DECELERATION"] = str(int(os.environ.get("QT_QUICK_FLICKABLE_WHEEL_DECELERATION", "5000"))) if sys.platform != "linux": # Turns out the Linux build _does_ use this, but we're not making an Enterprise release for that system anyway. From f19e6347820b868f495d5a0a31d982ff7abb9623 Mon Sep 17 00:00:00 2001 From: Paul Kuiper <46715907+pkuiper-ultimaker@users.noreply.github.com> Date: Fri, 12 Jan 2024 09:43:46 +0100 Subject: [PATCH 14/30] Set the printing temperature (instead of initial) and do not wait for setpoint to be reached (the 5s wait after that command will be enough + Cura also directly does a M109 after the switch) PP-417 --- resources/extruders/ultimaker_methodx_extruder_left.def.json | 2 +- resources/extruders/ultimaker_methodx_extruder_right.def.json | 2 +- resources/extruders/ultimaker_methodxl_extruder_left.def.json | 2 +- resources/extruders/ultimaker_methodxl_extruder_right.def.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/extruders/ultimaker_methodx_extruder_left.def.json b/resources/extruders/ultimaker_methodx_extruder_left.def.json index 273a2c922e..41b2322ff3 100644 --- a/resources/extruders/ultimaker_methodx_extruder_left.def.json +++ b/resources/extruders/ultimaker_methodx_extruder_left.def.json @@ -15,7 +15,7 @@ "maximum_value": "1" }, "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, - "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_initial_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, + "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodx_extruder_right.def.json b/resources/extruders/ultimaker_methodx_extruder_right.def.json index bb8f1d89c2..0524d73e94 100644 --- a/resources/extruders/ultimaker_methodx_extruder_right.def.json +++ b/resources/extruders/ultimaker_methodx_extruder_right.def.json @@ -15,7 +15,7 @@ "maximum_value": "1" }, "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, - "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_initial_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, + "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodxl_extruder_left.def.json b/resources/extruders/ultimaker_methodxl_extruder_left.def.json index ba4a3f0157..b37cd5e446 100644 --- a/resources/extruders/ultimaker_methodxl_extruder_left.def.json +++ b/resources/extruders/ultimaker_methodxl_extruder_left.def.json @@ -15,7 +15,7 @@ "maximum_value": "1" }, "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, - "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_initial_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, + "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, diff --git a/resources/extruders/ultimaker_methodxl_extruder_right.def.json b/resources/extruders/ultimaker_methodxl_extruder_right.def.json index 32fbf1dd08..8a0b0e4635 100644 --- a/resources/extruders/ultimaker_methodxl_extruder_right.def.json +++ b/resources/extruders/ultimaker_methodxl_extruder_right.def.json @@ -15,7 +15,7 @@ "maximum_value": "1" }, "machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" }, - "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM109 S{material_initial_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, + "machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{cool_fan_speed/100}" }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, From 90472bb6477fb7f1027ecdcba38a33ff1e3e55a6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 12 Jan 2024 10:57:24 +0100 Subject: [PATCH 15/30] Use Arcus with published Sentry debug-files Contributes to CURA-11482 --- conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conandata.yml b/conandata.yml index dcf883c630..a3456c44b1 100644 --- a/conandata.yml +++ b/conandata.yml @@ -6,7 +6,7 @@ requirements: - "fdm_materials/(latest)@ultimaker/testing" - "curaengine_plugin_gradual_flow/(latest)@ultimaker/stable" - "dulcificum/latest@ultimaker/testing" - - "pyarcus/5.3.0" + - "arcus/(latest)@ultimaker/cura_11482" - "pysavitar/5.3.0" - "pynest2d/5.3.0" - "curaengine_grpc_definitions/(latest)@ultimaker/testing" From ec1c82535263761ba8c72a6cbd74a32a96ee5797 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 12 Jan 2024 11:00:18 +0100 Subject: [PATCH 16/30] Don't package pdb Contributes to CURA-11482 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index ea1ac2e1f9..7ce196c90d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -242,7 +242,7 @@ class CuraConan(ConanFile): self.output.warning(f"Source path for binary {binary['binary']} does not exist") continue - for bin in Path(src_path).glob(binary["binary"] + "*[.exe|.dll|.so|.dylib|.so.|.pdb]*"): + for bin in Path(src_path).glob(binary["binary"] + "*[.exe|.dll|.so|.dylib|.so.]*"): binaries.append((str(bin), binary["dst"])) for bin in Path(src_path).glob(binary["binary"]): binaries.append((str(bin), binary["dst"])) From 0661fe5dcb0b6b3796fd57e04f07fab5c51cd0f7 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 12 Jan 2024 11:04:31 +0100 Subject: [PATCH 17/30] Enable Sentry for Arcus Contributes to CURA-11482 --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index 7ce196c90d..9eac9218b1 100644 --- a/conanfile.py +++ b/conanfile.py @@ -320,6 +320,7 @@ class CuraConan(ConanFile): self.options["openssl"].shared = True if self.conf.get("user.curaengine:sentry_url", "", check_type=str) != "": self.options["curaengine"].enable_sentry = True + self.options["arcus"].enable_sentry = True def validate(self): version = self.conf.get("user.cura:version", default = self.version, check_type = str) From 34e7ea81850e85f6e3f4a4a22acf016dabd2b28b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 12 Jan 2024 14:28:01 +0100 Subject: [PATCH 18/30] Use clipper with Sentry support Contributes to CURA-11482 --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index 9eac9218b1..3402e4dc54 100644 --- a/conanfile.py +++ b/conanfile.py @@ -336,6 +336,7 @@ class CuraConan(ConanFile): for req in self.conan_data["requirements_internal"]: self.requires(req) self.requires("cpython/3.10.4@ultimaker/stable") + self.requires("clipper/6.4.2@ultimaker/cura_11482") # TODO: change channel to `testing` once merged self.requires("openssl/3.2.0") self.requires("boost/1.82.0") self.requires("spdlog/1.12.0") From 2bcdacef7239779db21cef3a069e174ff4a4831d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 13 Jan 2024 11:12:46 +0100 Subject: [PATCH 19/30] Allow for opt-in of DF User name for Sentry crash reports This will help us with triage of bugs for our customers. Contributes to CURA-11482 --- .../CuraEngineBackend/CuraEngineBackend.py | 10 +++- resources/qml/Preferences/GeneralPage.qml | 47 ++++++++++++++++++- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 818766d766..f67d14aafe 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -164,6 +164,7 @@ class CuraEngineBackend(QObject, Backend): application.getPreferences().addPreference("general/auto_slice", False) application.getPreferences().addPreference("info/send_engine_crash", True) + application.getPreferences().addPreference("info/anonymous_engine_crash_report", True) self._use_timer: bool = False @@ -198,6 +199,7 @@ class CuraEngineBackend(QObject, Backend): # Ensure that the initial value for send_engine_crash is handled correctly. application.callLater(self._onPreferencesChanged, "info/send_engine_crash") + application.callLater(self._onPreferencesChanged, "info/anonymous_engine_crash_report") def startPlugins(self) -> None: """ @@ -1094,14 +1096,18 @@ class CuraEngineBackend(QObject, Backend): self._change_timer.timeout.disconnect(self.slice) def _onPreferencesChanged(self, preference: str) -> None: - if preference != "general/auto_slice" and preference != "info/send_engine_crash": + if preference != "general/auto_slice" and preference != "info/send_engine_crash" and preference != "info/anonymous_engine_crash_report": return if preference == "general/auto_slice": auto_slice = self.determineAutoSlicing() if auto_slice: self._change_timer.start() elif preference == "info/send_engine_crash": - os.environ["use_sentry"] = "1" if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash") else "0" + os.environ["USE_SENTRY"] = "1" if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash") else "0" + elif preference == "info/anonymous_engine_crash_report": + account = CuraApplication.getInstance().getCuraAPI().account + if account and account.isLoggedIn and not CuraApplication.getInstance().getPreferences().getValue("info/anonymous_engine_crash_report"): + os.environ["CURAENGINE_SENTRY_USER"] = account.userName def tickle(self) -> None: """Tickle the backend so in case of auto slicing, it starts the timer.""" diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 587084444c..708cc4a441 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -124,6 +124,9 @@ UM.PreferencesPage UM.Preferences.resetPreference("info/send_engine_crash") sendEngineCrashCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_engine_crash")) + UM.Preferences.resetPreference("info/anonymous_engine_crash_report") + sendEngineCrashCheckboxAnonymous.checked = boolCheck(UM.Preferences.getValue("info/anonymous_engine_crash_report")) + UM.Preferences.resetPreference("info/automatic_update_check") checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) @@ -859,11 +862,12 @@ UM.PreferencesPage font: UM.Theme.getFont("medium_bold") text: catalog.i18nc("@label", "Privacy") } + UM.TooltipArea { width: childrenRect.width height: visible ? childrenRect.height : 0 - text: catalog.i18nc("@info:tooltip", "Should slicing crashes be automatically reported to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.") + text: catalog.i18nc("@info:tooltip", "Should slicing crashes be automatically reported to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored, unless you give explicit permission.") UM.CheckBox { @@ -874,6 +878,47 @@ UM.PreferencesPage } } + ButtonGroup + { + id: curaCrashGroup + buttons: [sendEngineCrashCheckboxAnonymous, sendEngineCrashCheckboxUser] + } + + UM.TooltipArea + { + width: childrenRect.width + height: visible ? childrenRect.height : 0 + visible: Cura.API.account.isLoggedIn + text: catalog.i18nc("@info:tooltip", "Send crash reports without any personally identifiable information or models data to UltiMaker.") + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + Cura.RadioButton + { + id: sendEngineCrashCheckboxAnonymous + text: catalog.i18nc("@option:radio", "Anonymous crash reports") + enabled: sendEngineCrashCheckbox.checked + checked: boolCheck(UM.Preferences.getValue("info/anonymous_engine_crash_report")) + onClicked: UM.Preferences.setValue("info/anonymous_engine_crash_report", true) + } + } + UM.TooltipArea + { + width: childrenRect.width + height: visible ? childrenRect.height : 0 + visible: Cura.API.account.isLoggedIn + text: catalog.i18nc("@info:tooltip", "Send crash reports with your registered UltiMaker account email adress to UltiMaker. No model data is being send.") + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + Cura.RadioButton + { + id: sendEngineCrashCheckboxUser + text: catalog.i18nc("@option:radio", "Crash reports with email adress") + enabled: sendEngineCrashCheckbox.checked + checked: !boolCheck(UM.Preferences.getValue("info/anonymous_engine_crash_report")) && Cura.API.account.isLoggedIn + onClicked: UM.Preferences.setValue("info/anonymous_engine_crash_report", false) + } + } + UM.TooltipArea { width: childrenRect.width From e91322d0707a44e4687848ce793a619d272c328d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 Jan 2024 08:06:16 +0100 Subject: [PATCH 20/30] ALso enable Sentry for Clipper Contributes to CURA-11482 --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index 3402e4dc54..4aa0b07bbf 100644 --- a/conanfile.py +++ b/conanfile.py @@ -321,6 +321,7 @@ class CuraConan(ConanFile): if self.conf.get("user.curaengine:sentry_url", "", check_type=str) != "": self.options["curaengine"].enable_sentry = True self.options["arcus"].enable_sentry = True + self.options["clipper"].enable_sentry = True def validate(self): version = self.conf.get("user.cura:version", default = self.version, check_type = str) From 773805963169eee52b6c4b0abb4d8d789a22f8ba Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 Jan 2024 10:44:43 +0100 Subject: [PATCH 21/30] Add optional (opt-in) project_name to Sentry Needed for automatic Issue handling in the future Contributes to CURA-11482 --- plugins/CuraEngineBackend/Cura.proto | 1 + plugins/CuraEngineBackend/StartSliceJob.py | 5 +++++ resources/qml/Preferences/GeneralPage.qml | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/Cura.proto b/plugins/CuraEngineBackend/Cura.proto index 9593b83528..b03298f695 100644 --- a/plugins/CuraEngineBackend/Cura.proto +++ b/plugins/CuraEngineBackend/Cura.proto @@ -35,6 +35,7 @@ message Slice repeated EnginePlugin engine_plugins = 5; string sentry_id = 6; // The anonymized Sentry user id that requested the slice string cura_version = 7; // The version of Cura that requested the slice + optional string project_name = 8; // The name of the project that requested the slice } message Extruder diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 935eb81afa..8826d2e1f6 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -340,6 +340,11 @@ class StartSliceJob(Job): self._slice_message.sentry_id = f"{user_id}" self._slice_message.cura_version = CuraVersion + # Add the project name to the message if the user allows for non-anonymous crash data collection. + account = CuraApplication.getInstance().getCuraAPI().account + if account and account.isLoggedIn and not CuraApplication.getInstance().getPreferences().getValue("info/anonymous_engine_crash_report"): + self._slice_message.project_name = CuraApplication.getInstance().getPrintInformation().baseName + # Build messages for extruder stacks for extruder_stack in global_stack.extruderList: self._buildExtruderMessage(extruder_stack) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 708cc4a441..e540fc1b1f 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -906,13 +906,13 @@ UM.PreferencesPage width: childrenRect.width height: visible ? childrenRect.height : 0 visible: Cura.API.account.isLoggedIn - text: catalog.i18nc("@info:tooltip", "Send crash reports with your registered UltiMaker account email adress to UltiMaker. No model data is being send.") + text: catalog.i18nc("@info:tooltip", "Send crash reports with your registered UltiMaker account name and the project name to UltiMaker Sentry. No actual model data is being send.") anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width Cura.RadioButton { id: sendEngineCrashCheckboxUser - text: catalog.i18nc("@option:radio", "Crash reports with email adress") + text: catalog.i18nc("@option:radio", "Send crash reports with UltiMaker account name") enabled: sendEngineCrashCheckbox.checked checked: !boolCheck(UM.Preferences.getValue("info/anonymous_engine_crash_report")) && Cura.API.account.isLoggedIn onClicked: UM.Preferences.setValue("info/anonymous_engine_crash_report", false) From fe440a664350441c0d3f9aa8d3a635a16667deac Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 15 Jan 2024 11:52:11 +0100 Subject: [PATCH 22/30] Allow for expressions in start/end machine/extruder code extruder_nr field CURA-11536 --- plugins/CuraEngineBackend/StartSliceJob.py | 49 ++++++++++++---------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 935eb81afa..fda1542e0a 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 UltiMaker +# Copyright (c) 2024 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import uuid @@ -63,13 +63,12 @@ class GcodeStartEndFormatter(Formatter): # will be used. Alternatively, if the expression is formatted as "{[expression], [extruder_nr]}", # then the expression will be evaluated with the extruder stack of the specified extruder_nr. - _extruder_regex = re.compile(r"^\s*(?P.*)\s*,\s*(?P\d+)\s*$") + _extruder_regex = re.compile(r"^\s*(?P.*)\s*,\s*(?P.*)\s*$") - def __init__(self, default_extruder_nr: int = -1, *, - additional_per_extruder_settings: Optional[Dict[str, Dict[str, any]]] = None) -> None: + def __init__(self, all_extruder_settings: Dict[str, Any], default_extruder_nr: int = -1) -> None: super().__init__() + self._all_extruder_settings: Dict[str, Any] = all_extruder_settings self._default_extruder_nr: int = default_extruder_nr - self._additional_per_extruder_settings: Optional[Dict[str, Dict[str, any]]] = additional_per_extruder_settings def get_field(self, field_name, args: [str], kwargs: dict) -> Tuple[str, str]: # get_field method parses all fields in the format-string and parses them individually to the get_value method. @@ -88,22 +87,31 @@ class GcodeStartEndFormatter(Formatter): if expression in post_slice_data_variables: return f"{{{expression}}}" - extruder_nr = self._default_extruder_nr + extruder_nr = str(self._default_extruder_nr) # The settings may specify a specific extruder to use. This is done by - # formatting the expression as "{expression}, {extruder_nr}". If the + # formatting the expression as "{expression}, {extruder_nr_expr}". If the # expression is formatted like this, we extract the extruder_nr and use # it to get the value from the correct extruder stack. match = self._extruder_regex.match(expression) if match: expression = match.group("expression") - extruder_nr = int(match.group("extruder_nr")) + extruder_nr_expr = match.group("extruder_nr_expr") - if self._additional_per_extruder_settings is not None and str( - extruder_nr) in self._additional_per_extruder_settings: - additional_variables = self._additional_per_extruder_settings[str(extruder_nr)] + if extruder_nr_expr.isdigit(): + extruder_nr = extruder_nr_expr + else: + # We get the value of the extruder_nr_expr from `_all_extruder_settings` dictionary + # rather than the global container stack. The `_all_extruder_settings["-1"]` is a + # dict-representation of the global container stack, with additional properties such + # as `initial_extruder_nr`. As users may enter such expressions we can't use the + # global container stack. + extruder_nr = self._all_extruder_settings["-1"].get(extruder_nr_expr, "-1") + + if extruder_nr in self._all_extruder_settings: + additional_variables = self._all_extruder_settings[extruder_nr] else: - additional_variables = dict() + additional_variables = self._all_extruder_settings["-1"] # Add the arguments and keyword arguments to the additional settings. These # are currently _not_ used, but they are added for consistency with the @@ -113,7 +121,7 @@ class GcodeStartEndFormatter(Formatter): for key, value in kwargs.items(): additional_variables[key] = value - if extruder_nr == -1: + if extruder_nr == "-1": container_stack = CuraApplication.getInstance().getGlobalContainerStack() else: container_stack = ExtruderManager.getInstance().getExtruderStack(extruder_nr) @@ -121,7 +129,6 @@ class GcodeStartEndFormatter(Formatter): setting_function = SettingFunction(expression) value = setting_function(container_stack, additional_variables=additional_variables) - return value @@ -131,12 +138,13 @@ class StartSliceJob(Job): def __init__(self, slice_message: Arcus.PythonMessage) -> None: super().__init__() - self._scene = CuraApplication.getInstance().getController().getScene() #type: Scene + self._scene: Scene = CuraApplication.getInstance().getController().getScene() self._slice_message: Arcus.PythonMessage = slice_message - self._is_cancelled = False #type: bool - self._build_plate_number = None #type: Optional[int] + self._is_cancelled: bool = False + self._build_plate_number: Optional[int] = None - self._all_extruders_settings = None #type: Optional[Dict[str, Any]] # cache for all setting values from all stacks (global & extruder) for the current machine + # cache for all setting values from all stacks (global & extruder) for the current machine + self._all_extruders_settings: Optional[Dict[str, Any]] = None def getSliceMessage(self) -> Arcus.PythonMessage: return self._slice_message @@ -471,10 +479,7 @@ class StartSliceJob(Job): # Get "replacement-keys" for the extruders. In the formatter the settings stack is used to get the # replacement values for the setting-keys. However, the values for `material_id`, `material_type`, # etc are not in the settings stack. - additional_per_extruder_settings = self._all_extruders_settings.copy() - additional_per_extruder_settings["default_extruder_nr"] = default_extruder_nr - fmt = GcodeStartEndFormatter(default_extruder_nr=default_extruder_nr, - additional_per_extruder_settings=additional_per_extruder_settings) + fmt = GcodeStartEndFormatter(self._all_extruders_settings, default_extruder_nr=default_extruder_nr) return str(fmt.format(value)) except: Logger.logException("w", "Unable to do token replacement on start/end g-code") From 5da4dfcb705b519ded069245fd0cf5bfbaf0f244 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 15 Jan 2024 12:03:42 +0100 Subject: [PATCH 23/30] Improve unhappy flow CURA-11536 --- plugins/CuraEngineBackend/StartSliceJob.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index fda1542e0a..04345bf747 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -111,6 +111,7 @@ class GcodeStartEndFormatter(Formatter): if extruder_nr in self._all_extruder_settings: additional_variables = self._all_extruder_settings[extruder_nr] else: + Logger.warning(f"Extruder {extruder_nr} does not exist, using global settings") additional_variables = self._all_extruder_settings["-1"] # Add the arguments and keyword arguments to the additional settings. These @@ -125,6 +126,9 @@ class GcodeStartEndFormatter(Formatter): container_stack = CuraApplication.getInstance().getGlobalContainerStack() else: container_stack = ExtruderManager.getInstance().getExtruderStack(extruder_nr) + if not container_stack: + Logger.warning(f"Extruder {extruder_nr} does not exist, using global settings") + container_stack = CuraApplication.getInstance().getGlobalContainerStack() setting_function = SettingFunction(expression) value = setting_function(container_stack, additional_variables=additional_variables) From 68152e6f3111a17d8d5c17d4e353db01b1a8d65d Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 15 Jan 2024 12:04:55 +0100 Subject: [PATCH 24/30] Code readability CURA-11482 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index f67d14aafe..a22d6b5306 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -1105,9 +1105,10 @@ class CuraEngineBackend(QObject, Backend): elif preference == "info/send_engine_crash": os.environ["USE_SENTRY"] = "1" if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash") else "0" elif preference == "info/anonymous_engine_crash_report": - account = CuraApplication.getInstance().getCuraAPI().account - if account and account.isLoggedIn and not CuraApplication.getInstance().getPreferences().getValue("info/anonymous_engine_crash_report"): - os.environ["CURAENGINE_SENTRY_USER"] = account.userName + if not CuraApplication.getInstance().getPreferences().getValue("info/anonymous_engine_crash_report"): + account = CuraApplication.getInstance().getCuraAPI().account + if account and account.isLoggedIn: + os.environ["CURAENGINE_SENTRY_USER"] = account.userName def tickle(self) -> None: """Tickle the backend so in case of auto slicing, it starts the timer.""" From 9d78c9ed5860de5b94f4a5c301cd9003edd86132 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 15 Jan 2024 12:39:10 +0100 Subject: [PATCH 25/30] Don't mutate/pollute `_all_extruder_settings` with additional values CURA-11536 --- plugins/CuraEngineBackend/StartSliceJob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 04345bf747..5039e9a3de 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -109,10 +109,10 @@ class GcodeStartEndFormatter(Formatter): extruder_nr = self._all_extruder_settings["-1"].get(extruder_nr_expr, "-1") if extruder_nr in self._all_extruder_settings: - additional_variables = self._all_extruder_settings[extruder_nr] + additional_variables = self._all_extruder_settings[extruder_nr].copy() else: Logger.warning(f"Extruder {extruder_nr} does not exist, using global settings") - additional_variables = self._all_extruder_settings["-1"] + additional_variables = self._all_extruder_settings["-1"].copy() # Add the arguments and keyword arguments to the additional settings. These # are currently _not_ used, but they are added for consistency with the From 557a95568c9f220ae4a23be44fd61e386698ebc7 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 15 Jan 2024 13:42:24 +0100 Subject: [PATCH 26/30] More explicit crash report configuration CURA-11482 --- resources/qml/Preferences/GeneralPage.qml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index e540fc1b1f..8871944523 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -872,7 +872,7 @@ UM.PreferencesPage UM.CheckBox { id: sendEngineCrashCheckbox - text: catalog.i18nc("@option:check","Send (anonymous) engine crash reports") + text: catalog.i18nc("@option:check","Send engine crash reports") checked: boolCheck(UM.Preferences.getValue("info/send_engine_crash")) onCheckedChanged: UM.Preferences.setValue("info/send_engine_crash", checked) } @@ -888,7 +888,6 @@ UM.PreferencesPage { width: childrenRect.width height: visible ? childrenRect.height : 0 - visible: Cura.API.account.isLoggedIn text: catalog.i18nc("@info:tooltip", "Send crash reports without any personally identifiable information or models data to UltiMaker.") anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width @@ -896,7 +895,7 @@ UM.PreferencesPage { id: sendEngineCrashCheckboxAnonymous text: catalog.i18nc("@option:radio", "Anonymous crash reports") - enabled: sendEngineCrashCheckbox.checked + enabled: sendEngineCrashCheckbox.checked && Cura.API.account.isLoggedIn checked: boolCheck(UM.Preferences.getValue("info/anonymous_engine_crash_report")) onClicked: UM.Preferences.setValue("info/anonymous_engine_crash_report", true) } @@ -905,15 +904,16 @@ UM.PreferencesPage { width: childrenRect.width height: visible ? childrenRect.height : 0 - visible: Cura.API.account.isLoggedIn - text: catalog.i18nc("@info:tooltip", "Send crash reports with your registered UltiMaker account name and the project name to UltiMaker Sentry. No actual model data is being send.") + text: Cura.API.account.isLoggedIn ? + catalog.i18nc("@info:tooltip", "Send crash reports with your registered UltiMaker account name and the project name to UltiMaker Sentry. No actual model data is being send.") : + catalog.i18nc("@info:tooltip", "Please sign in to your UltiMaker account to allow sending non-anonymous data.") anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width Cura.RadioButton { id: sendEngineCrashCheckboxUser - text: catalog.i18nc("@option:radio", "Send crash reports with UltiMaker account name") - enabled: sendEngineCrashCheckbox.checked + text: catalog.i18nc("@option:radio", "Include UltiMaker account name") + enabled: sendEngineCrashCheckbox.checked && Cura.API.account.isLoggedIn checked: !boolCheck(UM.Preferences.getValue("info/anonymous_engine_crash_report")) && Cura.API.account.isLoggedIn onClicked: UM.Preferences.setValue("info/anonymous_engine_crash_report", false) } From ab322ae703024026e80dd4d9857dd95705184a80 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 15 Jan 2024 15:22:25 +0100 Subject: [PATCH 27/30] Always send user name for Sentry if available CURA-11482 --- plugins/CuraEngineBackend/Cura.proto | 1 + plugins/CuraEngineBackend/CuraEngineBackend.py | 6 ------ plugins/CuraEngineBackend/StartSliceJob.py | 1 + 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/CuraEngineBackend/Cura.proto b/plugins/CuraEngineBackend/Cura.proto index b03298f695..238829ba64 100644 --- a/plugins/CuraEngineBackend/Cura.proto +++ b/plugins/CuraEngineBackend/Cura.proto @@ -36,6 +36,7 @@ message Slice string sentry_id = 6; // The anonymized Sentry user id that requested the slice string cura_version = 7; // The version of Cura that requested the slice optional string project_name = 8; // The name of the project that requested the slice + optional string user_name = 9; // The Digital Factory account name of the user that requested the slice } message Extruder diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index a22d6b5306..0c4003fadc 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -199,7 +199,6 @@ class CuraEngineBackend(QObject, Backend): # Ensure that the initial value for send_engine_crash is handled correctly. application.callLater(self._onPreferencesChanged, "info/send_engine_crash") - application.callLater(self._onPreferencesChanged, "info/anonymous_engine_crash_report") def startPlugins(self) -> None: """ @@ -1104,11 +1103,6 @@ class CuraEngineBackend(QObject, Backend): self._change_timer.start() elif preference == "info/send_engine_crash": os.environ["USE_SENTRY"] = "1" if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash") else "0" - elif preference == "info/anonymous_engine_crash_report": - if not CuraApplication.getInstance().getPreferences().getValue("info/anonymous_engine_crash_report"): - account = CuraApplication.getInstance().getCuraAPI().account - if account and account.isLoggedIn: - os.environ["CURAENGINE_SENTRY_USER"] = account.userName def tickle(self) -> None: """Tickle the backend so in case of auto slicing, it starts the timer.""" diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 8826d2e1f6..633352d616 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -344,6 +344,7 @@ class StartSliceJob(Job): account = CuraApplication.getInstance().getCuraAPI().account if account and account.isLoggedIn and not CuraApplication.getInstance().getPreferences().getValue("info/anonymous_engine_crash_report"): self._slice_message.project_name = CuraApplication.getInstance().getPrintInformation().baseName + self._slice_message.user_name = account.userName # Build messages for extruder stacks for extruder_stack in global_stack.extruderList: From 1a57f121729a153902c0485d66a400298851fbeb Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 16 Jan 2024 10:01:26 +0100 Subject: [PATCH 28/30] change label to name to align with items in global_container_stack check --- cura/Machines/Models/ExtrudersModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/ExtrudersModel.py b/cura/Machines/Models/ExtrudersModel.py index 2677894bff..f31f7c8717 100644 --- a/cura/Machines/Models/ExtrudersModel.py +++ b/cura/Machines/Models/ExtrudersModel.py @@ -227,7 +227,7 @@ class ExtrudersModel(ListModel): "material_brand": "", "color_name": "", "material_type": "", - "material_label": "" + "material_name": "" } items.append(item) if self._items != items: From 54df08f47fa30a4462317ca40d8328a5649491af Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 16 Jan 2024 13:14:49 +0100 Subject: [PATCH 29/30] Fix specific extruder not being used CURA-11536 --- 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 5039e9a3de..6ede9fa219 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -106,7 +106,7 @@ class GcodeStartEndFormatter(Formatter): # dict-representation of the global container stack, with additional properties such # as `initial_extruder_nr`. As users may enter such expressions we can't use the # global container stack. - extruder_nr = self._all_extruder_settings["-1"].get(extruder_nr_expr, "-1") + extruder_nr = str(self._all_extruder_settings["-1"].get(extruder_nr_expr, "-1")) if extruder_nr in self._all_extruder_settings: additional_variables = self._all_extruder_settings[extruder_nr].copy() From 1514d755b0c9ccf474c374080557d81c81d3ef0d Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 17 Jan 2024 11:03:32 +0100 Subject: [PATCH 30/30] Set proper dependancies versions --- conandata.yml | 3 +-- conanfile.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/conandata.yml b/conandata.yml index a3456c44b1..9b0e2e337b 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,12 +1,11 @@ version: "5.7.0-alpha.0" requirements: - "uranium/(latest)@ultimaker/testing" - - "curaengine/(latest)@ultimaker/cura_11482" + - "curaengine/(latest)@ultimaker/testing" - "cura_binary_data/(latest)@ultimaker/testing" - "fdm_materials/(latest)@ultimaker/testing" - "curaengine_plugin_gradual_flow/(latest)@ultimaker/stable" - "dulcificum/latest@ultimaker/testing" - - "arcus/(latest)@ultimaker/cura_11482" - "pysavitar/5.3.0" - "pynest2d/5.3.0" - "curaengine_grpc_definitions/(latest)@ultimaker/testing" diff --git a/conanfile.py b/conanfile.py index 4aa0b07bbf..ca8427ad70 100644 --- a/conanfile.py +++ b/conanfile.py @@ -337,7 +337,7 @@ class CuraConan(ConanFile): for req in self.conan_data["requirements_internal"]: self.requires(req) self.requires("cpython/3.10.4@ultimaker/stable") - self.requires("clipper/6.4.2@ultimaker/cura_11482") # TODO: change channel to `testing` once merged + self.requires("clipper/6.4.2@ultimaker/stable") self.requires("openssl/3.2.0") self.requires("boost/1.82.0") self.requires("spdlog/1.12.0")