From 9b67fa94b48a5ed3176d224187d3daff78fdc32c Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 24 May 2017 13:27:11 +0200 Subject: [PATCH 01/10] Add material info button to show Ultimaker.com materials page CURA-3810 Add a new info button for materials. When a user clicks on the button, it will open the materials information page on the Ultimaker website. --- resources/qml/SidebarHeader.qml | 48 ++++++++++++++++++++++++++++++-- resources/themes/cura/styles.qml | 31 +++++++++++++++++++++ resources/themes/cura/theme.json | 11 ++++++-- 3 files changed, 86 insertions(+), 4 deletions(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index e4070c5d43..a388c68323 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -196,16 +196,60 @@ Column } anchors.verticalCenter: parent.verticalCenter - width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width + width: parent.width * 0.30 font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); } + Text + { + width: parent.width * 0.05 + } + + Button + { + id: materialInfoButton + height: parent.height * 0.70 + width: height + anchors.margins: UM.Theme.getSize("default_margin").width + anchors.verticalCenter: parent.verticalCenter + + text: "i" + style: UM.Theme.styles.info_button + + onClicked: + { + // open the material URL with web browser + var url = "https://ultimaker.com/en/resources/23121-materials"; + Qt.openUrlExternally(url); + } + + onHoveredChanged: + { + if (hovered) + { + var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com."); + base.showTooltip( + variantRow, Qt.point(0, variantRow.height / 2), catalog.i18nc("@tooltip", content) + ); + } + else + { + base.hideTooltip(); + } + } + } + + Text + { + width: parent.width * 0.10 - materialInfoButton.width - UM.Theme.getSize("default_margin").width + } + Item { anchors.verticalCenter: parent.verticalCenter - width: parent.width * 0.55 + UM.Theme.getSize("default_margin").width + width: parent.width * 0.50 + UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("setting_control").height ToolButton { diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index ffe866f2c6..b8375ae025 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -8,6 +8,37 @@ import QtQuick.Controls.Styles 1.1 import UM 1.1 as UM QtObject { + property Component info_button: Component { + ButtonStyle { + label: Text { + renderType: Text.NativeRendering + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + font: UM.Theme.getFont("small") + color: UM.Theme.getColor("info_button_text") + text: control.text + } + + background: Rectangle { + implicitHeight: UM.Theme.getSize("info_button").height + implicitWidth: width + border.width: 0 + radius: height * 0.5 + + color: { + if (control.pressed) { + return UM.Theme.getColor("info_button_background_active"); + } else if (control.hovered) { + return UM.Theme.getColor("info_button_background_hover"); + } else { + return UM.Theme.getColor("info_button_background"); + } + } + Behavior on color { ColorAnimation { duration: 50; } } + } + } + } + property Component mode_switch: Component { SwitchStyle { groove: Rectangle { diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 5f0b3656c8..0c0d80fa7c 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -243,7 +243,12 @@ "layerview_support_infill": [0, 255, 255, 255], "layerview_move_combing": [0, 0, 255, 255], "layerview_move_retraction": [128, 128, 255, 255], - "layerview_support_interface": [64, 192, 255, 255] + "layerview_support_interface": [64, 192, 255, 255], + + "info_button_text": [255, 255, 255, 255], + "info_button_background": [127, 127, 127, 255], + "info_button_background_hover": [24, 41, 77, 255], + "info_button_background_active": [70, 84, 113, 255] }, "sizes": { @@ -329,6 +334,8 @@ "infill_button_margin": [0.5, 0.5], - "jobspecs_line": [2.0, 2.0] + "jobspecs_line": [2.0, 2.0], + + "info_button": [0.6, 0.6] } } From 85e875257b34bd69ca1a3e2385889fdd23f6bb82 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 29 May 2017 15:23:49 +0200 Subject: [PATCH 02/10] Use "//" as the material info URL suffix CURA-3810 --- cura/CuraApplication.py | 4 ++++ cura/Settings/MachineManager.py | 6 ++++++ resources/qml/SidebarHeader.qml | 5 ++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index ba42dd2aec..f4290af24b 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1362,3 +1362,7 @@ class CuraApplication(QtApplication): node = node.getParent() Selection.add(node) + + @pyqtSlot(result=str) + def getCuraVersion(self): + return CuraVersion diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 96ccc89ccf..dc05e4fa4d 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -474,6 +474,12 @@ class MachineManager(QObject): def activeMachine(self) -> "GlobalStack": return self._global_container_stack + @pyqtProperty(str, notify = globalContainerChanged) + def activeMachineDefinitionId(self) -> str: + if self._global_container_stack and self._global_container_stack.definition: + return self._global_container_stack.definition.getId() + return "" + @pyqtProperty(str, notify = activeStackChanged) def activeStackId(self) -> str: if self._active_container_stack: diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index a388c68323..f99f6875ae 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -220,7 +220,10 @@ Column onClicked: { // open the material URL with web browser - var url = "https://ultimaker.com/en/resources/23121-materials"; + var version = CuraApplication.getCuraVersion(); + var machineName = Cura.MachineManager.activeMachineDefinitionId; + + var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName; Qt.openUrlExternally(url); } From b01f1bdbb31248ce9660015edc05cdb87eafdd8e Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 29 May 2017 15:14:37 +0200 Subject: [PATCH 03/10] feat: 2.6 beta changelog (CURA-3879) --- plugins/ChangeLogPlugin/ChangeLog.txt | 68 +++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index 508d5ecbe2..9d19d9b9df 100755 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -1,3 +1,71 @@ +[2.6.0] +*Cura versions +Cura 2.6 beta has local version folders, which means the new version won’t overwrite the existing configuration and profiles from older versions, but can create a new folder instead. You can now safely check out new beta versions and, if necessary, start up an older version without the danger of losing your profiles. + +*Better support adhesion +We’ve added extra support settings to allow the creation of improved support profiles with better PVA/PLA adhesion. The Support Interface settings, such as speed and density, are now split up into Support Roof and Support Floor settings. + +*Multi-extrusion support for custom FDM printers +Custom third-party printers and Ultimaker modifications now have multi-extrusion support. + +*Model auto-arrange +We’ve improved placing multiple models or multiplying the same ones, making it easier to arrange your build plate. If there’s not enough build plate space or the model is placed beyond the build plate, you can rectify this by selecting ‘Arrange all models’ in the context menu or by pressing Command+R (MacOS) or Ctrl+R (Windows and Linux). Cura 2.6 beta will then find a better solution for model positioning. + +*Gradual infill +You can now find the Gradual Infill button in Recommended mode. This setting makes the infill concentrated near the top of the model – so that we can save time and material for the lower parts of the model. This functionality is especially useful when printing with flexible materials. + +*Support meshes +It’s now possible to load an extra model that will be used as a support structure. + +*Mold +This is a bit of an experimental improvement. Users can use it to print a mold from a 3D model, which can be cast afterwards with the material that you would like your model to have. + +*Towers for tiny overhangs +We’ve added a new support option allowing users to achieve more reliable results by creating towers to support even the smallest overhangs. + +*Cutting meshes +Easily transform any model into a dual-extrusion print by applying a pattern for the second extruder. All areas of the original model, which also fall inside the pattern model, will be printed by the extruder selected for the pattern. + +*Extruder per model selection via the context menu or extruder buttons +You can now select the necessary extruder in the right-click menu or extruder buttons. This is a quicker and more user-friendly process. The material color for each extruder will also be represented in the extruder icons. + +*Custom toggle +We have made the interface a little bit cleaner and more user-friendly for switching from Recommended to Custom mode. + +*Plugin installer +It used to be fairly tricky to install new plugins. We have now added a button to select and install new plugins with ease – you will find it in Preferences. + +*Project-based menu +It’s a lot simpler to save and open files, and Cura will know if it’s a project, model, or gcode. + +*Theme picker +If you have a custom theme, you can now apply it more easily in the preferences screen. + +*Time estimates per feature +You can hover over the print time estimate in the lower right corner to see how the printing time is divided over the printing features (walls, infill, etc.). + +*Invert the direction of camera zoom +We’ve added an option to invert mouse direction for a better user experience. + +*Olsson block upgrade +Ultimaker 2 users can now specify if they have the Olsson block installed on their machine. + +*OctoPrint plugin +Cura 2.6 beta allows users to send prints to OctoPrint. + +*Bug fixes +- Post Processing plugin +- Font rendering +- Progress bar +- Support Bottom Distance issues + +*3rd party printers +- MAKEIT +- Alya +- Peopoly Moai +- Rigid3D Zero +- 3D maker + [2.5.0] *Improved speed We’ve made changing printers, profiles, materials, and print cores even faster. 3MF processing is also much faster now. Opening a 3MF file now takes one tenth of the time. From 3b62c4a59a21d8deb19b445a2cc9d6e6fce06ea4 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 29 May 2017 16:31:11 +0200 Subject: [PATCH 04/10] fix: changelog attribution to community members (CURA-3879) --- plugins/ChangeLogPlugin/ChangeLog.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index 9d19d9b9df..869dc69f82 100755 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -6,7 +6,7 @@ Cura 2.6 beta has local version folders, which means the new version won’t ove We’ve added extra support settings to allow the creation of improved support profiles with better PVA/PLA adhesion. The Support Interface settings, such as speed and density, are now split up into Support Roof and Support Floor settings. *Multi-extrusion support for custom FDM printers -Custom third-party printers and Ultimaker modifications now have multi-extrusion support. +Custom third-party printers and Ultimaker modifications now have multi-extrusion support. Thanks to Aldo Hoeben for this feature. *Model auto-arrange We’ve improved placing multiple models or multiplying the same ones, making it easier to arrange your build plate. If there’s not enough build plate space or the model is placed beyond the build plate, you can rectify this by selecting ‘Arrange all models’ in the context menu or by pressing Command+R (MacOS) or Ctrl+R (Windows and Linux). Cura 2.6 beta will then find a better solution for model positioning. @@ -42,16 +42,16 @@ It’s a lot simpler to save and open files, and Cura will know if it’s a proj If you have a custom theme, you can now apply it more easily in the preferences screen. *Time estimates per feature -You can hover over the print time estimate in the lower right corner to see how the printing time is divided over the printing features (walls, infill, etc.). +You can hover over the print time estimate in the lower right corner to see how the printing time is divided over the printing features (walls, infill, etc.). Thanks to 14bitVoid for this feature. *Invert the direction of camera zoom We’ve added an option to invert mouse direction for a better user experience. *Olsson block upgrade -Ultimaker 2 users can now specify if they have the Olsson block installed on their machine. +Ultimaker 2 users can now specify if they have the Olsson block installed on their machine. Thanks to Aldo Hoeben for this feature. *OctoPrint plugin -Cura 2.6 beta allows users to send prints to OctoPrint. +Cura 2.6 beta allows users to send prints to OctoPrint. Thanks to Aldo Hoeben for this feature. *Bug fixes - Post Processing plugin From c80e1b67a5a941e09fb34ff1e130f30ee6db1ef2 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 29 May 2017 16:01:32 +0200 Subject: [PATCH 05/10] Only show material info button for multi-extrusion machines CURA-3810 --- cura/CuraApplication.py | 4 ---- resources/qml/SidebarHeader.qml | 10 +++++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f4290af24b..ba42dd2aec 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1362,7 +1362,3 @@ class CuraApplication(QtApplication): node = node.getParent() Selection.add(node) - - @pyqtSlot(result=str) - def getCuraVersion(self): - return CuraVersion diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index f99f6875ae..94e04c3317 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -213,6 +213,7 @@ Column width: height anchors.margins: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter + visible: extrudersList.visible text: "i" style: UM.Theme.styles.info_button @@ -220,7 +221,7 @@ Column onClicked: { // open the material URL with web browser - var version = CuraApplication.getCuraVersion(); + var version = UM.Application.version; var machineName = Cura.MachineManager.activeMachineDefinitionId; var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName; @@ -243,6 +244,13 @@ Column } } + Text // to take the space of the material info button when the active machine doesn't have multiple extruders + { + height: parent.height * 0.70 + width: height + visible: !extrudersList.visible + } + Text { width: parent.width * 0.10 - materialInfoButton.width - UM.Theme.getSize("default_margin").width From 3a3d9afc2455bf749e10132bcf4f8c5c7fbb0f98 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 29 May 2017 18:06:35 +0200 Subject: [PATCH 06/10] Use "button" style for material info button CURA-3810 --- resources/themes/cura/styles.qml | 8 ++++---- resources/themes/cura/theme.json | 7 +------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index b8375ae025..496cc8e489 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -15,7 +15,7 @@ QtObject { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font: UM.Theme.getFont("small") - color: UM.Theme.getColor("info_button_text") + color: UM.Theme.getColor("button_text") text: control.text } @@ -27,11 +27,11 @@ QtObject { color: { if (control.pressed) { - return UM.Theme.getColor("info_button_background_active"); + return UM.Theme.getColor("button_active"); } else if (control.hovered) { - return UM.Theme.getColor("info_button_background_hover"); + return UM.Theme.getColor("button_hover"); } else { - return UM.Theme.getColor("info_button_background"); + return UM.Theme.getColor("button"); } } Behavior on color { ColorAnimation { duration: 50; } } diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 0c0d80fa7c..e7d49cb5e8 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -243,12 +243,7 @@ "layerview_support_infill": [0, 255, 255, 255], "layerview_move_combing": [0, 0, 255, 255], "layerview_move_retraction": [128, 128, 255, 255], - "layerview_support_interface": [64, 192, 255, 255], - - "info_button_text": [255, 255, 255, 255], - "info_button_background": [127, 127, 127, 255], - "info_button_background_hover": [24, 41, 77, 255], - "info_button_background_active": [70, 84, 113, 255] + "layerview_support_interface": [64, 192, 255, 255] }, "sizes": { From 68bd5a6e3767616edfe3f2732257dfe00edb2dd9 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 30 May 2017 09:16:24 +0200 Subject: [PATCH 07/10] Use Item and anchors to set material row layout CURA-3810 --- resources/qml/SidebarHeader.qml | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 94e04c3317..8e9c9bc6ba 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -159,7 +159,7 @@ Column visible: !extruderSelectionRow.visible } - Row + Item { id: variantRow @@ -196,23 +196,22 @@ Column } anchors.verticalCenter: parent.verticalCenter + anchors.left: variantRow.left width: parent.width * 0.30 font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); } - Text - { - width: parent.width * 0.05 - } - Button { id: materialInfoButton height: parent.height * 0.70 width: height - anchors.margins: UM.Theme.getSize("default_margin").width + + anchors.left: variantLabel.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width * 2 anchors.verticalCenter: parent.verticalCenter + visible: extrudersList.visible text: "i" @@ -244,21 +243,10 @@ Column } } - Text // to take the space of the material info button when the active machine doesn't have multiple extruders - { - height: parent.height * 0.70 - width: height - visible: !extrudersList.visible - } - - Text - { - width: parent.width * 0.10 - materialInfoButton.width - UM.Theme.getSize("default_margin").width - } - Item { anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right width: parent.width * 0.50 + UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("setting_control").height From 9333ed1e35dc03e2e31bb3b7944b1e2fc6f6e095 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 30 May 2017 09:16:56 +0200 Subject: [PATCH 08/10] Update copyright in comments CURA-3810 --- resources/qml/SidebarHeader.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 8e9c9bc6ba..2d24506d19 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.2 From 7be05229d86557477f6df3e3b83fc7a8e851830b Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 30 May 2017 11:47:45 +0200 Subject: [PATCH 09/10] Fix material info button tooltip position CURA-3810 --- resources/qml/SidebarHeader.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 2d24506d19..9c46062743 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -233,7 +233,7 @@ Column { var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com."); base.showTooltip( - variantRow, Qt.point(0, variantRow.height / 2), catalog.i18nc("@tooltip", content) + extruderSelectionRow, Qt.point(0, extruderSelectionRow.height + variantRow.height / 2), catalog.i18nc("@tooltip", content) ); } else From 8af1cc886ff90bea6ae348e3c1bb64f214ffe4a9 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 30 May 2017 12:49:10 +0200 Subject: [PATCH 10/10] Use .definition to access DefinitionContainer in qml CURA-3810 --- cura/Settings/CuraContainerStack.py | 4 ++-- cura/Settings/MachineManager.py | 8 +------- resources/qml/SidebarHeader.qml | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/cura/Settings/CuraContainerStack.py b/cura/Settings/CuraContainerStack.py index d14f2d04c9..fc90e3b239 100755 --- a/cura/Settings/CuraContainerStack.py +++ b/cura/Settings/CuraContainerStack.py @@ -5,7 +5,7 @@ import os.path from typing import Any, Optional -from PyQt5.QtCore import pyqtProperty, pyqtSignal +from PyQt5.QtCore import pyqtProperty, pyqtSignal, QObject from UM.FlameProfiler import pyqtSlot from UM.Decorators import override @@ -250,7 +250,7 @@ class CuraContainerStack(ContainerStack): ## Get the definition container. # # \return The definition container. Should always be a valid container, but can be equal to the empty InstanceContainer. - @pyqtProperty(DefinitionContainer, fset = setDefinition, notify = pyqtContainersChanged) + @pyqtProperty(QObject, fset = setDefinition, notify = pyqtContainersChanged) def definition(self) -> DefinitionContainer: return self._containers[_ContainerIndexes.Definition] diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index dc05e4fa4d..8738b044fb 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -470,16 +470,10 @@ class MachineManager(QObject): return "" - @pyqtProperty("QObject", notify = globalContainerChanged) + @pyqtProperty(QObject, notify = globalContainerChanged) def activeMachine(self) -> "GlobalStack": return self._global_container_stack - @pyqtProperty(str, notify = globalContainerChanged) - def activeMachineDefinitionId(self) -> str: - if self._global_container_stack and self._global_container_stack.definition: - return self._global_container_stack.definition.getId() - return "" - @pyqtProperty(str, notify = activeStackChanged) def activeStackId(self) -> str: if self._active_container_stack: diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 9c46062743..32e1db607a 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -221,7 +221,7 @@ Column { // open the material URL with web browser var version = UM.Application.version; - var machineName = Cura.MachineManager.activeMachineDefinitionId; + var machineName = Cura.MachineManager.activeMachine.definition.id; var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName; Qt.openUrlExternally(url);