From 895cf40ab04ca7893ec9e44ae9225372cdc7d3db Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 7 Sep 2016 17:31:45 +0200 Subject: [PATCH 1/7] Only show dual category if there is more than one extruder --- resources/definitions/fdmprinter.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 1116506886..ab1915bde1 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3221,6 +3221,7 @@ "type": "category", "icon": "category_dual", "description": "Settings used for printing with multiple extruders.", + "enabled": "machine_extruder_count > 1", "children": { "adhesion_extruder_nr": From 29edcb905866593d9d1966f801e3276a1d8151e1 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 8 Sep 2016 08:48:58 +0200 Subject: [PATCH 2/7] Style MessageStack making messages less likely to be overlooked CURA-1886 --- resources/themes/cura/styles.qml | 22 ++++++++++++++++++---- resources/themes/cura/theme.json | 14 +++++++++++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 3cfb4514ee..91a512b6db 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -199,18 +199,32 @@ QtObject { property Component progressbar: Component{ ProgressBarStyle { - background:Rectangle { + background: Rectangle { implicitWidth: Theme.getSize("message").width - (Theme.getSize("default_margin").width * 2) implicitHeight: Theme.getSize("progressbar").height radius: Theme.getSize("progressbar_radius").width - color: Theme.getColor("progressbar_background") + color: control.hasOwnProperty("backgroundColor") ? control.backgroundColor : Theme.getColor("progressbar_background") } progress: Rectangle { - color: control.indeterminate ? "transparent" : Theme.getColor("progressbar_control") + color: + { + if(control.indeterminate) + { + return "transparent"; + } + else if(control.hasOwnProperty("controlColor")) + { + return control.controlColor; + } + else + { + return Theme.getColor("progressbar_control"); + } + } radius: Theme.getSize("progressbar_radius").width Rectangle{ radius: Theme.getSize("progressbar_radius").width - color: Theme.getColor("progressbar_control") + color: control.hasOwnProperty("controlColor") ? control.controlColor : Theme.getColor("progressbar_control") width: Theme.getSize("progressbar_control").width height: Theme.getSize("progressbar_control").height visible: control.indeterminate diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 69fc2c2c71..f90467c9e8 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -159,9 +159,17 @@ "tooltip": [12, 169, 227, 255], "tooltip_text": [255, 255, 255, 255], - "message_background": [255, 255, 255, 255], - "message_text": [32, 166, 219, 255], - "message_dismiss": [127, 127, 127, 255], + "message_background": [24, 41, 77, 255], + "message_text": [255, 255, 255, 255], + "message_border": [24, 41, 77, 255], + "message_button": [255, 255, 255, 255], + "message_button_hover": [12, 169, 227, 255], + "message_button_active": [32, 166, 219, 255], + "message_button_text": [24, 41, 77, 255], + "message_button_text_hover": [255, 255, 255, 255], + "message_button_text_active": [255, 255, 255, 255], + "message_progressbar_background": [255, 255, 255, 255], + "message_progressbar_control": [12, 169, 227, 255], "tool_panel_background": [255, 255, 255, 255], From b9215407032bc48c8d169aa450e529822866e02d Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 8 Sep 2016 08:58:40 +0200 Subject: [PATCH 3/7] Remove superfluous margin left by hidden settings Each setting that was made visible, but was disabled due to the value of another setting, would leave a 1 px margin (eg settings in the support category when support was not enabled). Hidden settings now eat that margin, leaving nothing behind. --- resources/qml/Settings/SettingView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 7f8c1488ae..c50c2cc4e0 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -40,7 +40,7 @@ ScrollView id: delegate width: UM.Theme.getSize("sidebar").width; - height: provider.properties.enabled == "True" ? UM.Theme.getSize("section").height : 0 + height: provider.properties.enabled == "True" ? UM.Theme.getSize("section").height : - contents.spacing Behavior on height { NumberAnimation { duration: 100 } } opacity: provider.properties.enabled == "True" ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100 } } From a11e2a56a6cbe490bdf1eab7ec5cda5bf1c6d622 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 8 Sep 2016 09:21:50 +0200 Subject: [PATCH 4/7] Fix densities of Nylon, PC & TPU --- resources/materials/generic_nylon.xml.fdm_material | 2 +- resources/materials/generic_pc.xml.fdm_material | 2 +- resources/materials/generic_tpu.xml.fdm_material | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/materials/generic_nylon.xml.fdm_material b/resources/materials/generic_nylon.xml.fdm_material index d7391e2984..d37adf906a 100644 --- a/resources/materials/generic_nylon.xml.fdm_material +++ b/resources/materials/generic_nylon.xml.fdm_material @@ -14,7 +14,7 @@ Generic Nylon profile. Serves as an example file, data in this file is not corre #3DF266 - 1.19 + 1.14 2.85 diff --git a/resources/materials/generic_pc.xml.fdm_material b/resources/materials/generic_pc.xml.fdm_material index 292b3fd098..77d7e60bf5 100644 --- a/resources/materials/generic_pc.xml.fdm_material +++ b/resources/materials/generic_pc.xml.fdm_material @@ -14,7 +14,7 @@ Generic PC profile. Serves as an example file, data in this file is not correct. #F29030 - 1.18 + 1.19 2.85 diff --git a/resources/materials/generic_tpu.xml.fdm_material b/resources/materials/generic_tpu.xml.fdm_material index 455e7b89be..5a0c793cda 100644 --- a/resources/materials/generic_tpu.xml.fdm_material +++ b/resources/materials/generic_tpu.xml.fdm_material @@ -14,7 +14,7 @@ Generic TPU 95A profile. Serves as an example file, data in this file is not cor #B22744 - 1.19 + 1.22 2.85 From ea4333b802b0d2db0e48202992c6a4258d2019d2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 8 Sep 2016 11:51:33 +0200 Subject: [PATCH 5/7] No longer disable Nylon by default It prints fine on most printers. Just allow people to select it. (And other secret reasons.) --- resources/materials/generic_nylon.xml.fdm_material | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/materials/generic_nylon.xml.fdm_material b/resources/materials/generic_nylon.xml.fdm_material index d37adf906a..02b2d5414b 100644 --- a/resources/materials/generic_nylon.xml.fdm_material +++ b/resources/materials/generic_nylon.xml.fdm_material @@ -18,7 +18,6 @@ Generic Nylon profile. Serves as an example file, data in this file is not corre 2.85 - no 250 60 175 From bb92c0d7fae58f5173333de8f7312b540b3ffdad Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 8 Sep 2016 11:56:11 +0200 Subject: [PATCH 6/7] Fix units for density and diameter --- resources/qml/Preferences/MaterialView.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index 3041115ad2..6115671563 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -115,7 +115,7 @@ TabView width: base.secondColumnWidth; value: properties.density; decimals: 2 - suffix: "g/cm" + suffix: "g/cm³" stepSize: 0.01 readOnly: !base.editingEnabled; @@ -128,7 +128,7 @@ TabView width: base.secondColumnWidth; value: properties.diameter; decimals: 2 - suffix: "mm³" + suffix: "mm" stepSize: 0.01 readOnly: !base.editingEnabled; From 09f7d9b999d787b002af967511c194701a61b867 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 8 Sep 2016 12:49:42 +0200 Subject: [PATCH 7/7] We shuffle the list of nodes so that the push free won't endlessly repeat the same 2 steps --- cura/PlatformPhysics.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index b1dd1c4c8e..2a5bd4091c 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -15,6 +15,9 @@ from cura.ConvexHullDecorator import ConvexHullDecorator from . import PlatformPhysicsOperation from . import ZOffsetDecorator +import random # used for list shuffling + + class PlatformPhysics: def __init__(self, controller, volume): super().__init__() @@ -49,8 +52,11 @@ class PlatformPhysics: transformed_nodes = [] group_nodes = [] - - for node in BreadthFirstIterator(root): + # We try to shuffle all the nodes to prevent "locked" situations, where iteration B inverts iteration A. + # By shuffling the order of the nodes, this might happen a few times, but at some point it will resolve. + nodes = list(BreadthFirstIterator(root)) + random.shuffle(nodes) + for node in nodes: if node is root or type(node) is not SceneNode or node.getBoundingBox() is None: continue