From de45d25f0bd8c1711df6021581c2f2acd8a63438 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 20 Oct 2016 14:01:20 +0200 Subject: [PATCH 01/12] Update material profiles for ABS This is a weekly update from Tom. --- .../um3_aa0.4_ABS_Draft_Print.inst.cfg | 30 ++++++++--------- .../um3_aa0.4_ABS_Fast_Print.inst.cfg | 32 +++++++++---------- .../um3_aa0.4_ABS_High_Quality.inst.cfg | 32 +++++++++---------- .../um3_aa0.4_ABS_Normal_Quality.inst.cfg | 32 +++++++++---------- 4 files changed, 63 insertions(+), 63 deletions(-) diff --git a/resources/quality/ultimaker3/um3_aa0.4_ABS_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_ABS_Draft_Print.inst.cfg index 13202adff1..4fcedc258a 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_ABS_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_ABS_Draft_Print.inst.cfg @@ -25,7 +25,7 @@ acceleration_wall_x = =acceleration_wall adhesion_type = brim brim_width = 7 cool_fan_full_at_height = =layer_height_0 + 4 * layer_height -cool_fan_speed = 50 +cool_fan_speed = 5 cool_fan_speed_max = 100 cool_min_layer_time = 5 cool_min_speed = 5 @@ -95,20 +95,20 @@ travel_compensate_overlapping_walls_enabled = True wall_0_inset = 0 wall_line_width_x = =round(line_width * 0.3 / 0.35, 2) wall_thickness = 1 -support_line_width = =line_width -support_pattern = zigzag -support_infill_rate = 15 -support_join_distance = 2 -support_offset = 0.2 -support_interface_enable = False -support_use_towers = True -raft_margin = 15 -raft_airgap = 0.3 -raft_surface_layers = 2 -raft_surface_thickness = =resolveOrValue('layer_height') -raft_interface_thickness = =resolveOrValue('layer_height') * 1.5 -raft_interface_line_width = =line_width * 2 -raft_interface_line_spacing = =raft_interface_line_width + 0.2 +support_line_width = =line_width +support_pattern = zigzag +support_infill_rate = 15 +support_join_distance = 2 +support_offset = 0.2 +support_interface_enable = False +support_use_towers = True +raft_margin = 15 +raft_airgap = 0.3 +raft_surface_layers = 2 +raft_surface_thickness = =resolveOrValue('layer_height') +raft_interface_thickness = =resolveOrValue('layer_height') * 1.5 +raft_interface_line_width = =line_width * 2 +raft_interface_line_spacing = =raft_interface_line_width + 0.2 support_bottom_height = =extruderValue(support_interface_extruder_nr, 'support_interface_height') retraction_amount = 6.5 diff --git a/resources/quality/ultimaker3/um3_aa0.4_ABS_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_ABS_Fast_Print.inst.cfg index 36ebf401ee..ef4122439d 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_ABS_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_ABS_Fast_Print.inst.cfg @@ -25,7 +25,7 @@ acceleration_wall_x = =acceleration_wall adhesion_type = brim brim_width = 7 cool_fan_full_at_height = =layer_height_0 + 4 * layer_height -cool_fan_speed = 50 +cool_fan_speed = 5 cool_fan_speed_max = 100 cool_min_layer_time = 5 cool_min_speed = 7 @@ -95,21 +95,21 @@ travel_compensate_overlapping_walls_enabled = True wall_0_inset = 0 wall_line_width_x = =round(line_width * 0.3 / 0.35, 2) wall_thickness = 1.3 -support_line_width = =line_width -support_pattern = zigzag -support_infill_rate = 15 -support_join_distance = 2 -support_offset = 0.2 -support_interface_enable = False -support_use_towers = True -raft_margin = 15 -raft_airgap = 0.3 -raft_surface_layers = 2 -raft_surface_thickness = =resolveOrValue('layer_height') -raft_interface_thickness = =resolveOrValue('layer_height') * 1.5 -raft_interface_line_width = =line_width * 2 -raft_interface_line_spacing = =raft_interface_line_width + 0.2 -support_bottom_height = =extruderValue(support_interface_extruder_nr, 'support_interface_height') +support_line_width = =line_width +support_pattern = zigzag +support_infill_rate = 15 +support_join_distance = 2 +support_offset = 0.2 +support_interface_enable = False +support_use_towers = True +raft_margin = 15 +raft_airgap = 0.3 +raft_surface_layers = 2 +raft_surface_thickness = =resolveOrValue('layer_height') +raft_interface_thickness = =resolveOrValue('layer_height') * 1.5 +raft_interface_line_width = =line_width * 2 +raft_interface_line_spacing = =raft_interface_line_width + 0.2 +support_bottom_height = =extruderValue(support_interface_extruder_nr, 'support_interface_height') retraction_amount = 6.5 cool_min_layer_time_fan_speed_max = 10 diff --git a/resources/quality/ultimaker3/um3_aa0.4_ABS_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_ABS_High_Quality.inst.cfg index b9d0c343c2..8e4b7ea767 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_ABS_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_ABS_High_Quality.inst.cfg @@ -25,7 +25,7 @@ acceleration_wall_x = =acceleration_wall adhesion_type = brim brim_width = 7 cool_fan_full_at_height = =layer_height_0 + 4 * layer_height -cool_fan_speed = 50 +cool_fan_speed = 5 cool_fan_speed_max = 100 cool_min_layer_time = 5 cool_min_speed = 12 @@ -95,21 +95,21 @@ travel_compensate_overlapping_walls_enabled = True wall_0_inset = 0 wall_line_width_x = =round(line_width * 0.3 / 0.35, 2) wall_thickness = 1.3 -support_line_width = =line_width -support_pattern = zigzag -support_infill_rate = 15 -support_join_distance = 2 -support_offset = 0.2 -support_interface_enable = False -support_use_towers = True -raft_margin = 15 -raft_airgap = 0.3 -raft_surface_layers = 2 -raft_surface_thickness = =resolveOrValue('layer_height') -raft_interface_thickness = =resolveOrValue('layer_height') * 1.5 -raft_interface_line_width = =line_width * 2 -raft_interface_line_spacing = =raft_interface_line_width + 0.2 -support_bottom_height = =extruderValue(support_interface_extruder_nr, 'support_interface_height') +support_line_width = =line_width +support_pattern = zigzag +support_infill_rate = 15 +support_join_distance = 2 +support_offset = 0.2 +support_interface_enable = False +support_use_towers = True +raft_margin = 15 +raft_airgap = 0.3 +raft_surface_layers = 2 +raft_surface_thickness = =resolveOrValue('layer_height') +raft_interface_thickness = =resolveOrValue('layer_height') * 1.5 +raft_interface_line_width = =line_width * 2 +raft_interface_line_spacing = =raft_interface_line_width + 0.2 +support_bottom_height = =extruderValue(support_interface_extruder_nr, 'support_interface_height') retraction_amount = 6.5 cool_min_layer_time_fan_speed_max = 10 diff --git a/resources/quality/ultimaker3/um3_aa0.4_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_ABS_Normal_Quality.inst.cfg index cdefcf71d6..7e17443c2b 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_ABS_Normal_Quality.inst.cfg @@ -25,7 +25,7 @@ acceleration_wall_x = =acceleration_wall adhesion_type = brim brim_width = 7 cool_fan_full_at_height = =layer_height_0 + 4 * layer_height -cool_fan_speed = 50 +cool_fan_speed = 5 cool_fan_speed_max = 100 cool_min_layer_time = 5 cool_min_speed = 5 @@ -95,21 +95,21 @@ travel_compensate_overlapping_walls_enabled = True wall_0_inset = 0 wall_line_width_x = =round(line_width * 0.3 / 0.35, 2) wall_thickness = 1.3 -support_line_width = =line_width -support_pattern = zigzag -support_infill_rate = 15 -support_join_distance = 2 -support_offset = 0.2 -support_interface_enable = False -support_use_towers = True -raft_margin = 15 -raft_airgap = 0.3 -raft_surface_layers = 2 -raft_surface_thickness = =resolveOrValue('layer_height') -raft_interface_thickness = =resolveOrValue('layer_height') * 1.5 -raft_interface_line_width = =line_width * 2 -raft_interface_line_spacing = =raft_interface_line_width + 0.2 -support_bottom_height = =extruderValue(support_interface_extruder_nr, 'support_interface_height') +support_line_width = =line_width +support_pattern = zigzag +support_infill_rate = 15 +support_join_distance = 2 +support_offset = 0.2 +support_interface_enable = False +support_use_towers = True +raft_margin = 15 +raft_airgap = 0.3 +raft_surface_layers = 2 +raft_surface_thickness = =resolveOrValue('layer_height') +raft_interface_thickness = =resolveOrValue('layer_height') * 1.5 +raft_interface_line_width = =line_width * 2 +raft_interface_line_spacing = =raft_interface_line_width + 0.2 +support_bottom_height = =extruderValue(support_interface_extruder_nr, 'support_interface_height') retraction_amount = 6.5 cool_min_layer_time_fan_speed_max = 10 From 021023a932b50720529391e2b5297064f364bf43 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 20 Oct 2016 17:14:45 +0200 Subject: [PATCH 02/12] Add property to get the current profile's layer height This will then be displayed in the profile selection menu. Contributes to issue CURA-2723. --- cura/Settings/MachineManager.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 08d1bff0e9..5176c4342b 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -474,6 +474,26 @@ class MachineManager(QObject): return result + ## Gets the layer height of the currently active quality profile. + # + # This is indicated together with the name of the active quality profile. + # + # \return The layer height of the currently active quality profile. + @pyqtProperty(float, notify=activeQualityChanged) + def activeQualityLayerHeight(self): + if not self._global_container_stack: + return 0 + + quality = self._global_container_stack.findContainer({"type": "quality_changes"}) + if quality and quality.hasProperty("layer_height", "value"): + print(quality.getProperty("layer_height", "value")) + return quality.getProperty("layer_height", "value") + quality = self._global_container_stack.findContainer({"type": "quality"}) + if quality and quality.hasProperty("layer_height", "value"): #This depends on layer_height always being present in the quality. + #If it isn't, there is no way we can find the layer_height while excluding any layer_height in the user profile. + return quality.getProperty("layer_height", "value") + return 0 + ## Get the Material ID associated with the currently active material # \returns MaterialID (string) if found, empty string otherwise @pyqtProperty(str, notify=activeQualityChanged) From 57b02753846afe8b9b36bdb7881f7a174876af75 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 20 Oct 2016 17:16:06 +0200 Subject: [PATCH 03/12] Show layer height in profile selection menu It's shown in the 'inactive' font colour, which isn't entirely semantically correct but has the behaviour we want regardless of how the theme changes in the future. Contributes to issue CURA-2723. --- resources/qml/SidebarHeader.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 20ee5f66cd..b8ae3933a4 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -285,7 +285,16 @@ Column ToolButton { id: globalProfileSelection - text: Cura.MachineManager.activeQualityName + text: { + var result = Cura.MachineManager.activeQualityName; + if (Cura.MachineManager.activeQualityLayerHeight > 0) { + result += " "; + result += " - "; + result += Cura.MachineManager.activeQualityLayerHeight + "mm"; + result += ""; + } + return result; + } enabled: !extrudersList.visible || base.currentExtruderIndex > -1 width: parent.width * 0.55 + UM.Theme.getSize("default_margin").width From 16491d8d23fbcc0595dc4c26b53e51327a890d25 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Oct 2016 11:51:10 +0200 Subject: [PATCH 04/12] Robustly get layer height even if quality has none If the quality profile doesn't define a layer height (which it currently always has) then this should still get the proper layer height. It proceeds properly down the stack now. Contributes to issue CURA-2737. --- cura/Settings/MachineManager.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 5176c4342b..8018ae7fd7 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -478,21 +478,27 @@ class MachineManager(QObject): # # This is indicated together with the name of the active quality profile. # - # \return The layer height of the currently active quality profile. + # \return The layer height of the currently active quality profile. If + # there is no quality profile, this returns 0. @pyqtProperty(float, notify=activeQualityChanged) def activeQualityLayerHeight(self): if not self._global_container_stack: return 0 - quality = self._global_container_stack.findContainer({"type": "quality_changes"}) - if quality and quality.hasProperty("layer_height", "value"): - print(quality.getProperty("layer_height", "value")) - return quality.getProperty("layer_height", "value") + quality_changes = self._global_container_stack.findContainer({"type": "quality_changes"}) + if quality_changes: + value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = quality_changes.getId()) + if isinstance(value, UM.Settings.SettingFunction): + value = value(self._global_container_stack) + return value quality = self._global_container_stack.findContainer({"type": "quality"}) - if quality and quality.hasProperty("layer_height", "value"): #This depends on layer_height always being present in the quality. - #If it isn't, there is no way we can find the layer_height while excluding any layer_height in the user profile. - return quality.getProperty("layer_height", "value") - return 0 + if quality: + value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = quality.getId()) + if isinstance(value, UM.Settings.SettingFunction): + value = value(self._global_container_stack) + return value + + return 0 #No quality profile. ## Get the Material ID associated with the currently active material # \returns MaterialID (string) if found, empty string otherwise From afd3dd6eec08fb15fe0be1dcd7a828a3e247365a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Oct 2016 13:06:49 +0200 Subject: [PATCH 05/12] Make separate theme colour for detail text I would use the normal font colour with a lower alpha value here, but it seems that rendering text with transparency doesn't work in Qt. Contributes to issue CURA-2737. --- resources/qml/SidebarHeader.qml | 2 +- resources/themes/cura/theme.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index b8ae3933a4..16c6a6a8ce 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -288,7 +288,7 @@ Column text: { var result = Cura.MachineManager.activeQualityName; if (Cura.MachineManager.activeQualityLayerHeight > 0) { - result += " "; + result += " "; result += " - "; result += Cura.MachineManager.activeQualityLayerHeight + "mm"; result += ""; diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index f90467c9e8..a29aefa143 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -52,6 +52,7 @@ "secondary": [245, 245, 245, 255], "text": [24, 41, 77, 255], + "text_detail": [174, 174, 174, 128], "text_link": [12, 169, 227, 255], "text_inactive": [174, 174, 174, 255], "text_hover": [70, 84, 113, 255], From e02284b1f06068c321e7dcf10856b82524c4c2bb Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Oct 2016 13:11:08 +0200 Subject: [PATCH 06/12] Expose determineQualityAndQualityChangesForQualityType It is needed to get the quality belonging to a certain quality changes ID that is not on the global stack. We already had this function that does just that. Contributes to issue CURA-2737. --- cura/Settings/MachineManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 8018ae7fd7..326a011562 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -713,7 +713,7 @@ class MachineManager(QObject): # Get quality container and optionally the quality_changes container. if container_type == "quality": - new_quality_settings_list = self._determineQualityAndQualityChangesForQualityType(quality_type) + new_quality_settings_list = self.determineQualityAndQualityChangesForQualityType(quality_type) elif container_type == "quality_changes": new_quality_settings_list = self._determineQualityAndQualityChangesForQualityChanges(quality_name) else: @@ -749,7 +749,7 @@ class MachineManager(QObject): # # \param quality_name \type{str} the name of the quality. # \return \type{List[Dict]} with keys "stack", "quality" and "quality_changes". - def _determineQualityAndQualityChangesForQualityType(self, quality_type): + def determineQualityAndQualityChangesForQualityType(self, quality_type): quality_manager = QualityManager.getInstance() result = [] empty_quality_changes = self._empty_quality_changes_container From c92ccee1e43ca12f256b8086394efa333854ca74 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Oct 2016 13:59:23 +0200 Subject: [PATCH 07/12] Add layer height role to profiles model This layer height computation is rather complex, but because the items are now computed in a separate function, we can safely overwrite that and the update is made only once in the UI. Contributes to issue CURA-2737. --- cura/Settings/ProfilesModel.py | 56 ++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/cura/Settings/ProfilesModel.py b/cura/Settings/ProfilesModel.py index 0f7c8c1ae7..c84b7d3b87 100644 --- a/cura/Settings/ProfilesModel.py +++ b/cura/Settings/ProfilesModel.py @@ -1,18 +1,23 @@ # Copyright (c) 2016 Ultimaker B.V. -# Uranium is released under the terms of the AGPLv3 or higher. +# Cura is released under the terms of the AGPLv3 or higher. + +from PyQt5.QtCore import Qt from UM.Application import Application +from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.Models.InstanceContainersModel import InstanceContainersModel from cura.QualityManager import QualityManager from cura.Settings.ExtruderManager import ExtruderManager -from cura.Settings.MachineManager import MachineManager ## QML Model for listing the current list of valid quality profiles. # class ProfilesModel(InstanceContainersModel): + LayerHeightRole = Qt.UserRole + 1001 + def __init__(self, parent = None): super().__init__(parent) + self.addRoleName(self.LayerHeightRole, "layer_height") Application.getInstance().globalContainerStackChanged.connect(self._update) @@ -40,3 +45,50 @@ class ProfilesModel(InstanceContainersModel): # The actual list of quality profiles come from the first extruder in the extruder list. return QualityManager.getInstance().findAllUsableQualitiesForMachineAndExtruders(global_container_stack, extruder_stacks) + + ## Re-computes the items in this model, and adds the layer height role. + def _recomputeItems(self): + #Some globals that we can re-use. + global_container_stack = Application.getInstance().getGlobalContainerStack() + if global_container_stack is None: + return + container_registry = ContainerRegistry.getInstance() + machine_manager = Application.getInstance().getMachineManager() + + for item in super()._recomputeItems(): + profile = container_registry.findContainers(id = item["id"]) + if not profile: + item["layer_height"] = "" #Can't update a profile that is unknown. + yield item + continue + + #Easy case: This profile defines its own layer height. + profile = profile[0] + if profile.hasProperty("layer_height", "value"): + item["layer_height"] = str(profile.getProperty("layer_height", "value")) + "mm" + yield item + continue + + #Quality-changes profile that has no value for layer height. Get the corresponding quality profile and ask that profile. + quality_type = profile.getMetaDataEntry("quality_type", None) + if quality_type: + quality_results = machine_manager.determineQualityAndQualityChangesForQualityType(quality_type) + for quality_result in quality_results: + if quality_result["stack"] is global_container_stack: + quality = quality_result["quality"] + break + else: #No global container stack in the results: + quality = quality_results[0]["quality"] #Take any of the extruders. + if quality and quality.hasProperty("layer_height", "value"): + item["layer_height"] = str(quality.getProperty("layer_height", "value")) + "mm" + yield item + continue + + #Quality has no value for layer height either. Get the layer height from somewhere lower in the stack. + skip_until_container = global_container_stack.findContainer({"type": "material"}) + if not skip_until_container: #No material in stack. + skip_until_container = global_container_stack.findContainer({"type": "variant"}) + if not skip_until_container: #No variant in stack. + skip_until_container = global_container_stack.getBottom() + item["layer_height"] = str(global_container_stack.getRawProperty("layer_height", "value", skip_until_container = skip_until_container.getId())) + "mm" #Fall through to the currently loaded material. + yield item \ No newline at end of file From 19678c1126749201a8f57ac3d247297ed32a61b0 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Oct 2016 14:00:43 +0200 Subject: [PATCH 08/12] Display layer height after profile name in drop-down There is no styling in this drop-down, as it is provided by the OS. Just a dash and the layer height will do. Contributes to issue CURA-2737. --- resources/qml/Menus/ProfileMenu.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Menus/ProfileMenu.qml b/resources/qml/Menus/ProfileMenu.qml index 0b2c7a5ae2..4fa7a0d3c5 100644 --- a/resources/qml/Menus/ProfileMenu.qml +++ b/resources/qml/Menus/ProfileMenu.qml @@ -17,7 +17,7 @@ Menu MenuItem { - text: model.name + text: model.name + " - " + model.layer_height checkable: true checked: Cura.MachineManager.activeQualityChangesId == "empty_quality_changes" && Cura.MachineManager.activeQualityType == model.metadata.quality_type exclusiveGroup: group @@ -40,7 +40,7 @@ Menu MenuItem { - text: model.name + text: model.name + " - " + model.layer_height checkable: true checked: Cura.MachineManager.globalQualityId == model.id exclusiveGroup: group From 58dba9bcb319069a4da4fb6ebc7833d4ee1bc77d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Oct 2016 14:03:28 +0200 Subject: [PATCH 09/12] Dynamically get unit of layer height If the unit of layer height would become something else than mm eventually, it'll still be correct here. Contributes to issue CURA-2737. --- cura/Settings/ProfilesModel.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cura/Settings/ProfilesModel.py b/cura/Settings/ProfilesModel.py index c84b7d3b87..6f17349edd 100644 --- a/cura/Settings/ProfilesModel.py +++ b/cura/Settings/ProfilesModel.py @@ -55,6 +55,8 @@ class ProfilesModel(InstanceContainersModel): container_registry = ContainerRegistry.getInstance() machine_manager = Application.getInstance().getMachineManager() + unit = global_container_stack.getBottom().getProperty("layer_height", "unit") + for item in super()._recomputeItems(): profile = container_registry.findContainers(id = item["id"]) if not profile: @@ -65,7 +67,7 @@ class ProfilesModel(InstanceContainersModel): #Easy case: This profile defines its own layer height. profile = profile[0] if profile.hasProperty("layer_height", "value"): - item["layer_height"] = str(profile.getProperty("layer_height", "value")) + "mm" + item["layer_height"] = str(profile.getProperty("layer_height", "value")) + unit yield item continue @@ -80,7 +82,7 @@ class ProfilesModel(InstanceContainersModel): else: #No global container stack in the results: quality = quality_results[0]["quality"] #Take any of the extruders. if quality and quality.hasProperty("layer_height", "value"): - item["layer_height"] = str(quality.getProperty("layer_height", "value")) + "mm" + item["layer_height"] = str(quality.getProperty("layer_height", "value")) + unit yield item continue @@ -90,5 +92,5 @@ class ProfilesModel(InstanceContainersModel): skip_until_container = global_container_stack.findContainer({"type": "variant"}) if not skip_until_container: #No variant in stack. skip_until_container = global_container_stack.getBottom() - item["layer_height"] = str(global_container_stack.getRawProperty("layer_height", "value", skip_until_container = skip_until_container.getId())) + "mm" #Fall through to the currently loaded material. + item["layer_height"] = str(global_container_stack.getRawProperty("layer_height", "value", skip_until_container = skip_until_container.getId())) + unit #Fall through to the currently loaded material. yield item \ No newline at end of file From 9c4f8ab8fb321494c1afb6b94c8832763ad99994 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Oct 2016 14:59:41 +0200 Subject: [PATCH 10/12] Update change log This is what we have for 2.3.1 so far. Contributes to issue CURA-2755. --- plugins/ChangeLogPlugin/ChangeLog.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index 8452399346..9504ccf04f 100644 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -1,3 +1,13 @@ +[2.3.1] +*Layer Height in Profile Selection +The layer height of each profile is now shown in the profile selection menu. + +*Bug fixes +Upgrading from version 2.1 on OSX works again. +You can import g-code from related machines as profile. +Fixed inheritance taking from the wrong extruder. +Moved z-hop and extruder selection settings to a better category. + [2.3.0] *Speed improvements From 8ee22738bc75353aa9d12f1dcdf8bf41a3881602 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 21 Oct 2016 16:07:03 +0200 Subject: [PATCH 11/12] JSON feat: carve_multiple_volumes (CURA-2712) --- resources/definitions/fdmprinter.def.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index dfca058d4e..54365262f7 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3546,6 +3546,17 @@ "type": "bool", "default_value": false, "settable_per_mesh": true + }, + "carve_multiple_volumes": + { + "label": "Remove Mesh Intersection", + "description": "Remove areas where multiple objecs are overlapping with each other. This is may be used if merged dual material objects overlap with each other.", + "type": "bool", + "default_value": true, + "value": "machine_extruder_count > 1", + "settable_per_mesh": false, + "settable_per_extruder": false, + "settable_per_meshgroup": true } } }, From 2bff94ba9f6c0293b4f6c6a1fd79548422639a4d Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 21 Oct 2016 16:20:39 +0200 Subject: [PATCH 12/12] Revert "JSON feat: carve_multiple_volumes (CURA-2712)" This reverts commit 8ee22738bc75353aa9d12f1dcdf8bf41a3881602. --- resources/definitions/fdmprinter.def.json | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 54365262f7..dfca058d4e 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3546,17 +3546,6 @@ "type": "bool", "default_value": false, "settable_per_mesh": true - }, - "carve_multiple_volumes": - { - "label": "Remove Mesh Intersection", - "description": "Remove areas where multiple objecs are overlapping with each other. This is may be used if merged dual material objects overlap with each other.", - "type": "bool", - "default_value": true, - "value": "machine_extruder_count > 1", - "settable_per_mesh": false, - "settable_per_extruder": false, - "settable_per_meshgroup": true } } },