From 2caddee2fa9e7e696f77426e4cd1e0842f8bc0e5 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Wed, 28 Dec 2016 08:38:33 +0000 Subject: [PATCH 001/128] Add infill_angles setting to control direction of lines and zig zag infill. This setting provides 4 options: Default - the original directions, 45 and 135. Uniform - one each of 45, 90, 135 and 180. Stronger X - 45, 90, 135 and 90 again - provides more strength in X direction. Stronger Y - 45, 0, 135 and 0 again - provides more strength in Y direction. --- resources/definitions/fdmprinter.def.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 842a2a5bfd..3938ecaaad 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1071,6 +1071,22 @@ "value": "'lines' if infill_sparse_density > 25 else 'grid'", "settable_per_mesh": true }, + "infill_angles": + { + "label": "Infill Line Directions", + "description": "The line directions to use when the infill pattern is lines or zig zag. Default directions are 45 and 135 degrees, Uniform directions are 45, 90, 135 and 180, Stronger X directions are 45, 90, 135 and 90 again and Stronger Y directions are 45, 0, 135 and 0 again.", + "type": "enum", + "options": + { + "45,135": "Default", + "45,90,135,180": "Uniform", + "45,90,135,90": "Stronger X", + "45,0,135,0": "Stronger Y" + }, + "default_value": "45,135", + "enabled": "infill_pattern == 'lines' or infill_pattern == 'zigzag'", + "settable_per_mesh": true + }, "sub_div_rad_mult": { "label": "Cubic Subdivision Radius", From 8d3984a7b48e90eb0d58ea87b500d649322a9bd8 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Thu, 29 Dec 2016 11:32:02 +0000 Subject: [PATCH 002/128] Change Default label to Orthogonal. --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 3938ecaaad..f53720d863 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1074,11 +1074,11 @@ "infill_angles": { "label": "Infill Line Directions", - "description": "The line directions to use when the infill pattern is lines or zig zag. Default directions are 45 and 135 degrees, Uniform directions are 45, 90, 135 and 180, Stronger X directions are 45, 90, 135 and 90 again and Stronger Y directions are 45, 0, 135 and 0 again.", + "description": "The line directions to use when the infill pattern is lines or zig zag. Orthogonal directions are 45 and 135 degrees, Uniform directions are 45, 90, 135 and 180, Stronger X directions are 45, 90, 135 and 90 again and Stronger Y directions are 45, 0, 135 and 0 again.", "type": "enum", "options": { - "45,135": "Default", + "45,135": "Orthogonal", "45,90,135,180": "Uniform", "45,90,135,90": "Stronger X", "45,0,135,0": "Stronger Y" From 03fe03ed65eb39ed82448376f3984be3c847dc46 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Mon, 16 Jan 2017 16:05:21 +0000 Subject: [PATCH 003/128] Modify the constraints of the SettingTextField when the setting type is "str". When the setting type is "str" it now allows the setting contents to be up to 20 characters long with no constraint on what those characters are. --- resources/qml/Settings/SettingTextField.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index da24f0f521..af899bec12 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -98,9 +98,9 @@ SettingItem selectByMouse: true; - maximumLength: 10; + maximumLength: (definition.type == "str") ? 20 : 10; - validator: RegExpValidator { regExp: (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry + validator: RegExpValidator { regExp: (definition.type == "str") ? /^.{0,20}$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry Binding { From efc3869efe4d8cf10488cb385739ca51dc9583ce Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Mon, 16 Jan 2017 16:09:48 +0000 Subject: [PATCH 004/128] Infill Line Directions setting can now contain an arbitrary string. The SettingTextField can now cope with strings of arbitrary characters (not just digits) so revert to plan A and let the user input a comma separated list of angles rather than having fixed combinations. CuraEngine will parse the list and ignore bad input. --- resources/definitions/fdmprinter.def.json | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index dd863719f0..6dd30800be 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1089,15 +1089,8 @@ "infill_angles": { "label": "Infill Line Directions", - "description": "The line directions to use when the infill pattern is lines or zig zag. Orthogonal directions are 45 and 135 degrees, Uniform directions are 45, 90, 135 and 180, Stronger X directions are 45, 90, 135 and 90 again and Stronger Y directions are 45, 0, 135 and 0 again.", - "type": "enum", - "options": - { - "45,135": "Orthogonal", - "45,90,135,180": "Uniform", - "45,90,135,90": "Stronger X", - "45,0,135,0": "Stronger Y" - }, + "description": "A comma separated list of line directions to use when the infill pattern is lines or zig zag. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. Default directions are 45 and 135 degrees.", + "type": "str", "default_value": "45,135", "enabled": "infill_pattern == 'lines' or infill_pattern == 'zigzag'", "settable_per_mesh": true From 3e7b9e99f31d3f96d4b123ca52992814c9fc230e Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Tue, 24 Jan 2017 18:09:11 +0000 Subject: [PATCH 005/128] Now the Infill Line Directions setting is enabled for all infill patterns. The default value is now the empty string which tells the engine to use the traditional angles (45 & 135 for lines and zig zag patterns, just 45 for everything else. --- resources/definitions/fdmprinter.def.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index a85a50b37c..ffabf9a7d5 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1089,10 +1089,9 @@ "infill_angles": { "label": "Infill Line Directions", - "description": "A comma separated list of line directions to use when the infill pattern is lines or zig zag. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. Default directions are 45 and 135 degrees.", + "description": "A comma separated list of line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. Default is empty which means use the traditional default angles (45 and 135 degrees for the lines and zig zag patterns and 45 degrees for all other patterns).", "type": "str", - "default_value": "45,135", - "enabled": "infill_pattern == 'lines' or infill_pattern == 'zigzag'", + "default_value": "", "settable_per_mesh": true }, "sub_div_rad_mult": From db3cf0c0fb271461143049285cd7f099d043253f Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Fri, 27 Jan 2017 15:54:19 +0000 Subject: [PATCH 006/128] Add the [int] setting type for settings that are a list of integers. The RegExpValidator (more of a restrictor than a validator) requires the text to start with a '[' and then have a sequence of integers separated by commas. A trailing ']' is accepted. --- cura/CuraApplication.py | 2 ++ plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 2 ++ resources/qml/Settings/SettingTextField.qml | 4 ++-- resources/qml/Settings/SettingView.qml | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 6288c2d211..d1f6504431 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -107,6 +107,8 @@ class CuraApplication(QtApplication): SettingDefinition.addSettingType("extruder", None, str, Validator) + SettingDefinition.addSettingType("[int]", None, str, None) + SettingFunction.registerOperator("extruderValues", cura.Settings.ExtruderManager.getExtruderValues) SettingFunction.registerOperator("extruderValue", cura.Settings.ExtruderManager.getExtruderValue) SettingFunction.registerOperator("resolveOrValue", cura.Settings.ExtruderManager.getResolveOrValue) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 9811316948..cb65da635b 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -209,6 +209,8 @@ Item { { case "int": return settingTextField + case "[int]": + return settingTextField case "float": return settingTextField case "enum": diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index af899bec12..05c99d7e25 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -98,9 +98,9 @@ SettingItem selectByMouse: true; - maximumLength: (definition.type == "str") ? 20 : 10; + maximumLength: (definition.type == "[int]") ? 20 : 10; - validator: RegExpValidator { regExp: (definition.type == "str") ? /^.{0,20}$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry + validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[(\s*-?[0-9]+\s*,)*(\s*-?[0-9]+)\s*\]$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry Binding { diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 24022891c3..7138d4acd3 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -217,6 +217,8 @@ Item { case "int": return "SettingTextField.qml" + case "[int]": + return "SettingTextField.qml" case "float": return "SettingTextField.qml" case "enum": From afc75b6c3e5af11636ea9fe64d845f73af713457 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Fri, 27 Jan 2017 15:54:58 +0000 Subject: [PATCH 007/128] Now uses the [int] setting type. The default value is [ ] (an empty list). --- resources/definitions/fdmprinter.def.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ffabf9a7d5..4f39be7462 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1089,9 +1089,9 @@ "infill_angles": { "label": "Infill Line Directions", - "description": "A comma separated list of line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. Default is empty which means use the traditional default angles (45 and 135 degrees for the lines and zig zag patterns and 45 degrees for all other patterns).", - "type": "str", - "default_value": "", + "description": "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the traditional default angles (45 and 135 degrees for the lines and zig zag patterns and 45 degrees for all other patterns).", + "type": "[int]", + "default_value": "[ ]", "settable_per_mesh": true }, "sub_div_rad_mult": From 27a52092d301121e439097777614529ba28a4dcd Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Fri, 27 Jan 2017 15:55:22 +0000 Subject: [PATCH 008/128] Add the skin_angles setting which is analogous to the infill_angles setting. --- resources/definitions/fdmprinter.def.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 4f39be7462..adf909a644 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -905,6 +905,14 @@ "value": "top_bottom_pattern", "settable_per_mesh": true }, + "skin_angles": + { + "label": "Top/Bottom Line Directions", + "description": "A list of integer line directions to use when the top/bottom layers use the lines or zig zag pattern. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the traditional default angles (45 and 135 degrees).", + "type": "[int]", + "default_value": "[ ]", + "settable_per_mesh": true + }, "wall_0_inset": { "label": "Outer Wall Inset", From 5817905459d7b7f12e4161a3db0fdd876b34de3a Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Tue, 31 Jan 2017 18:47:27 +0000 Subject: [PATCH 009/128] Added anchor_skin_in_infill setting. When enabled, skin areas are increased in size so that they project into the infill by at least the distance between infill lines. --- resources/definitions/fdmprinter.def.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index f6cb2060c6..825686640e 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1240,6 +1240,14 @@ "minimum_value": "0", "default_value": 0, "settable_per_mesh": true + }, + "anchor_skin_in_infill": + { + "label": "Anchor Skin In Infill", + "description": "Expand skin areas so that they are anchored by the infill layers above and below. The skin areas are expanded sufficiently so that they bridge the gap between the infill lines.", + "type": "bool", + "default_value": false, + "settable_per_mesh": true } } }, From 45dc52de1639702f52b87659177941cf275847f9 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Wed, 1 Feb 2017 08:37:20 +0000 Subject: [PATCH 010/128] Provide separate settings for anchoring upper and lower skins in infill. Just expanding the upper skins into the infill is probably sufficient for most situations but if users want a symmetrical structure then expanding lower skins too could be useful. Users will need to experiment to get the desired results for a given model. --- resources/definitions/fdmprinter.def.json | 27 ++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 825686640e..ab00f55ef6 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1241,13 +1241,34 @@ "default_value": 0, "settable_per_mesh": true }, - "anchor_skin_in_infill": + "anchor_skins_in_infill": { - "label": "Anchor Skin In Infill", + "label": "Anchor Skins In Infill", "description": "Expand skin areas so that they are anchored by the infill layers above and below. The skin areas are expanded sufficiently so that they bridge the gap between the infill lines.", "type": "bool", "default_value": false, - "settable_per_mesh": true + "settable_per_mesh": true, + "children": + { + "anchor_upper_skin_in_infill": + { + "label": "Anchor Upper Skin In Infill", + "description": "Expand upper skin areas (areas with air above) so that they are anchored by the infill layers above and below. The skin areas are expanded sufficiently so that they bridge the gap between the infill lines.", + "type": "bool", + "default_value": false, + "value": "anchor_skins_in_infill", + "settable_per_mesh": true + }, + "anchor_lower_skin_in_infill": + { + "label": "Anchor Lower Skin In Infill", + "description": "Expand lower skin areas (areas with air below) so that they are anchored by the infill layers above and below. The skin areas are expanded sufficiently so that they bridge the gap between the infill lines.", + "type": "bool", + "default_value": false, + "value": "anchor_skins_in_infill", + "settable_per_mesh": true + } + } } } }, From eabfb797d68b117e77a87daa6f79e580b3ecfa25 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Wed, 1 Feb 2017 12:54:35 +0000 Subject: [PATCH 011/128] Add anchor_skin_distance setting and tweak descriptions of related settings. Now, the user can control how far the skins are expanded into the infill. --- resources/definitions/fdmprinter.def.json | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ab00f55ef6..fe2809b872 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1244,7 +1244,7 @@ "anchor_skins_in_infill": { "label": "Anchor Skins In Infill", - "description": "Expand skin areas so that they are anchored by the infill layers above and below. The skin areas are expanded sufficiently so that they bridge the gap between the infill lines.", + "description": "Expand skin areas into the infill behind walls. By default, skins stop when they reach the wall lines that surround infill. This setting extends the skins beyond the wall lines so that the skins become anchored in the infill.", "type": "bool", "default_value": false, "settable_per_mesh": true, @@ -1253,7 +1253,7 @@ "anchor_upper_skin_in_infill": { "label": "Anchor Upper Skin In Infill", - "description": "Expand upper skin areas (areas with air above) so that they are anchored by the infill layers above and below. The skin areas are expanded sufficiently so that they bridge the gap between the infill lines.", + "description": "Expand upper skin areas (areas with air above) so that they are anchored by the infill layers above and below.", "type": "bool", "default_value": false, "value": "anchor_skins_in_infill", @@ -1262,11 +1262,22 @@ "anchor_lower_skin_in_infill": { "label": "Anchor Lower Skin In Infill", - "description": "Expand lower skin areas (areas with air below) so that they are anchored by the infill layers above and below. The skin areas are expanded sufficiently so that they bridge the gap between the infill lines.", + "description": "Expand lower skin areas (areas with air below) so that they are anchored by the infill layers above and below.", "type": "bool", "default_value": false, "value": "anchor_skins_in_infill", "settable_per_mesh": true + }, + "anchor_skin_distance": + { + "label": "Anchor Skin Distance", + "description": "The distance the skins are expanded into the infill. The default value is sufficient to bridge the gap between the infill lines.", + "unit": "mm", + "type": "float", + "default_value": 1.0, + "value": "infill_line_distance * 1.4", + "minimum_value": "0", + "settable_per_mesh": true } } } From a3326a83137bd33db107103e476208103f57750c Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 2 Feb 2017 15:54:44 +0100 Subject: [PATCH 012/128] 3mf reader now uses libSavitar for loading This greatly decreases (~factor 10) the time required to load 3mf files CURA-3215 --- plugins/3MFReader/ThreeMFReader.py | 132 ++++++++++++++++++++--------- 1 file changed, 90 insertions(+), 42 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 0f4ab532fa..2595f8affa 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -18,6 +18,9 @@ from cura.Settings.ExtruderManager import ExtruderManager from cura.QualityManager import QualityManager from UM.Scene.SceneNode import SceneNode +import Savitar +import numpy + try: import xml.etree.cElementTree as ET except ImportError: @@ -129,6 +132,9 @@ class ThreeMFReader(MeshReader): return node def _createMatrixFromTransformationString(self, transformation): + if transformation == "": + return Matrix() + splitted_transformation = transformation.split() ## Transformation is saved as: ## M00 M01 M02 0.0 @@ -155,51 +161,92 @@ class ThreeMFReader(MeshReader): return temp_mat + def _convertSavitarNodeToUMNode(self, savitar_node): + um_node = SceneNode() + transformation = self._createMatrixFromTransformationString(savitar_node.getTransformation()) + um_node.setTransformation(transformation) + mesh_builder = MeshBuilder() + + data = numpy.fromstring(savitar_node.getMeshData().getFlatVerticesAsBytes(), dtype=numpy.float32) + + vertices = numpy.resize(data, (int(data.size / 3), 3)) + mesh_builder.setVertices(vertices) + mesh_builder.calculateNormals(fast=True) + mesh_data = mesh_builder.build() + + if len(mesh_data.getVertices()): + um_node.setMeshData(mesh_data) + + for child in savitar_node.getChildren(): + um_node.addChild(self._convertSavitarNodeToUMNode(child)) + settings = savitar_node.getSettings() + + # Add the setting override decorator, so we can add settings to this node. + if settings: + um_node.addDecorator(SettingOverrideDecorator()) + + global_container_stack = Application.getInstance().getGlobalContainerStack() + # Ensure the correct next container for the SettingOverride decorator is set. + if global_container_stack: + multi_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1 + + # Ensure that all extruder data is reset + if not multi_extrusion: + default_stack_id = global_container_stack.getId() + else: + default_stack = ExtruderManager.getInstance().getExtruderStack(0) + if default_stack: + default_stack_id = default_stack.getId() + else: + default_stack_id = global_container_stack.getId() + um_node.callDecoration("setActiveExtruder", default_stack_id) + + # Get the definition & set it + definition = QualityManager.getInstance().getParentMachineDefinition(global_container_stack.getBottom()) + um_node.callDecoration("getStack").getTop().setDefinition(definition) + + setting_container = um_node.callDecoration("getStack").getTop() + + for key in settings: + setting_value = settings[key] + + # Extruder_nr is a special case. + if key == "extruder_nr": + extruder_stack = ExtruderManager.getInstance().getExtruderStack(int(setting_value)) + if extruder_stack: + um_node.callDecoration("setActiveExtruder", extruder_stack.getId()) + else: + Logger.log("w", "Unable to find extruder in position %s", setting_value) + continue + setting_container.setProperty(key,"value", setting_value) + + if len(um_node.getChildren()) > 0: + group_decorator = GroupDecorator() + um_node.addDecorator(group_decorator) + um_node.setSelectable(True) + return um_node + def read(self, file_name): result = [] # The base object of 3mf is a zipped archive. - archive = zipfile.ZipFile(file_name, "r") - self._base_name = os.path.basename(file_name) try: - self._root = ET.parse(archive.open("3D/3dmodel.model")) - self._unit = self._root.getroot().get("unit") - - build_items = self._root.findall("./3mf:build/3mf:item", self._namespaces) - - for build_item in build_items: - id = build_item.get("objectid") - object = self._root.find("./3mf:resources/3mf:object[@id='{0}']".format(id), self._namespaces) - if "type" in object.attrib: - if object.attrib["type"] == "support" or object.attrib["type"] == "other": - # Ignore support objects, as cura does not support these. - # We can't guarantee that they wont be made solid. - # We also ignore "other", as I have no idea what to do with them. - Logger.log("w", "3MF file contained an object of type %s which is not supported by Cura", object.attrib["type"]) - continue - elif object.attrib["type"] == "solidsupport" or object.attrib["type"] == "model": - pass # Load these as normal - else: - # We should technically fail at this point because it's an invalid 3MF, but try to continue anyway. - Logger.log("e", "3MF file contained an object of type %s which is not supported by the 3mf spec", - object.attrib["type"]) - continue - - build_item_node = self._createNodeFromObject(object, self._base_name + "_" + str(id)) - + archive = zipfile.ZipFile(file_name, "r") + self._base_name = os.path.basename(file_name) + parser = Savitar.ThreeMFParser() + scene_3mf = parser.parse(archive.open("3D/3dmodel.model").read()) + self._unit = scene_3mf.getUnit() + for node in scene_3mf.getSceneNodes(): + um_node = self._convertSavitarNodeToUMNode(node) # compensate for original center position, if object(s) is/are not around its zero position + transform_matrix = Matrix() - mesh_data = build_item_node.getMeshData() + mesh_data = um_node.getMeshData() if mesh_data is not None: extents = mesh_data.getExtents() center_vector = Vector(extents.center.x, extents.center.y, extents.center.z) transform_matrix.setByTranslation(center_vector) - - # offset with transform from 3mf - transform = build_item.get("transform") - if transform is not None: - transform_matrix.multiply(self._createMatrixFromTransformationString(transform)) - - build_item_node.setTransformation(transform_matrix) + transform_matrix.multiply(um_node.getLocalTransformation()) + um_node.setTransformation(transform_matrix) global_container_stack = UM.Application.getInstance().getGlobalContainerStack() @@ -214,9 +261,9 @@ class ThreeMFReader(MeshReader): # Second step: 3MF defines the left corner of the machine as center, whereas cura uses the center of the # build volume. if global_container_stack: - translation_vector = Vector(x = -global_container_stack.getProperty("machine_width", "value") / 2, - y = -global_container_stack.getProperty("machine_depth", "value") / 2, - z = 0) + translation_vector = Vector(x=-global_container_stack.getProperty("machine_width", "value") / 2, + y=-global_container_stack.getProperty("machine_depth", "value") / 2, + z=0) translation_matrix = Matrix() translation_matrix.setByTranslation(translation_vector) transformation_matrix.multiply(translation_matrix) @@ -227,12 +274,13 @@ class ThreeMFReader(MeshReader): transformation_matrix.multiply(scale_matrix) # Pre multiply the transformation with the loaded transformation, so the data is handled correctly. - build_item_node.setTransformation(build_item_node.getLocalTransformation().preMultiply(transformation_matrix)) + um_node.setTransformation(um_node.getLocalTransformation().preMultiply(transformation_matrix)) - result.append(build_item_node) + result.append(um_node) - except Exception as e: - Logger.log("e", "An exception occurred in 3mf reader: %s", e) + except Exception: + Logger.logException("e", "An exception occurred in 3mf reader.") + return [] return result From b83537f27d828ff7e74b67763f6696ff758ece09 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Sun, 5 Feb 2017 15:58:42 +0000 Subject: [PATCH 013/128] Hide children of anchor_skins_in_infill when it isn't enabled. --- resources/definitions/fdmprinter.def.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index fe2809b872..c90f17edb6 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1257,6 +1257,7 @@ "type": "bool", "default_value": false, "value": "anchor_skins_in_infill", + "enabled": "anchor_skins_in_infill", "settable_per_mesh": true }, "anchor_lower_skin_in_infill": @@ -1266,6 +1267,7 @@ "type": "bool", "default_value": false, "value": "anchor_skins_in_infill", + "enabled": "anchor_skins_in_infill", "settable_per_mesh": true }, "anchor_skin_distance": @@ -1277,6 +1279,7 @@ "default_value": 1.0, "value": "infill_line_distance * 1.4", "minimum_value": "0", + "enabled": "anchor_skins_in_infill", "settable_per_mesh": true } } From 495a73e9762f568072b4ff6c053b30014e076e2e Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Mon, 6 Feb 2017 08:44:25 +0000 Subject: [PATCH 014/128] Tweaked descriptions of anchor_skin_in_infill and anchor_skin_distance. --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index c90f17edb6..bbb9d14e8d 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1244,7 +1244,7 @@ "anchor_skins_in_infill": { "label": "Anchor Skins In Infill", - "description": "Expand skin areas into the infill behind walls. By default, skins stop when they reach the wall lines that surround infill. This setting extends the skins beyond the wall lines so that the skins become anchored in the infill.", + "description": "Expand skin areas into the infill behind walls. By default, skins stop under the wall lines that surround infill but this can lead to holes appearing when the infill density is low. This setting extends the skins beyond the wall lines so that the skins become anchored in the infill.", "type": "bool", "default_value": false, "settable_per_mesh": true, @@ -1273,7 +1273,7 @@ "anchor_skin_distance": { "label": "Anchor Skin Distance", - "description": "The distance the skins are expanded into the infill. The default value is sufficient to bridge the gap between the infill lines.", + "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", "unit": "mm", "type": "float", "default_value": 1.0, From b6118a764e28326aaf9ebc97acd4847dcd60ad77 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 6 Feb 2017 14:13:20 +0100 Subject: [PATCH 015/128] Updated documentation CURA-3215 --- plugins/3MFReader/ThreeMFReader.py | 95 ++---------------------------- 1 file changed, 4 insertions(+), 91 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 2595f8affa..bfa9d2764b 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -40,97 +40,6 @@ class ThreeMFReader(MeshReader): self._base_name = "" self._unit = None - def _createNodeFromObject(self, object, name = ""): - node = SceneNode() - node.setName(name) - mesh_builder = MeshBuilder() - vertex_list = [] - - components = object.find(".//3mf:components", self._namespaces) - if components: - for component in components: - id = component.get("objectid") - new_object = self._root.find("./3mf:resources/3mf:object[@id='{0}']".format(id), self._namespaces) - new_node = self._createNodeFromObject(new_object, self._base_name + "_" + str(id)) - node.addChild(new_node) - transform = component.get("transform") - if transform is not None: - new_node.setTransformation(self._createMatrixFromTransformationString(transform)) - - # for vertex in entry.mesh.vertices.vertex: - for vertex in object.findall(".//3mf:vertex", self._namespaces): - vertex_list.append([vertex.get("x"), vertex.get("y"), vertex.get("z")]) - Job.yieldThread() - - xml_settings = list(object.findall(".//cura:setting", self._namespaces)) - - # Add the setting override decorator, so we can add settings to this node. - if xml_settings: - node.addDecorator(SettingOverrideDecorator()) - - global_container_stack = Application.getInstance().getGlobalContainerStack() - # Ensure the correct next container for the SettingOverride decorator is set. - if global_container_stack: - multi_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1 - # Ensure that all extruder data is reset - if not multi_extrusion: - default_stack_id = global_container_stack.getId() - else: - default_stack = ExtruderManager.getInstance().getExtruderStack(0) - if default_stack: - default_stack_id = default_stack.getId() - else: - default_stack_id = global_container_stack.getId() - node.callDecoration("setActiveExtruder", default_stack_id) - - # Get the definition & set it - definition = QualityManager.getInstance().getParentMachineDefinition(global_container_stack.getBottom()) - node.callDecoration("getStack").getTop().setDefinition(definition) - - setting_container = node.callDecoration("getStack").getTop() - for setting in xml_settings: - setting_key = setting.get("key") - setting_value = setting.text - - # Extruder_nr is a special case. - if setting_key == "extruder_nr": - extruder_stack = ExtruderManager.getInstance().getExtruderStack(int(setting_value)) - if extruder_stack: - node.callDecoration("setActiveExtruder", extruder_stack.getId()) - else: - Logger.log("w", "Unable to find extruder in position %s", setting_value) - continue - setting_container.setProperty(setting_key,"value", setting_value) - - if len(node.getChildren()) > 0: - group_decorator = GroupDecorator() - node.addDecorator(group_decorator) - - triangles = object.findall(".//3mf:triangle", self._namespaces) - mesh_builder.reserveFaceCount(len(triangles)) - - for triangle in triangles: - v1 = int(triangle.get("v1")) - v2 = int(triangle.get("v2")) - v3 = int(triangle.get("v3")) - - mesh_builder.addFaceByPoints(vertex_list[v1][0], vertex_list[v1][1], vertex_list[v1][2], - vertex_list[v2][0], vertex_list[v2][1], vertex_list[v2][2], - vertex_list[v3][0], vertex_list[v3][1], vertex_list[v3][2]) - - Job.yieldThread() - - # TODO: We currently do not check for normals and simply recalculate them. - mesh_builder.calculateNormals(fast=True) - mesh_builder.setFileName(name) - mesh_data = mesh_builder.build() - - if len(mesh_data.getVertices()): - node.setMeshData(mesh_data) - - node.setSelectable(True) - return node - def _createMatrixFromTransformationString(self, transformation): if transformation == "": return Matrix() @@ -161,6 +70,9 @@ class ThreeMFReader(MeshReader): return temp_mat + + ## Convenience function that converts a SceneNode object (as obtained from libSavitar) to a Uranium scenenode. + # \returns Uranium Scenen node. def _convertSavitarNodeToUMNode(self, savitar_node): um_node = SceneNode() transformation = self._createMatrixFromTransformationString(savitar_node.getTransformation()) @@ -179,6 +91,7 @@ class ThreeMFReader(MeshReader): for child in savitar_node.getChildren(): um_node.addChild(self._convertSavitarNodeToUMNode(child)) + settings = savitar_node.getSettings() # Add the setting override decorator, so we can add settings to this node. From 4dc70cc2b129dcf4ff6a0254fcbb86e41dcc31cd Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 6 Feb 2017 14:14:03 +0100 Subject: [PATCH 016/128] 3MF writer now also uses libSavitar CURA-3215 --- plugins/3MFWriter/ThreeMFWriter.py | 185 ++++++++++++----------------- 1 file changed, 75 insertions(+), 110 deletions(-) diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py index 764c73b1f0..f7ea04ed0d 100644 --- a/plugins/3MFWriter/ThreeMFWriter.py +++ b/plugins/3MFWriter/ThreeMFWriter.py @@ -6,6 +6,11 @@ from UM.Math.Vector import Vector from UM.Logger import Logger from UM.Math.Matrix import Matrix from UM.Application import Application +import UM.Scene.SceneNode + +import Savitar + +import numpy try: import xml.etree.cElementTree as ET @@ -33,18 +38,18 @@ class ThreeMFWriter(MeshWriter): def _convertMatrixToString(self, matrix): result = "" - result += str(matrix._data[0,0]) + " " - result += str(matrix._data[1,0]) + " " - result += str(matrix._data[2,0]) + " " - result += str(matrix._data[0,1]) + " " - result += str(matrix._data[1,1]) + " " - result += str(matrix._data[2,1]) + " " - result += str(matrix._data[0,2]) + " " - result += str(matrix._data[1,2]) + " " - result += str(matrix._data[2,2]) + " " - result += str(matrix._data[0,3]) + " " - result += str(matrix._data[1,3]) + " " - result += str(matrix._data[2,3]) + result += str(matrix._data[0, 0]) + " " + result += str(matrix._data[1, 0]) + " " + result += str(matrix._data[2, 0]) + " " + result += str(matrix._data[0, 1]) + " " + result += str(matrix._data[1, 1]) + " " + result += str(matrix._data[2, 1]) + " " + result += str(matrix._data[0, 2]) + " " + result += str(matrix._data[1, 2]) + " " + result += str(matrix._data[2, 2]) + " " + result += str(matrix._data[0, 3]) + " " + result += str(matrix._data[1, 3]) + " " + result += str(matrix._data[2, 3]) return result ## Should we store the archive @@ -53,6 +58,48 @@ class ThreeMFWriter(MeshWriter): def setStoreArchive(self, store_archive): self._store_archive = store_archive + ## Convenience function that converts an Uranium SceneNode object to a SavitarSceneNode + # \returns Uranium Scenen node. + def _convertUMNodeToSavitarNode(self, um_node, transformation = Matrix()): + if type(um_node) is not UM.Scene.SceneNode.SceneNode: + return None + + savitar_node = Savitar.SceneNode() + + node_matrix = um_node.getLocalTransformation() + + matrix_string = self._convertMatrixToString(node_matrix.preMultiply(transformation)) + + savitar_node.setTransformation(matrix_string) + mesh_data = um_node.getMeshData() + if mesh_data is not None: + savitar_node.getMeshData().setVerticesFromBytes(mesh_data.getVerticesAsByteArray()) + indices_array = mesh_data.getIndicesAsByteArray() + if indices_array is not None: + savitar_node.getMeshData().setFacesFromBytes(indices_array) + else: + savitar_node.getMeshData().setFacesFromBytes(numpy.arange(mesh_data.getVertices().size / 3, dtype=numpy.int32).tostring()) + + # Handle per object settings (if any) + stack = um_node.callDecoration("getStack") + if stack is not None: + changed_setting_keys = set(stack.getTop().getAllKeys()) + + # Ensure that we save the extruder used for this object. + if stack.getProperty("machine_extruder_count", "value") > 1: + changed_setting_keys.add("extruder_nr") + + # Get values for all changed settings & save them. + for key in changed_setting_keys: + savitar_node.setSetting(key, str(stack.getProperty(key, "value"))) + + for child_node in um_node.getChildren(): + savitar_child_node = self._convertUMNodeToSavitarNode(child_node) + if savitar_child_node is not None: + savitar_node.addChild(savitar_child_node) + + return savitar_node + def getArchive(self): return self._archive @@ -77,98 +124,7 @@ class ThreeMFWriter(MeshWriter): relations_element = ET.Element("Relationships", xmlns = self._namespaces["relationships"]) model_relation_element = ET.SubElement(relations_element, "Relationship", Target = "/3D/3dmodel.model", Id = "rel0", Type = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel") - model = ET.Element("model", unit = "millimeter", xmlns = self._namespaces["3mf"]) - model.set("xmlns:cura", self._namespaces["cura"]) - - # Add the version of Cura this was created with. Since there is no "version" or similar metadata name we need - # to prefix it with the cura namespace, as specified by the 3MF specification. - version_metadata = ET.SubElement(model, "metadata", name = "cura:version") - version_metadata.text = Application.getInstance().getVersion() - - resources = ET.SubElement(model, "resources") - build = ET.SubElement(model, "build") - - added_nodes = [] - index = 0 # Ensure index always exists (even if there are no nodes to write) - # Write all nodes with meshData to the file as objects inside the resource tag - for index, n in enumerate(MeshWriter._meshNodes(nodes)): - added_nodes.append(n) # Save the nodes that have mesh data - object = ET.SubElement(resources, "object", id = str(index+1), type = "model") - mesh = ET.SubElement(object, "mesh") - - mesh_data = n.getMeshData() - vertices = ET.SubElement(mesh, "vertices") - verts = mesh_data.getVertices() - - if verts is None: - Logger.log("d", "3mf writer can't write nodes without mesh data. Skipping this node.") - continue # No mesh data, nothing to do. - if mesh_data.hasIndices(): - for face in mesh_data.getIndices(): - v1 = verts[face[0]] - v2 = verts[face[1]] - v3 = verts[face[2]] - xml_vertex1 = ET.SubElement(vertices, "vertex", x = str(v1[0]), y = str(v1[1]), z = str(v1[2])) - xml_vertex2 = ET.SubElement(vertices, "vertex", x = str(v2[0]), y = str(v2[1]), z = str(v2[2])) - xml_vertex3 = ET.SubElement(vertices, "vertex", x = str(v3[0]), y = str(v3[1]), z = str(v3[2])) - - triangles = ET.SubElement(mesh, "triangles") - for face in mesh_data.getIndices(): - triangle = ET.SubElement(triangles, "triangle", v1 = str(face[0]) , v2 = str(face[1]), v3 = str(face[2])) - else: - triangles = ET.SubElement(mesh, "triangles") - for idx, vert in enumerate(verts): - xml_vertex = ET.SubElement(vertices, "vertex", x = str(vert[0]), y = str(vert[1]), z = str(vert[2])) - - # If we have no faces defined, assume that every three subsequent vertices form a face. - if idx % 3 == 0: - triangle = ET.SubElement(triangles, "triangle", v1 = str(idx), v2 = str(idx + 1), v3 = str(idx + 2)) - - # Handle per object settings - stack = n.callDecoration("getStack") - if stack is not None: - changed_setting_keys = set(stack.getTop().getAllKeys()) - - # Ensure that we save the extruder used for this object. - if stack.getProperty("machine_extruder_count", "value") > 1: - changed_setting_keys.add("extruder_nr") - - settings_xml = ET.SubElement(object, "settings", xmlns=self._namespaces["cura"]) - - # Get values for all changed settings & save them. - for key in changed_setting_keys: - setting_xml = ET.SubElement(settings_xml, "setting", key = key) - setting_xml.text = str(stack.getProperty(key, "value")) - - # Add one to the index as we haven't incremented the last iteration. - index += 1 - nodes_to_add = set() - - for node in added_nodes: - # Check the parents of the nodes with mesh_data and ensure that they are also added. - parent_node = node.getParent() - while parent_node is not None: - if parent_node.callDecoration("isGroup"): - nodes_to_add.add(parent_node) - parent_node = parent_node.getParent() - else: - parent_node = None - - # Sort all the nodes by depth (so nodes with the highest depth are done first) - sorted_nodes_to_add = sorted(nodes_to_add, key=lambda node: node.getDepth(), reverse = True) - - # We have already saved the nodes with mesh data, but now we also want to save nodes required for the scene - for node in sorted_nodes_to_add: - object = ET.SubElement(resources, "object", id=str(index + 1), type="model") - components = ET.SubElement(object, "components") - for child in node.getChildren(): - if child in added_nodes: - component = ET.SubElement(components, "component", objectid = str(added_nodes.index(child) + 1), transform = self._convertMatrixToString(child.getLocalTransformation())) - index += 1 - added_nodes.append(node) - - # Create a transformation Matrix to convert from our worldspace into 3MF. - # First step: flip the y and z axis. + savitar_scene = Savitar.Scene() transformation_matrix = Matrix() transformation_matrix._data[1, 1] = 0 transformation_matrix._data[1, 2] = -1 @@ -186,14 +142,23 @@ class ThreeMFWriter(MeshWriter): translation_matrix.setByTranslation(translation_vector) transformation_matrix.preMultiply(translation_matrix) - # Find out what the final build items are and add them. - for node in added_nodes: - if node.getParent().callDecoration("isGroup") is None: - node_matrix = node.getLocalTransformation() - ET.SubElement(build, "item", objectid = str(added_nodes.index(node) + 1), transform = self._convertMatrixToString(node_matrix.preMultiply(transformation_matrix))) + root_node = UM.Application.getInstance().getController().getScene().getRoot() + for node in nodes: + if node == root_node: + for root_child in node.getChildren(): + savitar_node = self._convertUMNodeToSavitarNode(root_child, transformation_matrix) + if savitar_node: + savitar_scene.addSceneNode(savitar_node) + else: + savitar_node = self._convertUMNodeToSavitarNode(node, transformation_matrix) + if savitar_node: + savitar_scene.addSceneNode(savitar_node) - archive.writestr(model_file, b' \n' + ET.tostring(model)) + parser = Savitar.ThreeMFParser() + scene_string = parser.sceneToString(savitar_scene).encode('utf-8') + + archive.writestr(model_file, scene_string) archive.writestr(content_types_file, b' \n' + ET.tostring(content_types)) archive.writestr(relations_file, b' \n' + ET.tostring(relations_element)) except Exception as e: From 3d01d7bc548476003351ee6aa50c43862aceaa54 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 6 Feb 2017 14:26:02 +0100 Subject: [PATCH 017/128] Removed unneeded bytearray to string conversion --- plugins/3MFWriter/ThreeMFWriter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py index f7ea04ed0d..00bb8d9942 100644 --- a/plugins/3MFWriter/ThreeMFWriter.py +++ b/plugins/3MFWriter/ThreeMFWriter.py @@ -156,7 +156,7 @@ class ThreeMFWriter(MeshWriter): savitar_scene.addSceneNode(savitar_node) parser = Savitar.ThreeMFParser() - scene_string = parser.sceneToString(savitar_scene).encode('utf-8') + scene_string = parser.sceneToString(savitar_scene) archive.writestr(model_file, scene_string) archive.writestr(content_types_file, b' \n' + ET.tostring(content_types)) From 7681261b03f29e95e2b7055d05fc2b20e5041c4a Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Tue, 7 Feb 2017 09:55:15 +0000 Subject: [PATCH 018/128] Added anchor_skin_shrink_distance. Also, renamed anchor_skin_distance to anchor_skin_expand_distance. The idea behind the shrink distance is that when the slope of the model surface is steep, very slim skin areas are created close to the wall and if they are expanded we end up with skin inside the infill that isn't required. So by shrinking the skin polygons slightly first, the very slim areas are removed before the skin is expanded. The amount to shrink defaults to half the wall width which appears to work OK but may as well make it a setting so that it can be tweaked if required. --- resources/definitions/fdmprinter.def.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index bbb9d14e8d..a45a80b544 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1270,9 +1270,9 @@ "enabled": "anchor_skins_in_infill", "settable_per_mesh": true }, - "anchor_skin_distance": + "anchor_skin_expand_distance": { - "label": "Anchor Skin Distance", + "label": "Anchor Skin Expand Distance", "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", "unit": "mm", "type": "float", @@ -1281,6 +1281,18 @@ "minimum_value": "0", "enabled": "anchor_skins_in_infill", "settable_per_mesh": true + }, + "anchor_skin_shrink_distance": + { + "label": "Anchor Skin Shrink Distance", + "description": "The distance the skins are shrunk before they are expanded. Shrinking the skins slightly first removes the very narrow skin areas that are created when the model surface has a slope close to the vertical.", + "unit": "mm", + "type": "float", + "default_value": 0, + "value": "wall_thickness * 0.5", + "minimum_value": "0", + "enabled": "anchor_skins_in_infill", + "settable_per_mesh": true } } } From 3e8789ae48247bb45a17d103059b656ac98a818e Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Thu, 9 Feb 2017 11:35:54 +0000 Subject: [PATCH 019/128] Renamed anchor_skin settings to equivalent expand_skins settings. Expand skins describes the operation better, the fact that the skins end up getting anchored in the infill is just one benefit of the expansion. --- resources/definitions/fdmprinter.def.json | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index a45a80b544..ce9cd7a0c5 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1241,57 +1241,57 @@ "default_value": 0, "settable_per_mesh": true }, - "anchor_skins_in_infill": + "expand_skins_into_infill": { - "label": "Anchor Skins In Infill", + "label": "Expand Skins Into Infill", "description": "Expand skin areas into the infill behind walls. By default, skins stop under the wall lines that surround infill but this can lead to holes appearing when the infill density is low. This setting extends the skins beyond the wall lines so that the skins become anchored in the infill.", "type": "bool", "default_value": false, "settable_per_mesh": true, "children": { - "anchor_upper_skin_in_infill": + "expand_upper_skins": { - "label": "Anchor Upper Skin In Infill", + "label": "Expand Upper Skins", "description": "Expand upper skin areas (areas with air above) so that they are anchored by the infill layers above and below.", "type": "bool", "default_value": false, - "value": "anchor_skins_in_infill", - "enabled": "anchor_skins_in_infill", + "value": "expand_skins_into_infill", + "enabled": "expand_skins_into_infill", "settable_per_mesh": true }, - "anchor_lower_skin_in_infill": + "expand_lower_skins": { - "label": "Anchor Lower Skin In Infill", + "label": "Expand Lower Skins", "description": "Expand lower skin areas (areas with air below) so that they are anchored by the infill layers above and below.", "type": "bool", "default_value": false, - "value": "anchor_skins_in_infill", - "enabled": "anchor_skins_in_infill", + "value": "expand_skins_into_infill", + "enabled": "expand_skins_into_infill", "settable_per_mesh": true }, - "anchor_skin_expand_distance": + "expand_skins_expand_distance": { - "label": "Anchor Skin Expand Distance", + "label": "Expand Distance", "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", "unit": "mm", "type": "float", "default_value": 1.0, "value": "infill_line_distance * 1.4", "minimum_value": "0", - "enabled": "anchor_skins_in_infill", + "enabled": "expand_skins_into_infill", "settable_per_mesh": true }, - "anchor_skin_shrink_distance": + "expand_skins_shrink_distance": { - "label": "Anchor Skin Shrink Distance", + "label": "Shrink Distance", "description": "The distance the skins are shrunk before they are expanded. Shrinking the skins slightly first removes the very narrow skin areas that are created when the model surface has a slope close to the vertical.", "unit": "mm", "type": "float", "default_value": 0, "value": "wall_thickness * 0.5", "minimum_value": "0", - "enabled": "anchor_skins_in_infill", + "enabled": "expand_skins_into_infill", "settable_per_mesh": true } } From c1a770877fe3d834f4370ad6b0d18784aa54ae98 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Sun, 12 Feb 2017 17:48:11 +0000 Subject: [PATCH 020/128] Add "Skin " prefix to "Expand Distance" and "Shrink Distance" labels. It's useful to know what is being expanded/shrunk when those labels are cited (for example if you are switching profiles without saving changes). --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ce9cd7a0c5..9fe25d7066 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1272,7 +1272,7 @@ }, "expand_skins_expand_distance": { - "label": "Expand Distance", + "label": "Skin Expand Distance", "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", "unit": "mm", "type": "float", @@ -1284,7 +1284,7 @@ }, "expand_skins_shrink_distance": { - "label": "Shrink Distance", + "label": "Skin Shrink Distance", "description": "The distance the skins are shrunk before they are expanded. Shrinking the skins slightly first removes the very narrow skin areas that are created when the model surface has a slope close to the vertical.", "unit": "mm", "type": "float", From 58e15848ebf3bf356c4b042eec2dc6c0ce60357e Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 20 Feb 2017 13:44:55 +0100 Subject: [PATCH 021/128] feat: machine_nozzle_temp_enabled; refactor: let settings depend on it (rather than on gcode flavor) (CURA-3101) --- resources/definitions/fdmprinter.def.json | 38 ++++++++++++++++------- resources/definitions/ultimaker2.def.json | 3 ++ 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 68f8040df9..100bbcfa07 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -93,6 +93,7 @@ "description": "Whether to wait until the nozzle temperature is reached at the start.", "default_value": true, "type": "bool", + "enabled": "machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": false, "settable_per_meshgroup": false @@ -103,6 +104,7 @@ "description": "Whether to include nozzle temperature commands at the start of the gcode. When the start_gcode already contains nozzle temperature commands Cura frontend will automatically disable this setting.", "default_value": true, "type": "bool", + "enabled": "machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": false, "settable_per_meshgroup": false @@ -249,6 +251,17 @@ "settable_per_extruder": true, "settable_per_meshgroup": false }, + "machine_nozzle_temp_enabled": + { + "label": "Enable Nozzle Temperature Control", + "description": "Whether to control temperature from Cura. Turn this off to control nozzle temperature from outside of Cura.", + "default_value": true, + "value": "machine_gcode_flavor != \"UltiGCode\"", + "type": "bool", + "settable_per_mesh": false, + "settable_per_extruder": true, + "settable_per_meshgroup": false + }, "machine_nozzle_heat_up_speed": { "label": "Heat up speed", @@ -256,6 +269,7 @@ "default_value": 2.0, "unit": "°C/s", "type": "float", + "enabled": "machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -266,6 +280,7 @@ "default_value": 2.0, "unit": "°C/s", "type": "float", + "enabled": "machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -276,6 +291,7 @@ "default_value": 50.0, "unit": "s", "type": "float", + "enabled": "machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -1260,7 +1276,7 @@ "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", "type": "bool", "default_value": false, - "enabled": "False", + "enabled": "machine_nozzle_temp_enabled and False", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -1271,14 +1287,14 @@ "unit": "°C", "type": "float", "default_value": 210, - "enabled": false, + "enabled": "machine_nozzle_temp_enabled", "settable_per_extruder": true, "minimum_value": "-273.15" }, "material_print_temperature": { "label": "Printing Temperature", - "description": "The temperature used for printing. If this is 0, the extruder will not heat up for this print.", + "description": "The temperature used for printing.", "unit": "°C", "type": "float", "default_value": 210, @@ -1286,7 +1302,7 @@ "minimum_value": "-273.15", "minimum_value_warning": "0", "maximum_value_warning": "260", - "enabled": "not (material_flow_dependent_temperature) and machine_gcode_flavor != \"UltiGCode\"", + "enabled": "machine_nozzle_temp_enabled and not (material_flow_dependent_temperature)", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -1301,7 +1317,7 @@ "minimum_value": "-273.15", "minimum_value_warning": "0", "maximum_value_warning": "260", - "enabled": "machine_gcode_flavor != \"UltiGCode\"", + "enabled": "machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -1316,7 +1332,7 @@ "minimum_value": "-273.15", "minimum_value_warning": "material_standby_temperature", "maximum_value_warning": "material_print_temperature", - "enabled": "machine_gcode_flavor != \"UltiGCode\"", + "enabled": "machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -1331,7 +1347,7 @@ "minimum_value": "-273.15", "minimum_value_warning": "material_standby_temperature", "maximum_value_warning": "material_print_temperature", - "enabled": "machine_gcode_flavor != \"UltiGCode\"", + "enabled": "machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -1342,8 +1358,7 @@ "unit": "[[mm³,°C]]", "type": "str", "default_value": "[[3.5,200],[7.0,240]]", - "enabled": "False", - "comments": "old enabled function: material_flow_dependent_temperature", + "enabled": "False and machine_nozzle_temp_enabled and material_flow_dependent_temperature", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -1357,8 +1372,7 @@ "minimum_value": "0", "maximum_value_warning": "10.0", "maximum_value": "machine_nozzle_heat_up_speed", - "enabled": "False", - "comments": "old enabled function: material_flow_dependent_temperature or machine_extruder_count > 1", + "enabled": "material_flow_dependent_temperature or (machine_extruder_count > 1 and material_final_print_temperature != material_print_temperature)", "settable_per_mesh": false, "settable_per_extruder": true }, @@ -1565,7 +1579,7 @@ "minimum_value": "-273.15", "minimum_value_warning": "0", "maximum_value_warning": "260", - "enabled": "machine_extruder_count > 1 and machine_gcode_flavor != \"UltiGCode\"", + "enabled": "machine_extruder_count > 1 and machine_nozzle_temp_enabled", "settable_per_mesh": false, "settable_per_extruder": true }, diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json index 84e09113f3..a52075fe5e 100644 --- a/resources/definitions/ultimaker2.def.json +++ b/resources/definitions/ultimaker2.def.json @@ -100,6 +100,9 @@ }, "machine_acceleration": { "default_value": 3000 + }, + "machine_nozzle_temp_enabled": { + "default_value": false } } } From b0c8a4df7a995520665e701f2f829a69ebbfba14 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 23 Feb 2017 14:41:18 +0100 Subject: [PATCH 022/128] Removed debug log. CURA-2729 --- cura/BuildVolume.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index adc2982aa8..477f3d462d 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -397,8 +397,6 @@ class BuildVolume(SceneNode): extra_z = self._global_container_stack.getProperty("retraction_hop", "value") if extra_z != self._extra_z_clearance: self._extra_z_clearance = extra_z - from UM.Logger import Logger - Logger.log("d", " ### Extra z clearance changed: %s" % extra_z) ## Update the build volume visualization def _onStackChanged(self): From f885f3e1dd1a0bd0cf8ee79f59d0799fe960075b Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 23 Feb 2017 16:49:28 +0100 Subject: [PATCH 023/128] Testing CameraAnimation change CURA-3334 --- cura/CameraAnimation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cura/CameraAnimation.py b/cura/CameraAnimation.py index 3202f303d8..99aa6231db 100644 --- a/cura/CameraAnimation.py +++ b/cura/CameraAnimation.py @@ -15,6 +15,7 @@ class CameraAnimation(QVariantAnimation): self._camera_tool = None self.setDuration(500) self.setEasingCurve(QEasingCurve.InOutQuad) + self.valueChanged.connect(self._onValueChanged) def setCameraTool(self, camera_tool): self._camera_tool = camera_tool @@ -25,5 +26,10 @@ class CameraAnimation(QVariantAnimation): def setTarget(self, target): self.setEndValue(QVector3D(target.x, target.y, target.z)) - def updateCurrentValue(self, value): + # def updateCurrentValue(self, value): + # Logger.log("d", " ### value: %s" % str(value)) + # self._camera_tool.setOrigin(Vector(value.x(), value.y(), value.z())) + + def _onValueChanged(self, value): + Logger.log("d", " _onValueChanged value: %s" % str(value)) self._camera_tool.setOrigin(Vector(value.x(), value.y(), value.z())) From 4469e5ce661823e8496d192254fb28cd5d4df8a6 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 8 Feb 2017 13:14:53 +0100 Subject: [PATCH 024/128] Update cartesio.def.json --- resources/definitions/cartesio.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/cartesio.def.json b/resources/definitions/cartesio.def.json index ba32a2bf9c..ca1f64a0f5 100644 --- a/resources/definitions/cartesio.def.json +++ b/resources/definitions/cartesio.def.json @@ -36,7 +36,7 @@ "machine_width": { "default_value": 430 }, "machine_name": { "default_value": "Cartesio" }, "machine_start_gcode": { - "default_value": "M92 E162\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\nM140 S{material_bed_temperature}\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature}\nM104 S120 T1\nM109 S{material_print_temperature} T0\nM104 S21 T1\n\nM117 purging nozzle....\n\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-{retraction_amount} F600\nG92 E0\n\nM117 wiping nozzle....\n\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM117 Printing .....\n\nG1 E1 F100\nG92 E-1\n" + "default_value": "M92 E165\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\nM140 S{material_bed_temperature}\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature}\nM104 S120 T1\nM109 S{material_print_temperature} T0\nM104 S21 T1\n\nM117 purging nozzle....\n\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-{retraction_amount} F600\nG92 E0\n\nM117 wiping nozzle....\n\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM117 Printing .....\n\nG1 E1 F100\nG92 E-1\n" }, "machine_end_gcode": { "default_value": "; -- END GCODE --\nM106 S255\nM140 S5\nM104 S5 T0\nM104 S5 T1\nG1 X20.0 Y260.0 F6000\nG4 S7\nM84\nG4 S90\nM107\nM42 P12 S0\nM42 P13 S0\nM84\n; -- end of END GCODE --" From 7a25930166447c4262395c010e5219443d2ccbe9 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 8 Feb 2017 14:52:04 +0100 Subject: [PATCH 025/128] Update cartesio.def.json --- resources/definitions/cartesio.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/cartesio.def.json b/resources/definitions/cartesio.def.json index ca1f64a0f5..c86a8a90f1 100644 --- a/resources/definitions/cartesio.def.json +++ b/resources/definitions/cartesio.def.json @@ -36,7 +36,7 @@ "machine_width": { "default_value": 430 }, "machine_name": { "default_value": "Cartesio" }, "machine_start_gcode": { - "default_value": "M92 E165\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\nM140 S{material_bed_temperature}\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature}\nM104 S120 T1\nM109 S{material_print_temperature} T0\nM104 S21 T1\n\nM117 purging nozzle....\n\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-{retraction_amount} F600\nG92 E0\n\nM117 wiping nozzle....\n\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM117 Printing .....\n\nG1 E1 F100\nG92 E-1\n" + "default_value": "M92 E167\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\nM140 S{material_bed_temperature}\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature}\nM104 S120 T1\nM109 S{material_print_temperature} T0\nM104 S21 T1\n\nM117 purging nozzle....\n\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-{retraction_amount} F600\nG92 E0\n\nM117 wiping nozzle....\n\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM117 Printing .....\n\nG1 E1 F100\nG92 E-1\n" }, "machine_end_gcode": { "default_value": "; -- END GCODE --\nM106 S255\nM140 S5\nM104 S5 T0\nM104 S5 T1\nG1 X20.0 Y260.0 F6000\nG4 S7\nM84\nG4 S90\nM107\nM42 P12 S0\nM42 P13 S0\nM84\n; -- end of END GCODE --" From 17abe51d0a870cff3ffa39ac65c9d7c89c0a2ca0 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:40:55 +0100 Subject: [PATCH 026/128] Update cartesio.def.json --- resources/definitions/cartesio.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/cartesio.def.json b/resources/definitions/cartesio.def.json index c86a8a90f1..5f75ef70e1 100644 --- a/resources/definitions/cartesio.def.json +++ b/resources/definitions/cartesio.def.json @@ -36,7 +36,7 @@ "machine_width": { "default_value": 430 }, "machine_name": { "default_value": "Cartesio" }, "machine_start_gcode": { - "default_value": "M92 E167\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\nM140 S{material_bed_temperature}\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature}\nM104 S120 T1\nM109 S{material_print_temperature} T0\nM104 S21 T1\n\nM117 purging nozzle....\n\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-{retraction_amount} F600\nG92 E0\n\nM117 wiping nozzle....\n\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM117 Printing .....\n\nG1 E1 F100\nG92 E-1\n" + "default_value": "M92 E159\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\nM140 S{material_bed_temperature}\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature}\nM104 S120 T1\nM109 S{material_print_temperature} T0\nM104 S21 T1\n\nM117 purging nozzle....\n\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-{retraction_amount} F600\nG92 E0\n\nM117 wiping nozzle....\n\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM117 Printing .....\n\nG1 E1 F100\nG92 E-1\n" }, "machine_end_gcode": { "default_value": "; -- END GCODE --\nM106 S255\nM140 S5\nM104 S5 T0\nM104 S5 T1\nG1 X20.0 Y260.0 F6000\nG4 S7\nM84\nG4 S90\nM107\nM42 P12 S0\nM42 P13 S0\nM84\n; -- end of END GCODE --" From bebc5be17d7f4ad3bea5af1a51421223023238bd Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:44:23 +0100 Subject: [PATCH 027/128] Update cartesio_0.25.inst.cfg --- resources/variants/cartesio_0.25.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/variants/cartesio_0.25.inst.cfg b/resources/variants/cartesio_0.25.inst.cfg index 455fd7ee56..dd698452d8 100644 --- a/resources/variants/cartesio_0.25.inst.cfg +++ b/resources/variants/cartesio_0.25.inst.cfg @@ -15,7 +15,7 @@ wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 25 +infill_sparse_density = 20 infill_overlap = -50 skin_overlap = -40 From ad0d95c8638af22510918760b215129e58c70010 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:44:39 +0100 Subject: [PATCH 028/128] Update cartesio_0.4.inst.cfg --- resources/variants/cartesio_0.4.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/variants/cartesio_0.4.inst.cfg b/resources/variants/cartesio_0.4.inst.cfg index 44a09c706f..900a34718c 100644 --- a/resources/variants/cartesio_0.4.inst.cfg +++ b/resources/variants/cartesio_0.4.inst.cfg @@ -16,7 +16,7 @@ wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 25 +infill_sparse_density = 20 infill_overlap = -50 skin_overlap = -40 From 031714d4f0375c52d0bcf2acb1f25435019783d2 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:44:55 +0100 Subject: [PATCH 029/128] Update cartesio_0.8.inst.cfg --- resources/variants/cartesio_0.8.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/variants/cartesio_0.8.inst.cfg b/resources/variants/cartesio_0.8.inst.cfg index 772ede33fb..a3af9b3020 100644 --- a/resources/variants/cartesio_0.8.inst.cfg +++ b/resources/variants/cartesio_0.8.inst.cfg @@ -15,7 +15,7 @@ wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 25 +infill_sparse_density = 20 infill_overlap = -50 skin_overlap = -40 From cf6c99c5b1990a5638db6bd92407f8e4e58cf38d Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:55:35 +0100 Subject: [PATCH 030/128] Update cartesio.def.json --- resources/definitions/cartesio.def.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/definitions/cartesio.def.json b/resources/definitions/cartesio.def.json index 5f75ef70e1..9e0ad6e228 100644 --- a/resources/definitions/cartesio.def.json +++ b/resources/definitions/cartesio.def.json @@ -9,7 +9,6 @@ "manufacturer": "Cartesio bv", "category": "Other", "file_formats": "text/x-gcode", - "has_materials": true, "has_machine_materials": true, "has_variants": true, "variants_name": "Nozzle size", @@ -31,10 +30,9 @@ "machine_heated_bed": { "default_value": true }, "machine_center_is_zero": { "default_value": false }, "machine_height": { "default_value": 400 }, - "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, "machine_depth": { "default_value": 270 }, "machine_width": { "default_value": 430 }, - "machine_name": { "default_value": "Cartesio" }, + "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, "machine_start_gcode": { "default_value": "M92 E159\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\nM140 S{material_bed_temperature}\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature}\nM104 S120 T1\nM109 S{material_print_temperature} T0\nM104 S21 T1\n\nM117 purging nozzle....\n\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-{retraction_amount} F600\nG92 E0\n\nM117 wiping nozzle....\n\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM117 Printing .....\n\nG1 E1 F100\nG92 E-1\n" }, From 7d41ca7b336082c978809e11c703a4d67947a50b Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:56:57 +0100 Subject: [PATCH 031/128] Update cartesio_extruder_1.def.json --- resources/extruders/cartesio_extruder_1.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_1.def.json b/resources/extruders/cartesio_extruder_1.def.json index ee09b6d363..5be8abca06 100644 --- a/resources/extruders/cartesio_extruder_1.def.json +++ b/resources/extruders/cartesio_extruder_1.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 24.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 T0 S120\n;end extruder_1\n" From 7b68b27b4aadc9944120384708a954f4a011e7ff Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:57:26 +0100 Subject: [PATCH 032/128] Update cartesio_extruder_1.def.json --- resources/extruders/cartesio_extruder_1.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_1.def.json b/resources/extruders/cartesio_extruder_1.def.json index 5be8abca06..fe27d4626b 100644 --- a/resources/extruders/cartesio_extruder_1.def.json +++ b/resources/extruders/cartesio_extruder_1.def.json @@ -19,7 +19,7 @@ "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 T0 S120\n;end extruder_1\n" + "default_value": "\nM104 T1 S120\n;end extruder_1\n" } } } From 8022613a7be4bbee901da7b8c269553ca92fb37a Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:58:12 +0100 Subject: [PATCH 033/128] Update cartesio_extruder_0.def.json --- resources/extruders/cartesio_extruder_0.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_0.def.json b/resources/extruders/cartesio_extruder_0.def.json index 8f71c68c43..7598fc1b30 100644 --- a/resources/extruders/cartesio_extruder_0.def.json +++ b/resources/extruders/cartesio_extruder_0.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "M117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S270 T0 ;wait for nozzle to heat up\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S270 T0 ;wait for nozzle to heat up\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 S160 T0\n;end extruder_0\nM117 temp is {material_print_temp}" From 97ba04acc005b4f34bd22ac6f91fabb3aed3d856 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:58:31 +0100 Subject: [PATCH 034/128] Update cartesio_extruder_1.def.json --- resources/extruders/cartesio_extruder_1.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_1.def.json b/resources/extruders/cartesio_extruder_1.def.json index fe27d4626b..f6a878513b 100644 --- a/resources/extruders/cartesio_extruder_1.def.json +++ b/resources/extruders/cartesio_extruder_1.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 24.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 T1 S120\n;end extruder_1\n" From b3acfb31f9e4de8931367494b3652db56d7affea Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:58:48 +0100 Subject: [PATCH 035/128] Update cartesio_extruder_1.def.json --- resources/extruders/cartesio_extruder_1.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_1.def.json b/resources/extruders/cartesio_extruder_1.def.json index f6a878513b..fe27d4626b 100644 --- a/resources/extruders/cartesio_extruder_1.def.json +++ b/resources/extruders/cartesio_extruder_1.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 24.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 T1 S120\n;end extruder_1\n" From 67d3e59ea4ef29b25192e4a27c6cb7faecf8c851 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:58:58 +0100 Subject: [PATCH 036/128] Update cartesio_extruder_0.def.json --- resources/extruders/cartesio_extruder_0.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_0.def.json b/resources/extruders/cartesio_extruder_0.def.json index 7598fc1b30..b11982e84f 100644 --- a/resources/extruders/cartesio_extruder_0.def.json +++ b/resources/extruders/cartesio_extruder_0.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S270 T0 ;wait for nozzle to heat up\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S270 T0 ;wait for nozzle to heat up\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 S160 T0\n;end extruder_0\nM117 temp is {material_print_temp}" From a11ef02468226660ba71002d9197d690fdffd5ca Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:59:32 +0100 Subject: [PATCH 037/128] Update cartesio_extruder_0.def.json --- resources/extruders/cartesio_extruder_0.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_0.def.json b/resources/extruders/cartesio_extruder_0.def.json index b11982e84f..43b6a08aa7 100644 --- a/resources/extruders/cartesio_extruder_0.def.json +++ b/resources/extruders/cartesio_extruder_0.def.json @@ -19,7 +19,7 @@ "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S270 T0 ;wait for nozzle to heat up\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 S160 T0\n;end extruder_0\nM117 temp is {material_print_temp}" + "default_value": "\nM104 S155 T0\n;end extruder_0\nM117 temp is {material_print_temp}" } } } From 0c0f5c7e57b8e49485618b0f1247b815739e7cab Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:59:45 +0100 Subject: [PATCH 038/128] Update cartesio_extruder_1.def.json --- resources/extruders/cartesio_extruder_1.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_1.def.json b/resources/extruders/cartesio_extruder_1.def.json index fe27d4626b..84f4ee5a7c 100644 --- a/resources/extruders/cartesio_extruder_1.def.json +++ b/resources/extruders/cartesio_extruder_1.def.json @@ -19,7 +19,7 @@ "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 T1 S120\n;end extruder_1\n" + "default_value": "\nM104 T1 S155\n;end extruder_1\n" } } } From c7b7ec97233ec707129ef54e5b835c31ace233c2 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 09:59:55 +0100 Subject: [PATCH 039/128] Update cartesio_extruder_2.def.json --- resources/extruders/cartesio_extruder_2.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_2.def.json b/resources/extruders/cartesio_extruder_2.def.json index 9d4bfd8c42..b7c382538a 100644 --- a/resources/extruders/cartesio_extruder_2.def.json +++ b/resources/extruders/cartesio_extruder_2.def.json @@ -19,7 +19,7 @@ "default_value": "\n;start extruder_2\nM117 Heating nozzles....\nM104 S190 T2\nG1 X70 Y20 F9000\nM109 S190 T2\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 T2 S120\n;end extruder_2\n" + "default_value": "\nM104 T2 S155\n;end extruder_2\n" } } } From e5442bbe9e394921345d5ba4afb1690bc3056740 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 10:00:04 +0100 Subject: [PATCH 040/128] Update cartesio_extruder_3.def.json --- resources/extruders/cartesio_extruder_3.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_3.def.json b/resources/extruders/cartesio_extruder_3.def.json index cdcb392876..ec400103aa 100644 --- a/resources/extruders/cartesio_extruder_3.def.json +++ b/resources/extruders/cartesio_extruder_3.def.json @@ -19,7 +19,7 @@ "default_value": "\n;start extruder_3\nM117 Heating nozzles....\nM104 S190 T3\nG1 X70 Y20 F9000\nM109 S190 T3\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 T3 S120\n;end extruder_3\n" + "default_value": "\nM104 T3 S155\n;end extruder_3\n" } } } From 39f631439533012c1930be4753ee97d9eb8e05b3 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 10:00:44 +0100 Subject: [PATCH 041/128] Update cartesio_extruder_1.def.json --- resources/extruders/cartesio_extruder_1.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_1.def.json b/resources/extruders/cartesio_extruder_1.def.json index 84f4ee5a7c..b2bae26983 100644 --- a/resources/extruders/cartesio_extruder_1.def.json +++ b/resources/extruders/cartesio_extruder_1.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 24.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1 ;wait for nozzle to heat up\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 T1 S155\n;end extruder_1\n" From 596fcc09b45cc3167dfbef7df321760dc4523000 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 10:01:09 +0100 Subject: [PATCH 042/128] Update cartesio_extruder_0.def.json --- resources/extruders/cartesio_extruder_0.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_0.def.json b/resources/extruders/cartesio_extruder_0.def.json index 43b6a08aa7..f0a24bd938 100644 --- a/resources/extruders/cartesio_extruder_0.def.json +++ b/resources/extruders/cartesio_extruder_0.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S270 T0 ;wait for nozzle to heat up\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S270 T0\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 S155 T0\n;end extruder_0\nM117 temp is {material_print_temp}" From 58c50a702211308b2603f4ee273e08a244ccdd47 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 10:01:37 +0100 Subject: [PATCH 043/128] Update cartesio_extruder_0.def.json --- resources/extruders/cartesio_extruder_0.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_0.def.json b/resources/extruders/cartesio_extruder_0.def.json index f0a24bd938..ed23b438ab 100644 --- a/resources/extruders/cartesio_extruder_0.def.json +++ b/resources/extruders/cartesio_extruder_0.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S270 T0\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S190 T0\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 S155 T0\n;end extruder_0\nM117 temp is {material_print_temp}" From 2f9cbd38e914d4510ae4daf9d00eba09835c20f8 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 10:02:22 +0100 Subject: [PATCH 044/128] Update cartesio_extruder_0.def.json --- resources/extruders/cartesio_extruder_0.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_0.def.json b/resources/extruders/cartesio_extruder_0.def.json index ed23b438ab..f01562ed08 100644 --- a/resources/extruders/cartesio_extruder_0.def.json +++ b/resources/extruders/cartesio_extruder_0.def.json @@ -16,7 +16,7 @@ "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S190 T0\nT0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S190 T0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { "default_value": "\nM104 S155 T0\n;end extruder_0\nM117 temp is {material_print_temp}" From cadbecd1d104cb96d10d786bf90a0eec5c5df1c1 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 10:05:15 +0100 Subject: [PATCH 045/128] Update cartesio_0.4.inst.cfg --- resources/variants/cartesio_0.4.inst.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/variants/cartesio_0.4.inst.cfg b/resources/variants/cartesio_0.4.inst.cfg index 900a34718c..4788e7c9fc 100644 --- a/resources/variants/cartesio_0.4.inst.cfg +++ b/resources/variants/cartesio_0.4.inst.cfg @@ -20,7 +20,6 @@ infill_sparse_density = 20 infill_overlap = -50 skin_overlap = -40 - material_print_temperature_layer_0 = =round(material_print_temperature) material_initial_print_temperature = =round(material_print_temperature) material_diameter = 1.75 From f123aec8bda8b8acbe235e662b0bf1a5a4b9d244 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 12:59:00 +0100 Subject: [PATCH 046/128] Update cartesio_0.25.inst.cfg --- resources/variants/cartesio_0.25.inst.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/variants/cartesio_0.25.inst.cfg b/resources/variants/cartesio_0.25.inst.cfg index dd698452d8..f76f429827 100644 --- a/resources/variants/cartesio_0.25.inst.cfg +++ b/resources/variants/cartesio_0.25.inst.cfg @@ -11,6 +11,7 @@ type = variant machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 1.05 +wall_thickness = =(wall_line_width_0 + ((wall_line_count - 1) * wall_line_width_x)) wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = From 047a078fb1daafe14a4d2c5fd99f81a720c4b61a Mon Sep 17 00:00:00 2001 From: MaukCC Date: Wed, 15 Feb 2017 14:02:39 +0100 Subject: [PATCH 047/128] Update cartesio_0.25.inst.cfg --- resources/variants/cartesio_0.25.inst.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/variants/cartesio_0.25.inst.cfg b/resources/variants/cartesio_0.25.inst.cfg index f76f429827..dd698452d8 100644 --- a/resources/variants/cartesio_0.25.inst.cfg +++ b/resources/variants/cartesio_0.25.inst.cfg @@ -11,7 +11,6 @@ type = variant machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 1.05 -wall_thickness = =(wall_line_width_0 + ((wall_line_count - 1) * wall_line_width_x)) wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = From c96e23e51cdde75855d51a01c4ce921b3e3399fc Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 09:43:42 +0100 Subject: [PATCH 048/128] Update cartesio_0.4.inst.cfg --- resources/variants/cartesio_0.4.inst.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/variants/cartesio_0.4.inst.cfg b/resources/variants/cartesio_0.4.inst.cfg index 4788e7c9fc..679cd2db36 100644 --- a/resources/variants/cartesio_0.4.inst.cfg +++ b/resources/variants/cartesio_0.4.inst.cfg @@ -12,6 +12,7 @@ type = variant machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 0.8 +wall_thickness = 1.2 wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = From d4f4ada2f0aea7dc53b973465b0e8f27dc426f04 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 09:44:06 +0100 Subject: [PATCH 049/128] Update cartesio_0.4.inst.cfg --- resources/variants/cartesio_0.4.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/variants/cartesio_0.4.inst.cfg b/resources/variants/cartesio_0.4.inst.cfg index 679cd2db36..f1030ab309 100644 --- a/resources/variants/cartesio_0.4.inst.cfg +++ b/resources/variants/cartesio_0.4.inst.cfg @@ -17,7 +17,7 @@ wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 20 +infill_sparse_density = 25 infill_overlap = -50 skin_overlap = -40 From 264b488b31057f7a45b2933b1a7cbf1e39fa25a3 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 09:44:24 +0100 Subject: [PATCH 050/128] Update cartesio_0.25.inst.cfg --- resources/variants/cartesio_0.25.inst.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/variants/cartesio_0.25.inst.cfg b/resources/variants/cartesio_0.25.inst.cfg index dd698452d8..305d33e0f2 100644 --- a/resources/variants/cartesio_0.25.inst.cfg +++ b/resources/variants/cartesio_0.25.inst.cfg @@ -11,11 +11,12 @@ type = variant machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 1.05 +wall_thickness = 1 wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 20 +infill_sparse_density = 25 infill_overlap = -50 skin_overlap = -40 From 2ba70c845355b675ae774bb6f574bd8e09e201e1 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 09:44:49 +0100 Subject: [PATCH 051/128] Update cartesio_0.8.inst.cfg --- resources/variants/cartesio_0.8.inst.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/variants/cartesio_0.8.inst.cfg b/resources/variants/cartesio_0.8.inst.cfg index a3af9b3020..d19adcf4de 100644 --- a/resources/variants/cartesio_0.8.inst.cfg +++ b/resources/variants/cartesio_0.8.inst.cfg @@ -11,11 +11,12 @@ type = variant machine_nozzle_size = 0.8 machine_nozzle_tip_outer_diameter = 1.05 +wall_thickness = 2.4 wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 20 +infill_sparse_density = 15 infill_overlap = -50 skin_overlap = -40 From a4c65fda674fdfbb24ee8439f8470079d3224b22 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 10:06:59 +0100 Subject: [PATCH 052/128] Update cartesio_0.8.inst.cfg --- resources/variants/cartesio_0.8.inst.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/variants/cartesio_0.8.inst.cfg b/resources/variants/cartesio_0.8.inst.cfg index d19adcf4de..4e4d5082e0 100644 --- a/resources/variants/cartesio_0.8.inst.cfg +++ b/resources/variants/cartesio_0.8.inst.cfg @@ -11,6 +11,8 @@ type = variant machine_nozzle_size = 0.8 machine_nozzle_tip_outer_diameter = 1.05 +infill_line_width = 0.9 + wall_thickness = 2.4 wall_0_inset = -0.05 fill_perimeter_gaps = nowhere From 40f48f78253d9eaf05f89cdbaad0ed9bc8d6d878 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 10:07:38 +0100 Subject: [PATCH 053/128] Update cartesio_0.4.inst.cfg --- resources/variants/cartesio_0.4.inst.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/variants/cartesio_0.4.inst.cfg b/resources/variants/cartesio_0.4.inst.cfg index f1030ab309..72ba689d91 100644 --- a/resources/variants/cartesio_0.4.inst.cfg +++ b/resources/variants/cartesio_0.4.inst.cfg @@ -12,6 +12,8 @@ type = variant machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 0.8 +infill_line_width = 0.5 + wall_thickness = 1.2 wall_0_inset = -0.05 fill_perimeter_gaps = nowhere From cb9e8b57de03a5a186b57685f4057dec00e0df6d Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 10:08:13 +0100 Subject: [PATCH 054/128] Update cartesio_0.25.inst.cfg --- resources/variants/cartesio_0.25.inst.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/variants/cartesio_0.25.inst.cfg b/resources/variants/cartesio_0.25.inst.cfg index 305d33e0f2..80423b2502 100644 --- a/resources/variants/cartesio_0.25.inst.cfg +++ b/resources/variants/cartesio_0.25.inst.cfg @@ -11,6 +11,8 @@ type = variant machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 1.05 +infill_line_width = 0.3 + wall_thickness = 1 wall_0_inset = -0.05 fill_perimeter_gaps = nowhere From 94ab027499e4139c6d6013aae36ad323e3675a91 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 10:24:59 +0100 Subject: [PATCH 055/128] Update cartesio_0.8.inst.cfg --- resources/variants/cartesio_0.8.inst.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/variants/cartesio_0.8.inst.cfg b/resources/variants/cartesio_0.8.inst.cfg index 4e4d5082e0..c8155f73fd 100644 --- a/resources/variants/cartesio_0.8.inst.cfg +++ b/resources/variants/cartesio_0.8.inst.cfg @@ -14,6 +14,7 @@ machine_nozzle_tip_outer_diameter = 1.05 infill_line_width = 0.9 wall_thickness = 2.4 +top_bottom_thickness = =0.8 if layer_height < 0.3 else (layer_height * 3) wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = From b9b7df1593f72d6c077f89c3f468282abbe19f66 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 10:28:43 +0100 Subject: [PATCH 056/128] Update cartesio_0.8.inst.cfg --- resources/variants/cartesio_0.8.inst.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/variants/cartesio_0.8.inst.cfg b/resources/variants/cartesio_0.8.inst.cfg index c8155f73fd..fcb040a28d 100644 --- a/resources/variants/cartesio_0.8.inst.cfg +++ b/resources/variants/cartesio_0.8.inst.cfg @@ -47,6 +47,7 @@ speed_support_interface = =round(speed_topbottom) retraction_combing = off retraction_hop_enabled = true +retraction_hop = 1 support_z_distance = 0 support_xy_distance = 0.5 From 5a06dc5e2f9e361c755ba51b3db3093151e01257 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 10:28:58 +0100 Subject: [PATCH 057/128] Update cartesio_0.4.inst.cfg --- resources/variants/cartesio_0.4.inst.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/variants/cartesio_0.4.inst.cfg b/resources/variants/cartesio_0.4.inst.cfg index 72ba689d91..c3ba238726 100644 --- a/resources/variants/cartesio_0.4.inst.cfg +++ b/resources/variants/cartesio_0.4.inst.cfg @@ -46,6 +46,7 @@ speed_support_interface = =round(speed_topbottom) retraction_combing = off retraction_hop_enabled = true +retraction_hop = 1 support_z_distance = 0 support_xy_distance = 0.5 From d0124dafd8987f3d28a821825b91bd238d631a24 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 10:29:17 +0100 Subject: [PATCH 058/128] Update cartesio_0.25.inst.cfg --- resources/variants/cartesio_0.25.inst.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/variants/cartesio_0.25.inst.cfg b/resources/variants/cartesio_0.25.inst.cfg index 80423b2502..1e46c1eb0e 100644 --- a/resources/variants/cartesio_0.25.inst.cfg +++ b/resources/variants/cartesio_0.25.inst.cfg @@ -46,6 +46,7 @@ speed_support_interface = =round(speed_topbottom) retraction_combing = off retraction_hop_enabled = true +retraction_hop = 1 support_z_distance = 0 support_xy_distance = 0.5 From 93e800bae74982fa82ecc87a6b6d1a79acad1b53 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 10:33:20 +0100 Subject: [PATCH 059/128] Update cartesio_extruder_0.def.json --- resources/extruders/cartesio_extruder_0.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/extruders/cartesio_extruder_0.def.json b/resources/extruders/cartesio_extruder_0.def.json index f01562ed08..cda2f48bc0 100644 --- a/resources/extruders/cartesio_extruder_0.def.json +++ b/resources/extruders/cartesio_extruder_0.def.json @@ -19,7 +19,7 @@ "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S190 T0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 S155 T0\n;end extruder_0\nM117 temp is {material_print_temp}" + "default_value": "\nM104 T0 S155\n;end extruder_0\nM117 temp is {material_print_temp}" } } } From e80ac1361581c6fe2dd665b4d422d456aea24001 Mon Sep 17 00:00:00 2001 From: MaukCC Date: Fri, 24 Feb 2017 11:10:26 +0100 Subject: [PATCH 060/128] Update cartesio_0.8.inst.cfg --- resources/variants/cartesio_0.8.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/variants/cartesio_0.8.inst.cfg b/resources/variants/cartesio_0.8.inst.cfg index fcb040a28d..851a36256b 100644 --- a/resources/variants/cartesio_0.8.inst.cfg +++ b/resources/variants/cartesio_0.8.inst.cfg @@ -26,7 +26,7 @@ skin_overlap = -40 material_print_temperature_layer_0 = =round(material_print_temperature) material_initial_print_temperature = =round(material_print_temperature) material_diameter = 1.75 -retraction_amount = 2 +retraction_amount = 1.5 retraction_speed = 40 retraction_prime_speed = =round(retraction_speed / 4) retraction_min_travel = =round(line_width * 10) From 537de489bf0864a259dfc0aeaabf92b2a234a702 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 24 Feb 2017 14:12:32 +0100 Subject: [PATCH 061/128] Fix optimising CPE+, PC and TPU profiles These materials are hard-coded in the optimisation script, so the optimisation script didn't know that those materials were materials and this caused a chain reaction where in the end the profile could only override XML-settings. --- .../um3_aa0.4_CPEP_Draft_Print.inst.cfg | 15 ++++++++++- .../um3_aa0.4_CPEP_Fast_Print.inst.cfg | 14 ++++++++++ .../um3_aa0.4_CPEP_High_Quality.inst.cfg | 20 +++++++++++++- .../um3_aa0.4_CPEP_Normal_Quality.inst.cfg | 19 ++++++++++++-- .../um3_aa0.4_PC_Draft_Print.inst.cfg | 17 ++++++++++++ .../um3_aa0.4_PC_Fast_Print.inst.cfg | 17 ++++++++++++ .../um3_aa0.4_PC_High_Quality.inst.cfg | 18 +++++++++++++ .../um3_aa0.4_PC_Normal_Quality.inst.cfg | 19 +++++++++++++- .../um3_aa0.4_TPU_Draft_Print.inst.cfg | 26 +++++++++++++++++++ .../um3_aa0.4_TPU_Fast_Print.inst.cfg | 26 +++++++++++++++++++ .../um3_aa0.4_TPU_Normal_Quality.inst.cfg | 25 ++++++++++++++++++ 11 files changed, 211 insertions(+), 5 deletions(-) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg index 8d749e29ce..f99c3997f7 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg @@ -10,12 +10,25 @@ material = generic_cpe_plus_ultimaker3_AA_0.4 weight = -2 [values] +brim_width = 7 cool_fan_speed_max = 80 +cool_min_speed = 5 +infill_wipe_dist = 0 layer_height = 0.2 machine_nozzle_cool_down_speed = 0.9 -speed_print = 50 +machine_nozzle_heat_up_speed = 1.4 +prime_tower_size = 17 +retraction_combing = off +retraction_hop = 0.2 +retraction_hop_enabled = False +retraction_min_travel = =5 +retraction_prime_speed = =15 speed_topbottom = =math.ceil(speed_print * 65 / 50) speed_wall = =math.ceil(speed_print * 50 / 50) speed_wall_0 = =math.ceil(speed_wall * 40 / 50) +support_z_distance = =layer_height +switch_extruder_prime_speed = =15 +switch_extruder_retraction_amount = =8 +switch_extruder_retraction_speeds = 20 wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg index 2536420c1d..c03e072c8e 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg @@ -10,12 +10,26 @@ material = generic_cpe_plus_ultimaker3_AA_0.4 weight = -1 [values] +brim_width = 7 cool_fan_speed_max = 80 cool_min_speed = 6 +infill_wipe_dist = 0 layer_height = 0.15 machine_nozzle_cool_down_speed = 0.9 +machine_nozzle_heat_up_speed = 1.4 +prime_tower_size = 17 +retraction_combing = off +retraction_hop = 0.2 +retraction_hop_enabled = False +retraction_min_travel = =5 +retraction_prime_speed = =15 speed_print = 45 speed_topbottom = =math.ceil(speed_print * 55 / 45) speed_wall = =math.ceil(speed_print * 45 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) +support_z_distance = =layer_height +switch_extruder_prime_speed = =15 +switch_extruder_retraction_amount = =8 +switch_extruder_retraction_speeds = 20 +wall_thickness = 1.3 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg index 90c23b7d8f..c88fe1a56a 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg @@ -10,6 +10,24 @@ material = generic_cpe_plus_ultimaker3_AA_0.4 weight = 1 [values] -machine_nozzle_heat_up_speed = 1.5 +brim_width = 7 +cool_min_speed = 5 +infill_wipe_dist = 0 +layer_height = 0.06 material_print_temperature = =default_material_print_temperature + 2 +prime_tower_size = 17 +retraction_combing = off +retraction_hop = 0.2 +retraction_hop_enabled = False +retraction_min_travel = =5 +retraction_prime_speed = =15 +speed_print = 40 +speed_topbottom = =math.ceil(speed_print * 30 / 35) +speed_wall = =math.ceil(speed_print * 35 / 40) +speed_wall_0 = =math.ceil(speed_wall * 30 / 35) +support_z_distance = =layer_height +switch_extruder_prime_speed = =15 +switch_extruder_retraction_amount = =8 +switch_extruder_retraction_speeds = 20 +wall_thickness = 1.3 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg index f12d1ca613..9aaceb3a7a 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg @@ -10,8 +10,23 @@ material = generic_cpe_plus_ultimaker3_AA_0.4 weight = 0 [values] +brim_width = 7 cool_min_speed = 7 -layer_height = 0.1 -machine_nozzle_heat_up_speed = 1.5 +infill_wipe_dist = 0 material_print_temperature = =default_material_print_temperature + 5 +prime_tower_size = 17 +retraction_combing = off +retraction_hop = 0.2 +retraction_hop_enabled = False +retraction_min_travel = =5 +retraction_prime_speed = =15 +speed_print = 40 +speed_topbottom = =math.ceil(speed_print * 30 / 35) +speed_wall = =math.ceil(speed_print * 35 / 40) +speed_wall_0 = =math.ceil(speed_wall * 30 / 35) +support_z_distance = =layer_height +switch_extruder_prime_speed = =15 +switch_extruder_retraction_amount = =8 +switch_extruder_retraction_speeds = 20 +wall_thickness = 1.3 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg index 876941d82b..0cc074b7a0 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg @@ -10,7 +10,24 @@ material = generic_pc_ultimaker3_AA_0.4 weight = -2 [values] +adhesion_type = raft +cool_fan_full_at_height = =layer_height_0 + layer_height cool_fan_speed_max = 90 +cool_min_layer_time_fan_speed_max = 5 cool_min_speed = 6 +infill_line_width = =round(line_width * 0.4 / 0.35, 2) +infill_overlap_mm = 0.05 layer_height = 0.2 +material_print_temperature_layer_0 = =material_print_temperature + 5 +ooze_shield_angle = 40 +raft_airgap = 0.25 +raft_margin = 15 +retraction_count_max = 80 +skin_overlap = 30 +speed_layer_0 = 25 +support_interface_line_distance = 0.4 +support_interface_pattern = lines +support_pattern = zigzag +wall_line_width_x = =round(line_width * 0.4 / 0.35, 2) +xy_offset = -0.15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg index 93babeba51..c887fb283d 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg @@ -10,8 +10,25 @@ material = generic_pc_ultimaker3_AA_0.4 weight = -1 [values] +adhesion_type = raft +cool_fan_full_at_height = =layer_height_0 + layer_height cool_fan_speed_max = 85 +cool_min_layer_time_fan_speed_max = 5 cool_min_speed = 7 +infill_line_width = =round(line_width * 0.4 / 0.35, 2) infill_overlap = =0 +infill_overlap_mm = 0.05 layer_height = 0.15 +material_print_temperature_layer_0 = =material_print_temperature + 5 +ooze_shield_angle = 40 +raft_airgap = 0.25 +raft_margin = 15 +retraction_count_max = 80 +skin_overlap = 30 +speed_layer_0 = 25 +support_interface_line_distance = 0.4 +support_interface_pattern = lines +support_pattern = zigzag +wall_line_width_x = =round(line_width * 0.4 / 0.35, 2) +xy_offset = -0.15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg index 03f7b2ffd9..6555c13f74 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg @@ -10,6 +10,24 @@ material = generic_pc_ultimaker3_AA_0.4 weight = 1 [values] +adhesion_type = raft +cool_fan_full_at_height = =layer_height_0 + layer_height +cool_min_layer_time_fan_speed_max = 5 cool_min_speed = 8 +infill_line_width = =round(line_width * 0.4 / 0.35, 2) +infill_overlap_mm = 0.05 +layer_height = 0.06 material_print_temperature = =default_material_print_temperature - 10 +material_print_temperature_layer_0 = =material_print_temperature + 5 +ooze_shield_angle = 40 +raft_airgap = 0.25 +raft_margin = 15 +retraction_count_max = 80 +skin_overlap = 30 +speed_layer_0 = 25 +support_interface_line_distance = 0.4 +support_interface_pattern = lines +support_pattern = zigzag +wall_line_width_x = =round(line_width * 0.4 / 0.35, 2) +xy_offset = -0.15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg index 7fb9c74ca0..eeea96cd18 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg @@ -10,6 +10,23 @@ material = generic_pc_ultimaker3_AA_0.4 weight = 0 [values] -layer_height = 0.1 +adhesion_type = raft +cool_fan_full_at_height = =layer_height_0 + layer_height +cool_min_layer_time_fan_speed_max = 5 +cool_min_speed = 5 +infill_line_width = =round(line_width * 0.4 / 0.35, 2) +infill_overlap_mm = 0.05 material_print_temperature = =default_material_print_temperature +material_print_temperature_layer_0 = =material_print_temperature + 5 +ooze_shield_angle = 40 +raft_airgap = 0.25 +raft_margin = 15 +retraction_count_max = 80 +skin_overlap = 30 +speed_layer_0 = 25 +support_interface_line_distance = 0.4 +support_interface_pattern = lines +support_pattern = zigzag +wall_line_width_x = =round(line_width * 0.4 / 0.35, 2) +xy_offset = -0.15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg index 72bb42c7bd..bcdd8044b8 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg @@ -10,5 +10,31 @@ material = generic_tpu_ultimaker3_AA_0.4 weight = -2 [values] +brim_width = 8.75 +cool_fan_speed_max = 100 +cool_min_layer_time_fan_speed_max = 6 +gradual_infill_step_height = =5 * layer_height +gradual_infill_steps = 4 +infill_line_width = =round(line_width * 0.38 / 0.38, 2) +infill_pattern = tetrahedral +infill_sparse_density = 96 layer_height = 0.2 +line_width = =machine_nozzle_size * 0.95 +material_flow = 106 +material_print_temperature_layer_0 = =default_material_print_temperature + 2 +retraction_count_max = 12 +retraction_extra_prime_amount = 0.8 +skin_overlap = 15 +speed_equalize_flow_enabled = True +speed_layer_0 = 18 +speed_print = 25 +speed_topbottom = =math.ceil(speed_print * 25 / 25) +speed_travel = 300 +speed_wall = =math.ceil(speed_print * 25 / 25) +speed_wall_0 = =math.ceil(speed_wall * 25 / 25) +support_angle = 50 +support_bottom_distance = =support_z_distance / 2 +top_bottom_thickness = 0.7 +wall_line_width_x = =line_width +wall_thickness = 0.76 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg index 6e0bbc362d..567d9273b5 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg @@ -10,6 +10,32 @@ material = generic_tpu_ultimaker3_AA_0.4 weight = -1 [values] +brim_width = 8.75 +cool_fan_speed_max = 100 +cool_min_layer_time_fan_speed_max = 6 +gradual_infill_step_height = =5 * layer_height +gradual_infill_steps = 4 +infill_line_width = =round(line_width * 0.38 / 0.38, 2) +infill_pattern = tetrahedral +infill_sparse_density = 96 layer_height = 0.15 +line_width = =machine_nozzle_size * 0.95 +material_flow = 106 +material_print_temperature_layer_0 = =default_material_print_temperature + 2 retraction_amount = 7 +retraction_count_max = 12 +retraction_extra_prime_amount = 0.8 +skin_overlap = 15 +speed_equalize_flow_enabled = True +speed_layer_0 = 18 +speed_print = 25 +speed_topbottom = =math.ceil(speed_print * 25 / 25) +speed_travel = 300 +speed_wall = =math.ceil(speed_print * 25 / 25) +speed_wall_0 = =math.ceil(speed_wall * 25 / 25) +support_angle = 50 +support_bottom_distance = =support_z_distance / 2 +top_bottom_thickness = 0.7 +wall_line_width_x = =line_width +wall_thickness = 0.76 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg index 66f6e91ec9..75d76a32f2 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg @@ -10,7 +10,32 @@ material = generic_tpu_ultimaker3_AA_0.4 weight = 0 [values] +brim_width = 8.75 +cool_fan_speed_max = 100 +cool_min_layer_time_fan_speed_max = 6 +gradual_infill_step_height = =5 * layer_height +gradual_infill_steps = 4 +infill_line_width = =round(line_width * 0.38 / 0.38, 2) +infill_pattern = tetrahedral +infill_sparse_density = 96 +line_width = =machine_nozzle_size * 0.95 +material_flow = 106 material_initial_print_temperature = =material_print_temperature - 10 material_print_temperature = =default_material_print_temperature material_print_temperature_layer_0 = =default_material_print_temperature +retraction_count_max = 12 +retraction_extra_prime_amount = 0.8 +skin_overlap = 15 +speed_equalize_flow_enabled = True +speed_layer_0 = 18 +speed_print = 25 +speed_topbottom = =math.ceil(speed_print * 25 / 25) +speed_travel = 300 +speed_wall = =math.ceil(speed_print * 25 / 25) +speed_wall_0 = =math.ceil(speed_wall * 25 / 25) +support_angle = 50 +support_bottom_distance = =support_z_distance / 2 +top_bottom_thickness = 0.7 +wall_line_width_x = =line_width +wall_thickness = 0.76 From d60014fa30e3ba5a86a517d20da2f0c9ed96ea3b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 24 Feb 2017 14:53:00 +0100 Subject: [PATCH 062/128] Sync remaining pre-heat time with printer If multiple instances of Cura are running or Cura is restarted, it now properly syncs the remaining pre-heat time with the printer, so that all instances display the proper time. There's still a bug in here that pressing cancel has no effect the first time since the remaining pre-heat time is updated immediately from the printer before the command to cancel got through remotely. I'll see what I can do to amend that. Also, cancelling is not yet synced. Contributes to issue CURA-3360. --- .../UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index a95a63995d..bdcd24105a 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -532,6 +532,18 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._updateHeadPosition(head_x, head_y, head_z) self._updatePrinterState(self._json_printer_state["status"]) + try: + remaining_preheat_time = self._json_printer_state["bed"]["pre_heat"]["remaining"] + except KeyError: #Old firmware doesn't support that. + pass #Don't update the time. + else: + #Only update if time estimate is significantly off (>5000ms). + #Otherwise we get issues with latency causing the timer to count inconsistently. + if abs(self._preheat_bed_timer.remainingTime() - remaining_preheat_time * 1000) > 5000: + self._preheat_bed_timer.setInterval(remaining_preheat_time * 1000) + self._preheat_bed_timer.start() + self.preheatBedRemainingTimeChanged.emit() + def close(self): Logger.log("d", "Closing connection of printer %s with ip %s", self._key, self._address) From 39920c95f3acb3c29c3b4076228936ab674483d6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 24 Feb 2017 17:14:54 +0100 Subject: [PATCH 063/128] Interpret cancelling pre-heat properly If someone on a different computer cancels the pre-heat, this is now correctly updated locally. Contributes to issue CURA-3360. --- .../NetworkPrinterOutputDevice.py | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index bdcd24105a..456783c91b 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -533,16 +533,27 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._updatePrinterState(self._json_printer_state["status"]) try: - remaining_preheat_time = self._json_printer_state["bed"]["pre_heat"]["remaining"] + is_preheating = self._json_printer_state["bed"]["pre_heat"]["active"] except KeyError: #Old firmware doesn't support that. - pass #Don't update the time. + pass #Don't update the pre-heat remaining time. else: - #Only update if time estimate is significantly off (>5000ms). - #Otherwise we get issues with latency causing the timer to count inconsistently. - if abs(self._preheat_bed_timer.remainingTime() - remaining_preheat_time * 1000) > 5000: - self._preheat_bed_timer.setInterval(remaining_preheat_time * 1000) - self._preheat_bed_timer.start() - self.preheatBedRemainingTimeChanged.emit() + if is_preheating: + try: + remaining_preheat_time = self._json_printer_state["bed"]["pre_heat"]["remaining"] + except KeyError: #Error in firmware. If "active" is supported, "remaining" should also be supported. + pass #Anyway, don't update. + else: + #Only update if time estimate is significantly off (>5000ms). + #Otherwise we get issues with latency causing the timer to count inconsistently. + if abs(self._preheat_bed_timer.remainingTime() - remaining_preheat_time * 1000) > 5000: + self._preheat_bed_timer.setInterval(remaining_preheat_time * 1000) + self._preheat_bed_timer.start() + self.preheatBedRemainingTimeChanged.emit() + else: #Not pre-heating. Must've cancelled. + if self._preheat_bed_timer.isActive(): + self._preheat_bed_timer.setInterval(0) + self._preheat_bed_timer.stop() + self.preheatBedRemainingTimeChanged.emit() def close(self): From 7bb486a34bb2f36b21692f40cfdf970c048ff27a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 24 Feb 2017 17:44:37 +0100 Subject: [PATCH 064/128] Don't process status updates of pre-heating while request is going on There was the problem that you'd click on pre-heat, so locally it would display the time-out. Then a package came in with the out-dated print status saying that the printer is not pre-heating, so the pre-heat was cancelled on Cura's side. Then the next status update came in saying that the pre-heat is now busy, so the pre-heat is resumed on Cura's side. So the button was flicking back and forth once after pressing. This commit makes Cura ignore any status updates that come while the put-request is still going on, because they may be outdated. It'll appear nicer to the user, mostly. Contributes to issue CURA-3360. --- .../NetworkPrinterOutputDevice.py | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 456783c91b..a7223128b4 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -99,6 +99,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._material_ids = [""] * self._num_extruders self._hotend_ids = [""] * self._num_extruders self._target_bed_temperature = 0 + self._processing_preheat_requests = True self.setPriority(2) # Make sure the output device gets selected above local file output self.setName(key) @@ -262,6 +263,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): Logger.log("i", "Pre-heating bed to %i degrees.", temperature) put_request = QNetworkRequest(url) put_request.setHeader(QNetworkRequest.ContentTypeHeader, "application/json") + self._processing_preheat_requests = False self._manager.put(put_request, data.encode()) self._preheat_bed_timer.start(self._preheat_bed_timeout * 1000) #Times 1000 because it needs to be provided as milliseconds. self.preheatBedRemainingTimeChanged.emit() @@ -532,28 +534,29 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._updateHeadPosition(head_x, head_y, head_z) self._updatePrinterState(self._json_printer_state["status"]) - try: - is_preheating = self._json_printer_state["bed"]["pre_heat"]["active"] - except KeyError: #Old firmware doesn't support that. - pass #Don't update the pre-heat remaining time. - else: - if is_preheating: - try: - remaining_preheat_time = self._json_printer_state["bed"]["pre_heat"]["remaining"] - except KeyError: #Error in firmware. If "active" is supported, "remaining" should also be supported. - pass #Anyway, don't update. - else: - #Only update if time estimate is significantly off (>5000ms). - #Otherwise we get issues with latency causing the timer to count inconsistently. - if abs(self._preheat_bed_timer.remainingTime() - remaining_preheat_time * 1000) > 5000: - self._preheat_bed_timer.setInterval(remaining_preheat_time * 1000) - self._preheat_bed_timer.start() + if self._processing_preheat_requests: + try: + is_preheating = self._json_printer_state["bed"]["pre_heat"]["active"] + except KeyError: #Old firmware doesn't support that. + pass #Don't update the pre-heat remaining time. + else: + if is_preheating: + try: + remaining_preheat_time = self._json_printer_state["bed"]["pre_heat"]["remaining"] + except KeyError: #Error in firmware. If "active" is supported, "remaining" should also be supported. + pass #Anyway, don't update. + else: + #Only update if time estimate is significantly off (>5000ms). + #Otherwise we get issues with latency causing the timer to count inconsistently. + if abs(self._preheat_bed_timer.remainingTime() - remaining_preheat_time * 1000) > 5000: + self._preheat_bed_timer.setInterval(remaining_preheat_time * 1000) + self._preheat_bed_timer.start() + self.preheatBedRemainingTimeChanged.emit() + else: #Not pre-heating. Must've cancelled. + if self._preheat_bed_timer.isActive(): + self._preheat_bed_timer.setInterval(0) + self._preheat_bed_timer.stop() self.preheatBedRemainingTimeChanged.emit() - else: #Not pre-heating. Must've cancelled. - if self._preheat_bed_timer.isActive(): - self._preheat_bed_timer.setInterval(0) - self._preheat_bed_timer.stop() - self.preheatBedRemainingTimeChanged.emit() def close(self): @@ -1056,6 +1059,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._progress_message.hide() elif reply.operation() == QNetworkAccessManager.PutOperation: + if "printer/bed/pre_heat" in reply_url: #Pre-heat command has completed. Re-enable syncing pre-heating. + self._processing_preheat_requests = True if status_code in [200, 201, 202, 204]: pass # Request was successful! else: From 6f9fe60a6c9765f2e927145e0ee87de183ba9173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4ckdahl?= Date: Fri, 24 Feb 2017 20:57:46 +0100 Subject: [PATCH 065/128] Velleman Vertex K8400 single and dual head Definition files for single and dual head versions of Velleman Vertex K8400 printer. The machine uses printable coordinates x=0 to 200, y=20 to 200 and parking position 200, 200 regardless of how many extruders you use. Thereby the different machine_width for the two models. The g-code can probably be improved. USB connection not successful this far. --- resources/definitions/vertex_k8400.def.json | 84 ++++++++++++++++ .../definitions/vertex_k8400_dual.def.json | 92 ++++++++++++++++++ .../extruders/vertex_k8400_dual_1st.def.json | 26 +++++ .../extruders/vertex_k8400_dual_2nd.def.json | 26 +++++ resources/meshes/Vertex_build_panel.stl | Bin 0 -> 2284 bytes 5 files changed, 228 insertions(+) create mode 100644 resources/definitions/vertex_k8400.def.json create mode 100644 resources/definitions/vertex_k8400_dual.def.json create mode 100644 resources/extruders/vertex_k8400_dual_1st.def.json create mode 100644 resources/extruders/vertex_k8400_dual_2nd.def.json create mode 100644 resources/meshes/Vertex_build_panel.stl diff --git a/resources/definitions/vertex_k8400.def.json b/resources/definitions/vertex_k8400.def.json new file mode 100644 index 0000000000..3d1ca2d1a9 --- /dev/null +++ b/resources/definitions/vertex_k8400.def.json @@ -0,0 +1,84 @@ +{ + "id": "vertex_k8400", + "version": 2, + "name": "Vertex K8400", + "inherits": "fdmprinter", + "metadata": { + "visible": true, + "manufacturer": "Velleman", + "category": "Other", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker2", + "platform": "Vertex_build_panel.stl", + "platform_offset": [0, -2, 0], + "supports_usb_connection": true, + "supported_actions": ["MachineSettingsAction"] + }, + "overrides": { + "machine_name": { "default_value": "Vertex K8400" }, + "machine_heated_bed": { + "default_value": true + }, + "material_bed_temperature": { + "default_value": 0 + }, + "material_bed_temperature_layer_0": { + "default_value": 0 + }, + "machine_width": { + "default_value": 200 + }, + "machine_height": { + "default_value": 190 + }, + "machine_depth": { + "default_value": 200 + }, + "machine_disallowed_areas": { "default_value": [ + [[-100,100],[-100,80],[100,80],[100,100]] + ]}, + "machine_center_is_zero": { + "default_value": false + }, + "machine_nozzle_size": { + "default_value": 0.35 + }, + "material_diameter": { + "default_value": 1.75 + }, + "machine_head_polygon": { + "default_value": [ + [-60, -18], + [-60, 40], + [18, 40], + [18, -18] + ] + }, + "machine_head_with_fans_polygon": { + "default_value": [ + [-60, -40], + [-60, 40], + [18, 40], + [18, -40] + ] + }, + "gantry_height": { + "default_value": 18 + }, + "machine_nozzle_heat_up_speed": { + "default_value": 2 + }, + "machine_nozzle_cool_down_speed": { + "default_value": 2 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + }, + "machine_end_gcode": { + "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + } + } +} \ No newline at end of file diff --git a/resources/definitions/vertex_k8400_dual.def.json b/resources/definitions/vertex_k8400_dual.def.json new file mode 100644 index 0000000000..7b5efcee9c --- /dev/null +++ b/resources/definitions/vertex_k8400_dual.def.json @@ -0,0 +1,92 @@ +{ + "id": "vertex_k8400_dual", + "version": 2, + "name": "Vertex K8400 Dual", + "inherits": "fdmprinter", + "metadata": { + "visible": true, + "manufacturer": "Velleman", + "category": "Other", + "file_formats": "text/x-gcode", + "icon": "icon_ultimaker2", + "platform": "Vertex_build_panel.stl", + "platform_offset": [0, -2, 0], + "machine_extruder_trains": { + "0": "vertex_k8400_dual_1st", + "1": "vertex_k8400_dual_2nd" + } + }, + "overrides": { + "machine_name": { "default_value": "Vertex K8400 Dual" }, + "machine_heated_bed": { + "default_value": true + }, + "material_bed_temperature": { + "default_value": 0 + }, + "material_bed_temperature_layer_0": { + "default_value": 0 + }, + "machine_width": { + "default_value": 223.7 + }, + "machine_height": { + "default_value": 190 + }, + "machine_depth": { + "default_value": 200 + }, + "machine_disallowed_areas": { "default_value": [ + [[-111.85,100],[111.85,100],[-111.85,80],[111.85,80]] + ]}, + "machine_center_is_zero": { + "default_value": false + }, + "machine_use_extruder_offset_to_offset_coords": { + "default_value": true + }, + "machine_nozzle_size": { + "default_value": 0.35 + }, + "material_diameter": { + "default_value": 1.75 + }, + "machine_head_polygon": { + "default_value": [ + [-60, -18], + [-60, 40], + [18, 40], + [18, -18] + ] + }, + "machine_head_with_fans_polygon": { + "default_value": [ + [-60, -40], + [-60, 40], + [18, 40], + [18, -40] + ] + }, + "gantry_height": { + "default_value": 18 + }, + "machine_nozzle_heat_up_speed": { + "default_value": 2 + }, + "machine_nozzle_cool_down_speed": { + "default_value": 2 + }, + "machine_extruder_count": { + "default_value": 2 + }, + "machine_gcode_flavor": { + "default_value": "RepRap (Marlin/Sprinter)" + }, + "machine_start_gcode": { + "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." + }, + "machine_end_gcode": { + "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + } + } +} \ No newline at end of file diff --git a/resources/extruders/vertex_k8400_dual_1st.def.json b/resources/extruders/vertex_k8400_dual_1st.def.json new file mode 100644 index 0000000000..74a9c557a5 --- /dev/null +++ b/resources/extruders/vertex_k8400_dual_1st.def.json @@ -0,0 +1,26 @@ +{ + "id": "vertex_k8400_dual_1st", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "vertex_k8400_dual", + "position": "0" + }, + + "overrides": { + "extruder_nr": { + "default_value": 0, + "maximum_value": "1" + }, + "machine_nozzle_offset_x": { "default_value": 23.7 }, + "machine_nozzle_offset_y": { "default_value": 0.0 }, + + "machine_extruder_start_pos_abs": { "default_value": true }, + "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, + "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_end_pos_abs": { "default_value": true }, + "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, + "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" } + } +} diff --git a/resources/extruders/vertex_k8400_dual_2nd.def.json b/resources/extruders/vertex_k8400_dual_2nd.def.json new file mode 100644 index 0000000000..ffa4b77a1e --- /dev/null +++ b/resources/extruders/vertex_k8400_dual_2nd.def.json @@ -0,0 +1,26 @@ +{ + "id": "vertex_k8400_dual_2nd", + "version": 2, + "name": "Extruder 2", + "inherits": "fdmextruder", + "metadata": { + "machine": "vertex_k8400_dual", + "position": "1" + }, + + "overrides": { + "extruder_nr": { + "default_value": 1, + "maximum_value": "1" + }, + "machine_nozzle_offset_x": { "default_value": 0.0 }, + "machine_nozzle_offset_y": { "default_value": 0.0 }, + + "machine_extruder_start_pos_abs": { "default_value": true }, + "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, + "machine_extruder_start_pos_y": { "value": "prime_tower_position_y" }, + "machine_extruder_end_pos_abs": { "default_value": true }, + "machine_extruder_end_pos_x": { "value": "prime_tower_position_x" }, + "machine_extruder_end_pos_y": { "value": "prime_tower_position_y" } + } +} diff --git a/resources/meshes/Vertex_build_panel.stl b/resources/meshes/Vertex_build_panel.stl new file mode 100644 index 0000000000000000000000000000000000000000..bb50da0625d01a9e408dd0d8ab86a9778ff46b40 GIT binary patch literal 2284 zcmb`IJx&8b424}#(Q*waX=pZzghWHdh2|)^Nuup3QEm|-aRJ`*|13$zN*m11e13lR zZ1Vp4@%HroZy)!MBJ%S2u;4!OmT}pOoL7;9#p4UHoJ79&qA{L#VreUj(njoBChYmS zdtPvZ<(0XNFufjQ-wgsQS7|&C59&j{*Q|G3JcbX(;V*osd(R8^=^U{V_(eJ2W_)Kd@$#nxv6zx+NIMZ0UzA$#Aq6HjvYD!Wb1^_+$LylEtmN~tY?>=T%!@p z6)Vv<64r&(%g$m6m8^9dl1A+rBkK*qH1aHM38q)~Rr_wvs|57DyHK47ta$A;51%Fp zUd-;%08fqedLP~UJ~ZJfmLqNlIkZ91pM0uAp%oc0Yt4W1<@5Z@wZ=e3JILeG3a z)%{dn_R1^KE;J%`yYr~Ti1;3~nbQ+AHpFUfwO5_SZvT}qM24}IYw?*|UYmJo3^8J8 z?ez-~c}efL8k8EAH|9}Y*tIU~xKoCH7J+=iUE%2uf!vO?Nx@g2bIwEeCIK#2IuS8^ z@sxOai>z0u3Vp9Qob&li4DZR7AdP4B4*D##1Nj~xSH?$=*O++{^x^%XdJ+*QkzTC! X{-(|`2%gHipj9(Cd5rouXH0$phHu=M literal 0 HcmV?d00001 From 4ab6b74930f5a15a0c13d91236f09cdeee736e8d Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Sun, 26 Feb 2017 20:40:32 +0100 Subject: [PATCH 066/128] Fixed a bunch of error which were reported by PyCharm's code analysis. --- cura/CuraApplication.py | 10 ++++++---- cura/Settings/MachineNameValidator.py | 6 +++--- cura/Settings/SettingOverrideDecorator.py | 4 ++-- plugins/CuraProfileReader/CuraProfileReader.py | 2 +- plugins/RemovableDriveOutputDevice/__init__.py | 2 +- .../VersionUpgrade21to22/MachineInstance.py | 4 ++-- plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py | 2 ++ 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index add7b4a143..62bf6f0e4d 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -20,6 +20,8 @@ from UM.JobQueue import JobQueue from UM.SaveFile import SaveFile from UM.Scene.Selection import Selection from UM.Scene.GroupDecorator import GroupDecorator +from UM.Settings.ContainerStack import ContainerStack +from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.Validator import Validator from UM.Message import Message from UM.i18n import i18nCatalog @@ -148,11 +150,11 @@ class CuraApplication(QtApplication): UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().setCurrentVersions( { - ("quality", UM.Settings.InstanceContainer.InstanceContainer.Version): (self.ResourceTypes.QualityInstanceContainer, "application/x-uranium-instancecontainer"), - ("machine_stack", UM.Settings.ContainerStack.ContainerStack.Version): (self.ResourceTypes.MachineStack, "application/x-uranium-containerstack"), - ("extruder_train", UM.Settings.ContainerStack.ContainerStack.Version): (self.ResourceTypes.ExtruderStack, "application/x-uranium-extruderstack"), + ("quality", InstanceContainer.Version): (self.ResourceTypes.QualityInstanceContainer, "application/x-uranium-instancecontainer"), + ("machine_stack", ContainerStack.Version): (self.ResourceTypes.MachineStack, "application/x-uranium-containerstack"), + ("extruder_train", ContainerStack.Version): (self.ResourceTypes.ExtruderStack, "application/x-uranium-extruderstack"), ("preferences", Preferences.Version): (Resources.Preferences, "application/x-uranium-preferences"), - ("user", UM.Settings.InstanceContainer.InstanceContainer.Version): (self.ResourceTypes.UserInstanceContainer, "application/x-uranium-instancecontainer") + ("user", InstanceContainer.Version): (self.ResourceTypes.UserInstanceContainer, "application/x-uranium-instancecontainer") } ) diff --git a/cura/Settings/MachineNameValidator.py b/cura/Settings/MachineNameValidator.py index 68782a2148..dcb83b7a4c 100644 --- a/cura/Settings/MachineNameValidator.py +++ b/cura/Settings/MachineNameValidator.py @@ -6,7 +6,7 @@ from PyQt5.QtGui import QValidator import os #For statvfs. import urllib #To escape machine names for how they're saved to file. -import UM.Resources +from UM.Resources import Resources from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.InstanceContainer import InstanceContainer @@ -19,7 +19,7 @@ class MachineNameValidator(QObject): #Compute the validation regex for printer names. This is limited by the maximum file name length. try: - filename_max_length = os.statvfs(UM.Resources.getDataStoragePath()).f_namemax + filename_max_length = os.statvfs(Resources.getDataStoragePath()).f_namemax except AttributeError: #Doesn't support statvfs. Probably because it's not a Unix system. filename_max_length = 255 #Assume it's Windows on NTFS. machine_name_max_length = filename_max_length - len("_current_settings.") - len(ContainerRegistry.getMimeTypeForContainer(InstanceContainer).preferredSuffix) @@ -41,7 +41,7 @@ class MachineNameValidator(QObject): def validate(self, name, position): #Check for file name length of the current settings container (which is the longest file we're saving with the name). try: - filename_max_length = os.statvfs(UM.Resources.getDataStoragePath()).f_namemax + filename_max_length = os.statvfs(Resources.getDataStoragePath()).f_namemax except AttributeError: #Doesn't support statvfs. Probably because it's not a Unix system. filename_max_length = 255 #Assume it's Windows on NTFS. escaped_name = urllib.parse.quote_plus(name) diff --git a/cura/Settings/SettingOverrideDecorator.py b/cura/Settings/SettingOverrideDecorator.py index 1b0294bd9f..76c155cb99 100644 --- a/cura/Settings/SettingOverrideDecorator.py +++ b/cura/Settings/SettingOverrideDecorator.py @@ -8,7 +8,7 @@ from UM.Signal import Signal, signalemitter from UM.Settings.ContainerStack import ContainerStack from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.ContainerRegistry import ContainerRegistry -import UM.Logger +from UM.Logger import Logger from UM.Application import Application @@ -99,7 +99,7 @@ class SettingOverrideDecorator(SceneNodeDecorator): Application.getInstance().getBackend().needsSlicing() Application.getInstance().getBackend().tickle() else: - UM.Logger.log("e", "Extruder stack %s below per-object settings does not exist.", self._extruder_stack) + Logger.log("e", "Extruder stack %s below per-object settings does not exist.", self._extruder_stack) else: self._stack.setNextStack(Application.getInstance().getGlobalContainerStack()) diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py index 2198d73b22..f3ac6bab8a 100644 --- a/plugins/CuraProfileReader/CuraProfileReader.py +++ b/plugins/CuraProfileReader/CuraProfileReader.py @@ -2,7 +2,7 @@ # Cura is released under the terms of the AGPLv3 or higher. import configparser -from UM import PluginRegistry +from UM.PluginRegistry import PluginRegistry from UM.Logger import Logger from UM.Settings.InstanceContainer import InstanceContainer # The new profile to make. from cura.ProfileReader import ProfileReader diff --git a/plugins/RemovableDriveOutputDevice/__init__.py b/plugins/RemovableDriveOutputDevice/__init__.py index 616fe6ee8c..b00214d425 100644 --- a/plugins/RemovableDriveOutputDevice/__init__.py +++ b/plugins/RemovableDriveOutputDevice/__init__.py @@ -2,7 +2,7 @@ # Cura is released under the terms of the AGPLv3 or higher. from UM.Platform import Platform - +from UM.Logger import Logger from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py index 4491a00d3d..faf9105cff 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py @@ -3,7 +3,7 @@ import UM.VersionUpgrade #To indicate that a file is of incorrect format. import UM.VersionUpgradeManager #To schedule more files to be upgraded. -import UM.Resources #To get the config storage path. +from UM.Resources import Resources #To get the config storage path. import configparser #To read config files. import io #To write config files to strings as if they were files. @@ -107,7 +107,7 @@ class MachineInstance: user_profile["values"] = {} version_upgrade_manager = UM.VersionUpgradeManager.VersionUpgradeManager.getInstance() - user_storage = os.path.join(UM.Resources.getDataStoragePath(), next(iter(version_upgrade_manager.getStoragePaths("user")))) + user_storage = os.path.join(Resources.getDataStoragePath(), next(iter(version_upgrade_manager.getStoragePaths("user")))) user_profile_file = os.path.join(user_storage, urllib.parse.quote_plus(self._name) + "_current_settings.inst.cfg") if not os.path.exists(user_storage): os.makedirs(user_storage) diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py index 3bff7c1bf5..7cc404de6b 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py @@ -3,6 +3,8 @@ import configparser #To read config files. import io #To write config files to strings as if they were files. +from typing import Dict +from typing import List import UM.VersionUpgrade from UM.Logger import Logger From 18368f3ad46e0a13ec28a9c7e2559c9019ed0a59 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Sun, 26 Feb 2017 21:04:05 +0100 Subject: [PATCH 067/128] Type hints and fixes for ContainerManager. --- cura/Settings/ContainerManager.py | 36 +++++++++++++++++-------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 9cd9ece79c..7bc2ff9efc 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -3,15 +3,15 @@ import os.path import urllib +from typing import Dict, Union -from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, QUrl, QVariant +from PyQt5.QtCore import QObject, QUrl, QVariant from UM.FlameProfiler import pyqtSlot from PyQt5.QtWidgets import QMessageBox from UM.PluginRegistry import PluginRegistry - -from UM.Platform import Platform from UM.SaveFile import SaveFile +from UM.Platform import Platform from UM.MimeTypeDatabase import MimeTypeDatabase from UM.Logger import Logger @@ -307,18 +307,20 @@ class ContainerManager(QObject): # # \param container_id The ID of the container to export # \param file_type The type of file to save as. Should be in the form of "description (*.extension, *.ext)" - # \param file_url The URL where to save the file. + # \param file_url_or_string The URL where to save the file. # # \return A dictionary containing a key "status" with a status code and a key "message" with a message # explaining the status. # The status code can be one of "error", "cancelled", "success" @pyqtSlot(str, str, QUrl, result = "QVariantMap") - def exportContainer(self, container_id, file_type, file_url): - if not container_id or not file_type or not file_url: + def exportContainer(self, container_id: str, file_type: str, file_url_or_string: Union[QUrl, str]) -> Dict[str, str]: + if not container_id or not file_type or not file_url_or_string: return { "status": "error", "message": "Invalid arguments"} - if isinstance(file_url, QUrl): - file_url = file_url.toLocalFile() + if isinstance(file_url_or_string, QUrl): + file_url = file_url_or_string.toLocalFile() + else: + file_url = file_url_or_string if not file_url: return { "status": "error", "message": "Invalid path"} @@ -373,12 +375,14 @@ class ContainerManager(QObject): # \return \type{Dict} dict with a 'status' key containing the string 'success' or 'error', and a 'message' key # containing a message for the user @pyqtSlot(QUrl, result = "QVariantMap") - def importContainer(self, file_url): - if not file_url: + def importContainer(self, file_url_or_string: Union[QUrl, str]) -> Dict[str, str]: + if not file_url_or_string: return { "status": "error", "message": "Invalid path"} - if isinstance(file_url, QUrl): - file_url = file_url.toLocalFile() + if isinstance(file_url_or_string, QUrl): + file_url = file_url_or_string.toLocalFile() + else: + file_url = file_url_or_string if not file_url or not os.path.exists(file_url): return { "status": "error", "message": "Invalid path" } @@ -438,7 +442,7 @@ class ContainerManager(QObject): ## Clear the top-most (user) containers of the active stacks. @pyqtSlot() - def clearUserContainers(self): + def clearUserContainers(self) -> None: self._machine_manager.blurSettings.emit() send_emits_containers = [] @@ -668,7 +672,7 @@ class ContainerManager(QObject): return new_change_instances @pyqtSlot(str, result = str) - def duplicateMaterial(self, material_id): + def duplicateMaterial(self, material_id: str) -> str: containers = self._container_registry.findInstanceContainers(id=material_id) if not containers: Logger.log("d", "Unable to duplicate the material with id %s, because it doesn't exist.", material_id) @@ -692,7 +696,7 @@ class ContainerManager(QObject): ## Get the singleton instance for this class. @classmethod - def getInstance(cls): + def getInstance(cls) -> "ContainerManager": # Note: Explicit use of class name to prevent issues with inheritance. if ContainerManager.__instance is None: ContainerManager.__instance = cls() @@ -717,7 +721,7 @@ class ContainerManager(QObject): if clear_settings: merge.clear() - def _updateContainerNameFilters(self): + def _updateContainerNameFilters(self) -> None: self._container_name_filters = {} for plugin_id, container_type in self._container_registry.getContainerTypes(): # Ignore default container types since those are not plugins From ccac9277a92c0fb3526ecffa6660ee2c853e0184 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 27 Feb 2017 11:20:22 +0100 Subject: [PATCH 068/128] Undo old testcode, added testcode for CURA-3334 --- cura/CameraAnimation.py | 9 +-------- cura/CuraApplication.py | 12 ++++++++++++ plugins/LayerView/LayerView.qml | 10 ++++++++++ 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/cura/CameraAnimation.py b/cura/CameraAnimation.py index 99aa6231db..c6051c58d1 100644 --- a/cura/CameraAnimation.py +++ b/cura/CameraAnimation.py @@ -6,7 +6,6 @@ from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector -from UM.Logger import Logger class CameraAnimation(QVariantAnimation): @@ -15,7 +14,6 @@ class CameraAnimation(QVariantAnimation): self._camera_tool = None self.setDuration(500) self.setEasingCurve(QEasingCurve.InOutQuad) - self.valueChanged.connect(self._onValueChanged) def setCameraTool(self, camera_tool): self._camera_tool = camera_tool @@ -26,10 +24,5 @@ class CameraAnimation(QVariantAnimation): def setTarget(self, target): self.setEndValue(QVector3D(target.x, target.y, target.z)) - # def updateCurrentValue(self, value): - # Logger.log("d", " ### value: %s" % str(value)) - # self._camera_tool.setOrigin(Vector(value.x(), value.y(), value.z())) - - def _onValueChanged(self, value): - Logger.log("d", " _onValueChanged value: %s" % str(value)) + def updateCurrentValue(self, value): self._camera_tool.setOrigin(Vector(value.x(), value.y(), value.z())) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index add7b4a143..61ead2d570 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1230,3 +1230,15 @@ class CuraApplication(QtApplication): def addNonSliceableExtension(self, extension): self._non_sliceable_extensions.append(extension) + + + @pyqtSlot("QVector3D") + def testQVector3D(self, vect): + Logger.log("d", "got QVector3D: %s : %s %s %s" % (vect, vect.x(), vect.y(), vect.z())) + + @pyqtProperty("QVector3D") + def getQVector3D(self): + from PyQt5.QtGui import QVector3D + vect = QVector3D(1.0, 2.0, 3.0) + Logger.log("d", "get QVector3D: %s" % vect) + return vect diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index 9da7a0f0d2..9e51ab084d 100644 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -306,6 +306,16 @@ Item } text: catalog.i18nc("@label", "Show Infill") } + CheckBox { + checked: true + onClicked: { + CuraApplication.log("getting QVector3D"); + var v = CuraApplication.getQVector3D; + CuraApplication.log("getting QVector3D"); + CuraApplication.testQVector3D(v); + } + text: catalog.i18nc("@label", "test") + } } } } From fbc7e0f7c47f7527ac8df62094864b7301281f93 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 27 Feb 2017 13:13:34 +0100 Subject: [PATCH 069/128] Take retraction_hop_enabled into account for extra z clearance. CURA-2729 --- cura/BuildVolume.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 477f3d462d..c911844b58 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -386,15 +386,19 @@ class BuildVolume(SceneNode): self.raftThicknessChanged.emit() def _updateExtraZClearance(self): - extra_z = None + extra_z = 0.0 extruders = ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId()) + use_extruders = False for extruder in extruders: - retraction_hop = extruder.getProperty("retraction_hop", "value") - if extra_z is None or retraction_hop > extra_z: - extra_z = retraction_hop - if extra_z is None: + if extruder.getProperty("retraction_hop_enabled", "value"): + retraction_hop = extruder.getProperty("retraction_hop", "value") + if extra_z is None or retraction_hop > extra_z: + extra_z = retraction_hop + use_extruders = True + if not use_extruders: # If no extruders, take global value. - extra_z = self._global_container_stack.getProperty("retraction_hop", "value") + if self._global_container_stack.getProperty("retraction_hop_enabled", "value"): + extra_z = self._global_container_stack.getProperty("retraction_hop", "value") if extra_z != self._extra_z_clearance: self._extra_z_clearance = extra_z @@ -890,7 +894,7 @@ class BuildVolume(SceneNode): _skirt_settings = ["adhesion_type", "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "brim_width", "brim_line_count", "raft_margin", "draft_shield_enabled", "draft_shield_dist"] _raft_settings = ["adhesion_type", "raft_base_thickness", "raft_interface_thickness", "raft_surface_layers", "raft_surface_thickness", "raft_airgap"] - _extra_z_settings = ["retraction_hop"] + _extra_z_settings = ["retraction_hop_enabled", "retraction_hop"] _prime_settings = ["extruder_prime_pos_x", "extruder_prime_pos_y", "extruder_prime_pos_z"] _tower_settings = ["prime_tower_enable", "prime_tower_size", "prime_tower_position_x", "prime_tower_position_y"] _ooze_shield_settings = ["ooze_shield_enabled", "ooze_shield_dist"] From 8237421bcfcd8435fd6d9e883764064386cbe186 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 27 Feb 2017 13:33:55 +0100 Subject: [PATCH 070/128] Undo testing QVector3D. CURA-3334 --- cura/CuraApplication.py | 12 ------------ plugins/LayerView/LayerView.qml | 10 ---------- 2 files changed, 22 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index a71422aa7d..62bf6f0e4d 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1232,15 +1232,3 @@ class CuraApplication(QtApplication): def addNonSliceableExtension(self, extension): self._non_sliceable_extensions.append(extension) - - - @pyqtSlot("QVector3D") - def testQVector3D(self, vect): - Logger.log("d", "got QVector3D: %s : %s %s %s" % (vect, vect.x(), vect.y(), vect.z())) - - @pyqtProperty("QVector3D") - def getQVector3D(self): - from PyQt5.QtGui import QVector3D - vect = QVector3D(1.0, 2.0, 3.0) - Logger.log("d", "get QVector3D: %s" % vect) - return vect diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index 9e51ab084d..9da7a0f0d2 100644 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -306,16 +306,6 @@ Item } text: catalog.i18nc("@label", "Show Infill") } - CheckBox { - checked: true - onClicked: { - CuraApplication.log("getting QVector3D"); - var v = CuraApplication.getQVector3D; - CuraApplication.log("getting QVector3D"); - CuraApplication.testQVector3D(v); - } - text: catalog.i18nc("@label", "test") - } } } } From 8602d984a9caf73dc40168e0e7937c9e930d035b Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Mon, 27 Feb 2017 13:36:20 +0100 Subject: [PATCH 071/128] Stop $PYTHONPATH from messing up the search path for DLLs. CURA-3418 Cura build on Win 64 fails due to $PYTHONPATH --- cura_app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cura_app.py b/cura_app.py index 633110eff8..989c45b37a 100755 --- a/cura_app.py +++ b/cura_app.py @@ -17,6 +17,12 @@ if Platform.isLinux(): # Needed for platform.linux_distribution, which is not av libGL = find_library("GL") ctypes.CDLL(libGL, ctypes.RTLD_GLOBAL) +# When frozen, i.e. installer version, don't let PYTHONPATH mess up the search path for DLLs. +if Platform.isWindows() and hasattr(sys, "frozen"): + try: + del os.environ["PYTHONPATH"] + except KeyError: pass + #WORKAROUND: GITHUB-704 GITHUB-708 # It looks like setuptools creates a .pth file in # the default /usr/lib which causes the default site-packages From f5f02ead88094e130d31ee3b59600ddcda763a8f Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Mon, 27 Feb 2017 17:12:01 +0100 Subject: [PATCH 072/128] Added some debug. CURA-3418 Cura build on Win 64 fails due to $PYTHONPATH --- cura_app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura_app.py b/cura_app.py index 989c45b37a..2fc8752cee 100755 --- a/cura_app.py +++ b/cura_app.py @@ -60,6 +60,10 @@ if Platform.isWindows() and hasattr(sys, "frozen"): sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w") sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w") +if Platform.isWindows(): + print("sys.path: " + repr(sys.path)) + print("has sys.frozen: " + str(hasattr(sys, "frozen"))) + # Force an instance of CuraContainerRegistry to be created and reused later. cura.Settings.CuraContainerRegistry.CuraContainerRegistry.getInstance() From 2462699982f17febc706bd71b86f207a0786c12d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 28 Feb 2017 10:25:42 +0100 Subject: [PATCH 073/128] Switching profiles now shows a new dialog with all the changes. CURA-3221 --- cura/CuraApplication.py | 15 ++- cura/Settings/MachineManager.py | 5 +- cura/Settings/UserChangesModel.py | 112 ++++++++++++++++ resources/qml/Cura.qml | 15 +++ .../qml/DiscardOrKeepProfileChangesDialog.qml | 126 ++++++++++++++++++ 5 files changed, 270 insertions(+), 3 deletions(-) create mode 100644 cura/Settings/UserChangesModel.py create mode 100644 resources/qml/DiscardOrKeepProfileChangesDialog.qml diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index add7b4a143..a180c72366 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -53,7 +53,7 @@ from . import MachineActionManager from cura.Settings.MachineManager import MachineManager from cura.Settings.ExtruderManager import ExtruderManager -from cura.Settings.CuraContainerRegistry import CuraContainerRegistry +from cura.Settings.UserChangesModel import UserChangesModel from cura.Settings.ExtrudersModel import ExtrudersModel from cura.Settings.ContainerSettingsModel import ContainerSettingsModel from cura.Settings.MaterialSettingsVisibilityHandler import MaterialSettingsVisibilityHandler @@ -323,11 +323,23 @@ class CuraApplication(QtApplication): ## A reusable dialogbox # showMessageBox = pyqtSignal(str, str, str, str, int, int, arguments = ["title", "text", "informativeText", "detailedText", "buttons", "icon"]) + def messageBox(self, title, text, informativeText = "", detailedText = "", buttons = QMessageBox.Ok, icon = QMessageBox.NoIcon, callback = None, callback_arguments = []): self._message_box_callback = callback self._message_box_callback_arguments = callback_arguments self.showMessageBox.emit(title, text, informativeText, detailedText, buttons, icon) + showDiscardOrKeepProfileChanges = pyqtSignal() + + def discardOrKeepProfileChanges(self, callback = None, callback_arguments = []): + self._discard_or_keep_changes_callback = callback + self._discard_or_keep_changes_callback_arguments = callback_arguments + self.showDiscardOrKeepProfileChanges.emit() + + @pyqtSlot(int) + def discardOrKeepProfileChangesClosed(self, button): + pass + @pyqtSlot(int) def messageBoxClosed(self, button): if self._message_box_callback: @@ -653,6 +665,7 @@ class CuraApplication(QtApplication): qmlRegisterType(MaterialSettingsVisibilityHandler, "Cura", 1, 0, "MaterialSettingsVisibilityHandler") qmlRegisterType(QualitySettingsModel, "Cura", 1, 0, "QualitySettingsModel") qmlRegisterType(MachineNameValidator, "Cura", 1, 0, "MachineNameValidator") + qmlRegisterType(UserChangesModel, "Cura", 1, 1, "UserChangesModel") qmlRegisterSingletonType(ContainerManager, "Cura", 1, 0, "ContainerManager", ContainerManager.createContainerManager) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index ce42854d43..38e1ad4d6a 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -957,7 +957,8 @@ class MachineManager(QObject): details = "\n ".join([details_text, ] + details_list) num_changed_settings = len(details_list) - Application.getInstance().messageBox( + Application.getInstance().discardOrKeepProfileChanges() + '''Application.getInstance().messageBox( catalog.i18nc("@window:title", "Switched profiles"), catalog.i18nc( "@label", @@ -968,7 +969,7 @@ class MachineManager(QObject): details, buttons=QMessageBox.Yes + QMessageBox.No, icon=QMessageBox.Question, - callback=self._keepUserSettingsDialogCallback) + callback=self._keepUserSettingsDialogCallback)''' def _keepUserSettingsDialogCallback(self, button): if button == QMessageBox.Yes: diff --git a/cura/Settings/UserChangesModel.py b/cura/Settings/UserChangesModel.py new file mode 100644 index 0000000000..1ff0a486b7 --- /dev/null +++ b/cura/Settings/UserChangesModel.py @@ -0,0 +1,112 @@ +from UM.Qt.ListModel import ListModel + +from PyQt5.QtCore import pyqtSlot, Qt +from UM.Application import Application +from cura.Settings.ExtruderManager import ExtruderManager +from UM.Settings.ContainerRegistry import ContainerRegistry +from UM.i18n import i18nCatalog + +import os + +class UserChangesModel(ListModel): + KeyRole = Qt.UserRole + 1 + LabelRole = Qt.UserRole + 2 + ExtruderRole = Qt.UserRole +3 + OriginalValueRole = Qt.UserRole + 4 + UserValueRole = Qt.UserRole + 6 + CategoryRole = Qt.UserRole + 7 + + def __init__(self, parent = None): + super().__init__(parent = parent) + self.addRoleName(self.KeyRole, "key") + self.addRoleName(self.LabelRole, "label") + self.addRoleName(self.ExtruderRole, "extruder") + self.addRoleName(self.OriginalValueRole, "original_value") + self.addRoleName(self.UserValueRole, "user_value") + self.addRoleName(self.CategoryRole, "category") + + Application.getInstance().globalContainerStackChanged.connect(self._update) + self._i18n_catalog = None + + self._update() + + @pyqtSlot() + def forceUpdate(self): + self._update() + + def _update(self): + items = [] + global_stack = Application.getInstance().getGlobalContainerStack() + stacks = ExtruderManager.getInstance().getUsedExtruderStacks() + + # Ensure that the global stack is in the list of stacks. + if global_stack.getProperty("machine_extruder_count", "value") > 1: + stacks.append(global_stack) + + # Check if the definition container has a translation file and ensure it's loaded. + definition = global_stack.getBottom() + + definition_suffix = ContainerRegistry.getMimeTypeForContainer(type(definition)).preferredSuffix + catalog = i18nCatalog(os.path.basename(definition.getId() + "." + definition_suffix)) + + if catalog.hasTranslationLoaded(): + self._i18n_catalog = catalog + + for file_name in definition.getInheritedFiles(): + catalog = i18nCatalog(os.path.basename(file_name)) + if catalog.hasTranslationLoaded(): + self._i18n_catalog = catalog + + for stack in stacks: + # Make a list of all containers in the stack. + containers = [] + latest_stack = stack + while latest_stack: + containers.extend(latest_stack.getContainers()) + latest_stack = latest_stack.getNextStack() + + # Drop the user container. + user_changes = containers.pop(0) + + for setting_key in user_changes.getAllKeys(): + original_value = None + + # Find the category of the instance by moving up until we find a category. + category = user_changes.getInstance(setting_key).definition + while category.type != "category": + category = category.parent + + # Handle translation (and fallback if we weren't able to find any translation files. + if self._i18n_catalog: + category_label = self._i18n_catalog.i18nc(category.key + " label", category.label) + else: + category_label = category.label + + if self._i18n_catalog: + label = self._i18n_catalog.i18nc(setting_key + " label", stack.getProperty(setting_key, "label")) + else: + label = stack.getProperty(setting_key, "label") + + for container in containers: + if stack == global_stack: + resolve = global_stack.getProperty(setting_key, "resolve") + if resolve is not None: + original_value = resolve + break + + original_value = container.getProperty(setting_key, "value") + if original_value is not None: + break + + item_to_add = {"key": setting_key, + "label": label, + "user_value": user_changes.getProperty(setting_key, "value"), + "original_value": original_value, + "extruder": "", + "category": category_label} + + if stack != global_stack: + item_to_add["extruder"] = stack.getName() + + items.append(item_to_add) + self.setItems(items) \ No newline at end of file diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index b73bd21600..8b70e293b4 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -882,6 +882,21 @@ UM.MainWindow } } + DiscardOrKeepProfileChangesDialog + { + id: discardOrKeepProfileChangesDialog + } + + Connections + { + target: Printer + onShowDiscardOrKeepProfileChanges: + { + discardOrKeepProfileChangesDialog.show() + } + + } + Connections { target: Cura.Actions.addMachine diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml new file mode 100644 index 0000000000..2744ba3847 --- /dev/null +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -0,0 +1,126 @@ +// Copyright (c) 2017 Ultimaker B.V. +// Cura is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 1.1 +import QtQuick.Dialogs 1.2 + +import UM 1.2 as UM +import Cura 1.1 as Cura + +UM.Dialog +{ + id: base + title: catalog.i18nc("@title:window", "Discard or Keep changes") + + width: 500 + height: 500 + property var changesModel: Cura.UserChangesModel{ id: userChangesModel} + onVisibilityChanged: + { + if(visible) + { + changesModel.forceUpdate() + } + } + + Column + { + anchors.fill: parent + + UM.I18nCatalog + { + id: catalog; + name:"cura" + } + Label + { + text: "You have customized some default profile settings. Would you like to keep or discard those settings?" + anchors.margins: UM.Theme.getSize("default_margin").width + anchors.left: parent.left + anchors.right: parent.right + } + + TableView + { + anchors.margins: UM.Theme.getSize("default_margin").width + anchors.left: parent.left + anchors.right: parent.right + height: 200 + id: tableView + Component + { + id: labelDelegate + Label + { + property var extruder_name: userChangesModel.getItem(styleData.row).extruder + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + font: UM.Theme.getFont("default") + text: + { + var result = styleData.value + if (extruder_name!= "") + { + result += " (" + extruder_name + ")" + } + return result + } + } + } + + Component + { + id: defaultDelegate + Label + { + text: styleData.value + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("setting_control_disabled_text") + } + } + + TableViewColumn + { + role: "label" + title: catalog.i18nc("@title:column", "Profile settings") + delegate: labelDelegate + width: tableView.width * 0.5 + } + + TableViewColumn + { + role: "original_value" + title: "default" + width: tableView.width * 0.25 + delegate: defaultDelegate + } + TableViewColumn + { + role: "user_value" + title: catalog.i18nc("@title:column", "Customized") + width: tableView.width * 0.25 - 1 + } + section.property: "category" + section.delegate: Label + { + text: section + font.bold: true + } + + model: base.changesModel + } + + Row + { + Button + { + text: catalog.i18nc("@action:button", "Keep"); + } + Button + { + text: catalog.i18nc("@action:button", "Discard"); + } + } + } +} \ No newline at end of file From 454a5969c2162ffd82ae079ab0f4ef9cb35fe798 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Tue, 28 Feb 2017 10:25:44 +0100 Subject: [PATCH 074/128] Removed debug. CURA-3418 Cura build on Win 64 fails due to $PYTHONPATH --- cura_app.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cura_app.py b/cura_app.py index 2fc8752cee..989c45b37a 100755 --- a/cura_app.py +++ b/cura_app.py @@ -60,10 +60,6 @@ if Platform.isWindows() and hasattr(sys, "frozen"): sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w") sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w") -if Platform.isWindows(): - print("sys.path: " + repr(sys.path)) - print("has sys.frozen: " + str(hasattr(sys, "frozen"))) - # Force an instance of CuraContainerRegistry to be created and reused later. cura.Settings.CuraContainerRegistry.CuraContainerRegistry.getInstance() From 85b58c9296847e6a54b9c8d93de9f00268914154 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 28 Feb 2017 12:35:08 +0100 Subject: [PATCH 075/128] Pressing the discard button now actually discards the changes CURA-3221 --- cura/CuraApplication.py | 15 ++++--- cura/Settings/MachineManager.py | 42 ------------------- .../qml/DiscardOrKeepProfileChangesDialog.qml | 10 +++++ 3 files changed, 19 insertions(+), 48 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index a180c72366..d273285be3 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -331,14 +331,17 @@ class CuraApplication(QtApplication): showDiscardOrKeepProfileChanges = pyqtSignal() - def discardOrKeepProfileChanges(self, callback = None, callback_arguments = []): - self._discard_or_keep_changes_callback = callback - self._discard_or_keep_changes_callback_arguments = callback_arguments + def discardOrKeepProfileChanges(self): self.showDiscardOrKeepProfileChanges.emit() - @pyqtSlot(int) - def discardOrKeepProfileChangesClosed(self, button): - pass + @pyqtSlot(str) + def discardOrKeepProfileChangesClosed(self, option): + if option == "discard": + global_stack = self.getGlobalContainerStack() + for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()): + extruder.getTop().clear() + + global_stack.getTop().clear() @pyqtSlot(int) def messageBoxClosed(self, button): diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 38e1ad4d6a..42f0edefe1 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -939,49 +939,7 @@ class MachineManager(QObject): container.nameChanged.connect(self._onQualityNameChanged) def _askUserToKeepOrClearCurrentSettings(self): - # Ask the user if the user profile should be cleared or not (discarding the current settings) - # In Simple Mode we assume the user always wants to keep the (limited) current settings - details_text = catalog.i18nc("@label", "You made changes to the following setting(s)/override(s):") - - # user changes in global stack - details_list = [setting.definition.label for setting in self._global_container_stack.getTop().findInstances(**{})] - - # user changes in extruder stacks - stacks = list(ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())) - for stack in stacks: - details_list.extend([ - "%s (%s)" % (setting.definition.label, stack.getName()) - for setting in stack.getTop().findInstances(**{})]) - - # Format to output string - details = "\n ".join([details_text, ] + details_list) - - num_changed_settings = len(details_list) Application.getInstance().discardOrKeepProfileChanges() - '''Application.getInstance().messageBox( - catalog.i18nc("@window:title", "Switched profiles"), - catalog.i18nc( - "@label", - "Do you want to transfer your %d changed setting(s)/override(s) to this profile?") % num_changed_settings, - catalog.i18nc( - "@label", - "If you transfer your settings they will override settings in the profile. If you don't transfer these settings, they will be lost."), - details, - buttons=QMessageBox.Yes + QMessageBox.No, - icon=QMessageBox.Question, - callback=self._keepUserSettingsDialogCallback)''' - - def _keepUserSettingsDialogCallback(self, button): - if button == QMessageBox.Yes: - # Yes, keep the settings in the user profile with this profile - pass - elif button == QMessageBox.No: - # No, discard the settings in the user profile - global_stack = Application.getInstance().getGlobalContainerStack() - for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()): - extruder.getTop().clear() - - global_stack.getTop().clear() @pyqtProperty(str, notify = activeVariantChanged) def activeVariantName(self): diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index 2744ba3847..fac428aea1 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -116,10 +116,20 @@ UM.Dialog Button { text: catalog.i18nc("@action:button", "Keep"); + onClicked: + { + Printer.discardOrKeepProfileChangesClosed("keep") + base.hide() + } } Button { text: catalog.i18nc("@action:button", "Discard"); + onClicked: + { + Printer.discardOrKeepProfileChangesClosed("discard") + base.hide() + } } } } From 4d7133610de793755f46cf409ea7ef133c939d22 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 28 Feb 2017 13:38:15 +0100 Subject: [PATCH 076/128] Updated layout of dialog CURA-3221 --- .../qml/DiscardOrKeepProfileChangesDialog.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index fac428aea1..4f7b1651cc 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -14,7 +14,7 @@ UM.Dialog title: catalog.i18nc("@title:window", "Discard or Keep changes") width: 500 - height: 500 + height: 300 property var changesModel: Cura.UserChangesModel{ id: userChangesModel} onVisibilityChanged: { @@ -39,6 +39,13 @@ UM.Dialog anchors.margins: UM.Theme.getSize("default_margin").width anchors.left: parent.left anchors.right: parent.right + font: UM.Theme.getFont("default_bold") + wrapMode: Text.WordWrap + } + Item // Spacer + { + height: UM.Theme.getSize("default_margin").height + width: UM.Theme.getSize("default_margin").width } TableView @@ -111,8 +118,15 @@ UM.Dialog model: base.changesModel } + Item // Spacer + { + height: UM.Theme.getSize("default_margin").height + width: UM.Theme.getSize("default_margin").width + } Row { + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("default_margin").width Button { text: catalog.i18nc("@action:button", "Keep"); From 4d32bbda99651d49a8a0462677cf2d57dc4fc53e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 28 Feb 2017 13:42:35 +0100 Subject: [PATCH 077/128] Values are now converted to string. For some reason this causes a different rounding to occur. I don't know why, but it does solve the problem CURA-3221 --- cura/Settings/UserChangesModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/UserChangesModel.py b/cura/Settings/UserChangesModel.py index 1ff0a486b7..48296b9907 100644 --- a/cura/Settings/UserChangesModel.py +++ b/cura/Settings/UserChangesModel.py @@ -101,7 +101,7 @@ class UserChangesModel(ListModel): item_to_add = {"key": setting_key, "label": label, "user_value": user_changes.getProperty(setting_key, "value"), - "original_value": original_value, + "original_value": str(original_value), "extruder": "", "category": category_label} From af21146fef87bd631eff2f7fb8b3830f57a2061a Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 28 Feb 2017 14:07:12 +0100 Subject: [PATCH 078/128] Layout improvements CURA-3221 --- .../qml/DiscardOrKeepProfileChangesDialog.qml | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index 4f7b1651cc..2b997cb00c 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -27,25 +27,36 @@ UM.Dialog Column { anchors.fill: parent + spacing: UM.Theme.getSize("default_margin").width UM.I18nCatalog { id: catalog; name:"cura" } - Label + + Row { - text: "You have customized some default profile settings. Would you like to keep or discard those settings?" + height: childrenRect.height anchors.margins: UM.Theme.getSize("default_margin").width anchors.left: parent.left anchors.right: parent.right - font: UM.Theme.getFont("default_bold") - wrapMode: Text.WordWrap - } - Item // Spacer - { - height: UM.Theme.getSize("default_margin").height - width: UM.Theme.getSize("default_margin").width + spacing: UM.Theme.getSize("default_margin").width + UM.RecolorImage + { + source: UM.Theme.getIcon("star") + width : 30 + height: width + color: UM.Theme.getColor("setting_control_button") + } + + Label + { + text: "You have customized some default profile settings.\nWould you like to keep or discard those settings?" + anchors.margins: UM.Theme.getSize("default_margin").width + font: UM.Theme.getFont("default_bold") + wrapMode: Text.WordWrap + } } TableView @@ -118,15 +129,11 @@ UM.Dialog model: base.changesModel } - Item // Spacer - { - height: UM.Theme.getSize("default_margin").height - width: UM.Theme.getSize("default_margin").width - } Row { anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width + spacing: UM.Theme.getSize("default_margin").width Button { text: catalog.i18nc("@action:button", "Keep"); From cae40da7aa025578a678e0d1ea2b28d4df003b8a Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 28 Feb 2017 14:23:46 +0100 Subject: [PATCH 079/128] JSON fix: put material_print_temperature_layer_0 back to normal print temp for all machines other than UM3 family (CURA-3359) --- resources/definitions/fdmprinter.def.json | 2 +- resources/definitions/ultimaker3.def.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 6c37477191..053de6f78b 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1297,7 +1297,7 @@ "unit": "°C", "type": "float", "default_value": 215, - "value": "material_print_temperature + 5", + "value": "material_print_temperature", "minimum_value": "-273.15", "minimum_value_warning": "0", "maximum_value_warning": "260", diff --git a/resources/definitions/ultimaker3.def.json b/resources/definitions/ultimaker3.def.json index d7245e5178..27db3f19c7 100644 --- a/resources/definitions/ultimaker3.def.json +++ b/resources/definitions/ultimaker3.def.json @@ -106,6 +106,7 @@ "line_width": { "value": "machine_nozzle_size * 0.875" }, "machine_min_cool_heat_time_window": { "value": "15" }, "default_material_print_temperature": { "value": "200" }, + "material_print_temperature_layer_0": { "value": "material_print_temperature + 5" }, "material_bed_temperature": { "maximum_value": "115" }, "material_bed_temperature_layer_0": { "maximum_value": "115" }, "material_standby_temperature": { "value": "100" }, From 807542cc1f79fffcd6ed751286d23fb7b1272b2e Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Tue, 28 Feb 2017 14:36:36 +0100 Subject: [PATCH 080/128] Fixed a merge problem. CURA-3431 Not possible to export a profile --- cura/Settings/ContainerManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 7bc2ff9efc..7e92b7dfd3 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -856,10 +856,10 @@ class ContainerManager(QObject): return self._container_registry.importProfile(path) @pyqtSlot("QVariantList", QUrl, str) - def exportProfile(self, instance_id, file_url, file_type): + def exportProfile(self, instance_id: str, file_url: QUrl, file_type: str) -> None: if not file_url.isValid(): return path = file_url.toLocalFile() if not path: return - self._container_registry.exportProfile(instance_id, path, file_type) + self._container_registry.exportProfile(instance_id, path, file_type) From 9ea7681ba033a1398007194124b1a01a165de6f9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 Mar 2017 09:47:30 +0100 Subject: [PATCH 081/128] Fix selecting heated bed for UMO This was broken by the type hinting refactors. Contributes to issue CURA-3405. --- plugins/UltimakerMachineActions/UMOUpgradeSelection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UltimakerMachineActions/UMOUpgradeSelection.py b/plugins/UltimakerMachineActions/UMOUpgradeSelection.py index 238a13bf61..0428c0f5c2 100644 --- a/plugins/UltimakerMachineActions/UMOUpgradeSelection.py +++ b/plugins/UltimakerMachineActions/UMOUpgradeSelection.py @@ -45,7 +45,7 @@ class UMOUpgradeSelection(MachineAction): def _createDefinitionChangesContainer(self, global_container_stack): # Create a definition_changes container to store the settings in and add it to the stack - definition_changes_container = UM.Settings.InstanceContainer(global_container_stack.getName() + "_settings") + definition_changes_container = UM.Settings.InstanceContainer.InstanceContainer(global_container_stack.getName() + "_settings") definition = global_container_stack.getBottom() definition_changes_container.setDefinition(definition) definition_changes_container.addMetaDataEntry("type", "definition_changes") From 9b63f1237ab53cfead631b6d042ce43b62f23314 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 1 Mar 2017 09:48:26 +0100 Subject: [PATCH 082/128] Instead of the setting function we now show the calculated value for settingoverride dialog CURA-3221 --- cura/Settings/UserChangesModel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/Settings/UserChangesModel.py b/cura/Settings/UserChangesModel.py index 48296b9907..81dfe5809b 100644 --- a/cura/Settings/UserChangesModel.py +++ b/cura/Settings/UserChangesModel.py @@ -5,6 +5,7 @@ from UM.Application import Application from cura.Settings.ExtruderManager import ExtruderManager from UM.Settings.ContainerRegistry import ContainerRegistry from UM.i18n import i18nCatalog +from UM.Settings.SettingFunction import SettingFunction import os @@ -98,9 +99,13 @@ class UserChangesModel(ListModel): if original_value is not None: break + # If a value is a function, ensure it's called with the stack it's in. + if isinstance(original_value, SettingFunction): + original_value = original_value(stack) + item_to_add = {"key": setting_key, "label": label, - "user_value": user_changes.getProperty(setting_key, "value"), + "user_value": str(user_changes.getProperty(setting_key, "value")), "original_value": str(original_value), "extruder": "", "category": category_label} From 82b2bc13e2be815dcf82d5f48defbb4b52a4fa45 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 Mar 2017 09:48:53 +0100 Subject: [PATCH 083/128] Don't cool bed if there is no heated bed Makes the line a bit unusable, but it was already unusable, really. Contributes to issue CURA-3405. --- resources/definitions/ultimaker_original.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index 03b3b50a08..bb73622413 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -62,7 +62,7 @@ "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E6 ;extrude 6 mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." }, "machine_end_gcode": { - "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + "value": "'M104 S0 ;extruder heater off\\nM140 S0 ;heated bed heater off (if you have it)\\nG91 ;relative positioning\\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\\nM84 ;steppers off\\nG90 ;absolute positioning' if machine_heated_bed else 'M104 S0 ;extruder heater off\\nG91 ;relative positioning\\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\\nM84 ;steppers off\\nG90 ;absolute positioning'" } } } From 0eec48b9e30352161eeb08c716184164ea6b14f1 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 1 Mar 2017 10:53:53 +0100 Subject: [PATCH 084/128] Fix reslice when deleting nodes, fix moving groups. CURA-3412 --- .../CuraEngineBackend/CuraEngineBackend.py | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index f2023e270a..35d0aaef67 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -105,6 +105,7 @@ class CuraEngineBackend(QObject, Backend): self._backend_log_max_lines = 20000 # Maximum number of lines to buffer self._error_message = None # Pop-up message that shows errors. + self._last_num_objects = 0 # Count number of objects to see if there is something changed self.backendQuit.connect(self._onBackendQuit) self.backendConnected.connect(self._onBackendConnected) @@ -346,16 +347,28 @@ class CuraEngineBackend(QObject, Backend): if type(source) is not SceneNode: return - if source is self._scene.getRoot(): - return + root_scene_nodes_changed = False + if source == self._scene.getRoot(): + num_objects = 0 + for node in DepthFirstIterator(self._scene.getRoot()): + # For now this seems to be a reliable method to check for nodes that impact slicing + # From: SliceInfo, _onWriteStarted + if type(node) is not SceneNode or not node.getMeshData(): + continue + num_objects += 1 + if num_objects != self._last_num_objects: + self._last_num_objects = num_objects + root_scene_nodes_changed = True + else: + return self.determineAutoSlicing() - if source.getMeshData() is None: - return - - if source.getMeshData().getVertices() is None: - return + if not source.callDecoration("isGroup") and not root_scene_nodes_changed: + if source.getMeshData() is None: + return + if source.getMeshData().getVertices() is None: + return self.needsSlicing() self.stopSlicing() From a1281bc019e2505eb3a1239614d97be1073c938d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 1 Mar 2017 11:33:03 +0100 Subject: [PATCH 085/128] Clarified some of the text in the discard dialog CURA-3221 --- resources/qml/DiscardOrKeepProfileChangesDialog.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index 2b997cb00c..4f758d22eb 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -52,7 +52,7 @@ UM.Dialog Label { - text: "You have customized some default profile settings.\nWould you like to keep or discard those settings?" + text: "You have customized some profile settings.\nWould you like to keep or discard those settings?" anchors.margins: UM.Theme.getSize("default_margin").width font: UM.Theme.getFont("default_bold") wrapMode: Text.WordWrap @@ -101,7 +101,7 @@ UM.Dialog TableViewColumn { role: "label" - title: catalog.i18nc("@title:column", "Profile settings") + title: catalog.i18nc("@title:column", "Settings") delegate: labelDelegate width: tableView.width * 0.5 } @@ -109,7 +109,7 @@ UM.Dialog TableViewColumn { role: "original_value" - title: "default" + title: "Profile" width: tableView.width * 0.25 delegate: defaultDelegate } From 1ba8ee2051a4acd57816ebfaff321cf14c05b275 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 1 Mar 2017 11:35:06 +0100 Subject: [PATCH 086/128] Fixed issue that in some cases not all changed settings for all extruders were shown CURA-3221 --- cura/Settings/UserChangesModel.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cura/Settings/UserChangesModel.py b/cura/Settings/UserChangesModel.py index 81dfe5809b..9f559d4b40 100644 --- a/cura/Settings/UserChangesModel.py +++ b/cura/Settings/UserChangesModel.py @@ -38,11 +38,7 @@ class UserChangesModel(ListModel): def _update(self): items = [] global_stack = Application.getInstance().getGlobalContainerStack() - stacks = ExtruderManager.getInstance().getUsedExtruderStacks() - - # Ensure that the global stack is in the list of stacks. - if global_stack.getProperty("machine_extruder_count", "value") > 1: - stacks.append(global_stack) + stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() # Check if the definition container has a translation file and ensure it's loaded. definition = global_stack.getBottom() From 8a8b97d37120da9e050fbddefa93ea917d860318 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 1 Mar 2017 11:45:50 +0100 Subject: [PATCH 087/128] CuraEngineBackend now properly postpones onSceneChanged instead of ignoring some. CURA-3413 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 35d0aaef67..ab6e0a08a5 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -106,6 +106,7 @@ class CuraEngineBackend(QObject, Backend): self._backend_log_max_lines = 20000 # Maximum number of lines to buffer self._error_message = None # Pop-up message that shows errors. self._last_num_objects = 0 # Count number of objects to see if there is something changed + self._postponed_scene_change_sources = [] # scene change is postponed (by a tool) self.backendQuit.connect(self._onBackendQuit) self.backendConnected.connect(self._onBackendConnected) @@ -342,6 +343,8 @@ class CuraEngineBackend(QObject, Backend): # \param source The scene node that was changed. def _onSceneChanged(self, source): if self._tool_active: + # do it later + self._postponed_scene_change_sources.append(source) return if type(source) is not SceneNode: @@ -515,6 +518,10 @@ class CuraEngineBackend(QObject, Backend): def _onToolOperationStopped(self, tool): self._tool_active = False # React on scene change again self.determineAutoSlicing() + # Process all the postponed scene changes + while self._postponed_scene_change_sources: + source = self._postponed_scene_change_sources.pop(0) + self._onSceneChanged(source) ## Called when the user changes the active view mode. def _onActiveViewChanged(self): From 17e1fdf7a61f8044d49cb0c89de0d83d643fddab Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 Mar 2017 13:24:56 +0100 Subject: [PATCH 088/128] Increase warning temperature for initial layer as well It was already changed for normal printing temperature. Contributes to issue CURA-3433. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 053de6f78b..d838109f88 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1300,7 +1300,7 @@ "value": "material_print_temperature", "minimum_value": "-273.15", "minimum_value_warning": "0", - "maximum_value_warning": "260", + "maximum_value_warning": "270", "enabled": "machine_gcode_flavor != \"UltiGCode\"", "settable_per_mesh": false, "settable_per_extruder": true From 6cf1fa412160df164b88b90ebf9939f4e6da41fe Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 1 Mar 2017 13:27:25 +0100 Subject: [PATCH 089/128] Removed uneeded global container changed signal hook CURA-3221 --- cura/Settings/UserChangesModel.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cura/Settings/UserChangesModel.py b/cura/Settings/UserChangesModel.py index 9f559d4b40..ed070d55a9 100644 --- a/cura/Settings/UserChangesModel.py +++ b/cura/Settings/UserChangesModel.py @@ -26,7 +26,6 @@ class UserChangesModel(ListModel): self.addRoleName(self.UserValueRole, "user_value") self.addRoleName(self.CategoryRole, "category") - Application.getInstance().globalContainerStackChanged.connect(self._update) self._i18n_catalog = None self._update() From 3f059ff1d45bfc8f1a06762bd466c53cb54b1ef7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 Mar 2017 14:08:18 +0100 Subject: [PATCH 090/128] Reduce code duplication It stays unreadable though, because of JSON. Contributes to issue CURA-3405. --- resources/definitions/ultimaker_original.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index bb73622413..f3f188dd48 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -62,7 +62,7 @@ "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E6 ;extrude 6 mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." }, "machine_end_gcode": { - "value": "'M104 S0 ;extruder heater off\\nM140 S0 ;heated bed heater off (if you have it)\\nG91 ;relative positioning\\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\\nM84 ;steppers off\\nG90 ;absolute positioning' if machine_heated_bed else 'M104 S0 ;extruder heater off\\nG91 ;relative positioning\\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\\nM84 ;steppers off\\nG90 ;absolute positioning'" + "value": "'M104 S0 ;extruder heater off' + ('\\nM140 S0 ;heated bed heater off' if machine_heated_bed else '') + '\\nG91 ;relative positioning\\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\\nM84 ;steppers off\\nG90 ;absolute positioning'" } } } From 9f38ae5b6808dd3ca52a20575881d21faf95eeae Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 Mar 2017 14:30:48 +0100 Subject: [PATCH 091/128] Add material_print_temperature back into profiles The optimisation script didn't know that the temperature settings in material profiles now refers to default_material_print_temperature rather than material_print_temperature. This caused a few things to go wrong here. Contributes to issue CURA-3433. --- .../quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg | 3 +++ .../quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg | 3 +++ .../quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg | 2 ++ .../quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg | 2 ++ resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg | 3 +++ resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg | 3 +++ .../quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg | 2 ++ .../quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg | 2 ++ .../quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg | 3 +++ resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg | 3 +++ .../quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg | 1 + 11 files changed, 27 insertions(+) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg index f99c3997f7..f566b17be3 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg @@ -17,6 +17,9 @@ infill_wipe_dist = 0 layer_height = 0.2 machine_nozzle_cool_down_speed = 0.9 machine_nozzle_heat_up_speed = 1.4 +material_initial_print_temperature = =material_print_temperature - 5 +material_final_print_temperature = =material_print_temperature - 10 +material_print_temperature = =default_material_print_temperature + 10 prime_tower_size = 17 retraction_combing = off retraction_hop = 0.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg index c03e072c8e..003cf12a8c 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg @@ -17,6 +17,9 @@ infill_wipe_dist = 0 layer_height = 0.15 machine_nozzle_cool_down_speed = 0.9 machine_nozzle_heat_up_speed = 1.4 +material_initial_print_temperature = =material_print_temperature - 5 +material_final_print_temperature = =material_print_temperature - 10 +material_print_temperature = =default_material_print_temperature + 10 prime_tower_size = 17 retraction_combing = off retraction_hop = 0.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg index c88fe1a56a..630352de41 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg @@ -14,6 +14,8 @@ brim_width = 7 cool_min_speed = 5 infill_wipe_dist = 0 layer_height = 0.06 +material_initial_print_temperature = =material_print_temperature - 5 +material_final_print_temperature = =material_print_temperature - 10 material_print_temperature = =default_material_print_temperature + 2 prime_tower_size = 17 retraction_combing = off diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg index 9aaceb3a7a..4b70c9b967 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg @@ -13,6 +13,8 @@ weight = 0 brim_width = 7 cool_min_speed = 7 infill_wipe_dist = 0 +material_initial_print_temperature = =material_print_temperature - 5 +material_final_print_temperature = =material_print_temperature - 10 material_print_temperature = =default_material_print_temperature + 5 prime_tower_size = 17 retraction_combing = off diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg index 0cc074b7a0..e9370877e7 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg @@ -18,6 +18,9 @@ cool_min_speed = 6 infill_line_width = =round(line_width * 0.4 / 0.35, 2) infill_overlap_mm = 0.05 layer_height = 0.2 +material_final_print_temperature = =material_print_temperature - 10 +material_initial_print_temperature = =material_print_temperature - 5 +material_print_temperature = =default_material_print_temperature + 10 material_print_temperature_layer_0 = =material_print_temperature + 5 ooze_shield_angle = 40 raft_airgap = 0.25 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg index c887fb283d..cdb37b8f12 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg @@ -19,6 +19,9 @@ infill_line_width = =round(line_width * 0.4 / 0.35, 2) infill_overlap = =0 infill_overlap_mm = 0.05 layer_height = 0.15 +material_initial_print_temperature = =material_print_temperature - 5 +material_final_print_temperature = =material_print_temperature - 10 +material_print_temperature = =default_material_print_temperature + 10 material_print_temperature_layer_0 = =material_print_temperature + 5 ooze_shield_angle = 40 raft_airgap = 0.25 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg index 6555c13f74..f5e91fa71b 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg @@ -17,6 +17,8 @@ cool_min_speed = 8 infill_line_width = =round(line_width * 0.4 / 0.35, 2) infill_overlap_mm = 0.05 layer_height = 0.06 +material_initial_print_temperature = =material_print_temperature - 5 +material_final_print_temperature = =material_print_temperature - 10 material_print_temperature = =default_material_print_temperature - 10 material_print_temperature_layer_0 = =material_print_temperature + 5 ooze_shield_angle = 40 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg index eeea96cd18..d391e9df4f 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg @@ -16,6 +16,8 @@ cool_min_layer_time_fan_speed_max = 5 cool_min_speed = 5 infill_line_width = =round(line_width * 0.4 / 0.35, 2) infill_overlap_mm = 0.05 +material_initial_print_temperature = =material_print_temperature - 5 +material_final_print_temperature = =material_print_temperature - 10 material_print_temperature = =default_material_print_temperature material_print_temperature_layer_0 = =material_print_temperature + 5 ooze_shield_angle = 40 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg index bcdd8044b8..73ea54bfb8 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg @@ -20,7 +20,10 @@ infill_pattern = tetrahedral infill_sparse_density = 96 layer_height = 0.2 line_width = =machine_nozzle_size * 0.95 +material_final_print_temperature = =material_print_temperature - 10 material_flow = 106 +material_initial_print_temperature = =material_print_temperature - 5 +material_print_temperature = =default_material_print_temperature + 2 material_print_temperature_layer_0 = =default_material_print_temperature + 2 retraction_count_max = 12 retraction_extra_prime_amount = 0.8 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg index 567d9273b5..89b4910c98 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg @@ -20,7 +20,10 @@ infill_pattern = tetrahedral infill_sparse_density = 96 layer_height = 0.15 line_width = =machine_nozzle_size * 0.95 +material_final_print_temperature = =material_print_temperature - 10 material_flow = 106 +material_initial_print_temperature = =material_print_temperature - 5 +material_print_temperature = =default_material_print_temperature + 2 material_print_temperature_layer_0 = =default_material_print_temperature + 2 retraction_amount = 7 retraction_count_max = 12 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg index 75d76a32f2..d01f07a24e 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg @@ -19,6 +19,7 @@ infill_line_width = =round(line_width * 0.38 / 0.38, 2) infill_pattern = tetrahedral infill_sparse_density = 96 line_width = =machine_nozzle_size * 0.95 +material_final_print_temperature = =material_print_temperature - 10 material_flow = 106 material_initial_print_temperature = =material_print_temperature - 10 material_print_temperature = =default_material_print_temperature From 4eca62370d86b6ad3269ea4c36efc2f80d8a0bd3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 Mar 2017 14:33:55 +0100 Subject: [PATCH 092/128] Normalise print temperature so that normal quality is at default temperature All print temperatures go down 5 degrees and then in the material profile the temperature is increased by 5. This gives the normal profile a +0 instead of +5. Contributes to issue CURA-3433. --- .../quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg | 2 +- resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg | 2 +- .../quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg | 2 +- .../quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg index f566b17be3..f8090e057c 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg @@ -19,7 +19,7 @@ machine_nozzle_cool_down_speed = 0.9 machine_nozzle_heat_up_speed = 1.4 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 -material_print_temperature = =default_material_print_temperature + 10 +material_print_temperature = =default_material_print_temperature + 5 prime_tower_size = 17 retraction_combing = off retraction_hop = 0.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg index 003cf12a8c..a8d989fbae 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg @@ -19,7 +19,7 @@ machine_nozzle_cool_down_speed = 0.9 machine_nozzle_heat_up_speed = 1.4 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 -material_print_temperature = =default_material_print_temperature + 10 +material_print_temperature = =default_material_print_temperature + 5 prime_tower_size = 17 retraction_combing = off retraction_hop = 0.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg index 630352de41..5495276f1c 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg @@ -16,7 +16,7 @@ infill_wipe_dist = 0 layer_height = 0.06 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 -material_print_temperature = =default_material_print_temperature + 2 +material_print_temperature = =default_material_print_temperature - 3 prime_tower_size = 17 retraction_combing = off retraction_hop = 0.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg index 4b70c9b967..d18b878a4f 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg @@ -15,7 +15,7 @@ cool_min_speed = 7 infill_wipe_dist = 0 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 -material_print_temperature = =default_material_print_temperature + 5 +material_print_temperature = =default_material_print_temperature prime_tower_size = 17 retraction_combing = off retraction_hop = 0.2 From 0bf0b29a50a41e0a8a5f0cf20c68ece3034b7cea Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 1 Mar 2017 14:42:18 +0100 Subject: [PATCH 093/128] Added Create new profile button to Discard or keep profile changes dialog CURA-3398 --- .../qml/DiscardOrKeepProfileChangesDialog.qml | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index 4f758d22eb..570fd06013 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -129,29 +129,46 @@ UM.Dialog model: base.changesModel } - Row + Item { anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width - spacing: UM.Theme.getSize("default_margin").width - Button - { - text: catalog.i18nc("@action:button", "Keep"); - onClicked: - { - Printer.discardOrKeepProfileChangesClosed("keep") - base.hide() - } - } + anchors.left: parent.left + anchors.margins: UM.Theme.getSize("default_margin").width + height:childrenRect.height + Button { + id: discardButton text: catalog.i18nc("@action:button", "Discard"); + anchors.right: parent.right onClicked: { Printer.discardOrKeepProfileChangesClosed("discard") base.hide() } } + + Button + { + id: keepButton + text: catalog.i18nc("@action:button", "Keep"); + anchors.right: discardButton.left + anchors.rightMargin: UM.Theme.getSize("default_margin").width + onClicked: + { + Printer.discardOrKeepProfileChangesClosed("keep") + base.hide() + } + } + + Button + { + id: createNewProfileButton + text: catalog.i18nc("@action:button", "Create new profile"); + anchors.left: parent.left + action: Cura.Actions.addProfile + onClicked: base.hide() + } } } } \ No newline at end of file From 7658939198167e4950ec4c38412ac081335ccde2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 Mar 2017 14:52:03 +0100 Subject: [PATCH 094/128] Make initial layer print temperature dependent on actual printing temperature Otherwise when you change the print temperatures the initial print temperature doesn't change along. Contributes to issue CURA-3433. --- resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg | 2 +- resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg | 2 +- .../quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg index 73ea54bfb8..03ea216f32 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg @@ -24,7 +24,7 @@ material_final_print_temperature = =material_print_temperature - 10 material_flow = 106 material_initial_print_temperature = =material_print_temperature - 5 material_print_temperature = =default_material_print_temperature + 2 -material_print_temperature_layer_0 = =default_material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature retraction_count_max = 12 retraction_extra_prime_amount = 0.8 skin_overlap = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg index 89b4910c98..b29483a44f 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg @@ -24,7 +24,7 @@ material_final_print_temperature = =material_print_temperature - 10 material_flow = 106 material_initial_print_temperature = =material_print_temperature - 5 material_print_temperature = =default_material_print_temperature + 2 -material_print_temperature_layer_0 = =default_material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature retraction_amount = 7 retraction_count_max = 12 retraction_extra_prime_amount = 0.8 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg index d01f07a24e..99bd3a90da 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg @@ -23,7 +23,7 @@ material_final_print_temperature = =material_print_temperature - 10 material_flow = 106 material_initial_print_temperature = =material_print_temperature - 10 material_print_temperature = =default_material_print_temperature -material_print_temperature_layer_0 = =default_material_print_temperature +material_print_temperature_layer_0 = =material_print_temperature retraction_count_max = 12 retraction_extra_prime_amount = 0.8 skin_overlap = 15 From c0fc8287c023e733b1a02e6c5ccb11c2480eccbc Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Wed, 1 Mar 2017 14:47:56 +0000 Subject: [PATCH 095/128] Rename expand_skins_shrink_distance setting to min_skin_width_for_expansion. --- resources/definitions/fdmprinter.def.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 6bab81ae84..9b89f07bff 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1285,10 +1285,10 @@ "enabled": "expand_skins_into_infill", "settable_per_mesh": true }, - "expand_skins_shrink_distance": + "min_skin_width_for_expansion": { - "label": "Skin Shrink Distance", - "description": "The distance the skins are shrunk before they are expanded. Shrinking the skins slightly first removes the very narrow skin areas that are created when the model surface has a slope close to the vertical.", + "label": "Minimum Skin Width For Expansion", + "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", "unit": "mm", "type": "float", "default_value": 0, From d6bed392e4d3f6acc408f64cf75a3f90e4086e11 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Thu, 2 Mar 2017 07:46:55 +0000 Subject: [PATCH 096/128] Disable skin_angles setting when top_bottom_pattern is concentric. --- 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 a802ea1ca6..133c0b0dfb 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -914,6 +914,7 @@ "description": "A list of integer line directions to use when the top/bottom layers use the lines or zig zag pattern. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the traditional default angles (45 and 135 degrees).", "type": "[int]", "default_value": "[ ]", + "enabled": "top_bottom_pattern != 'concentric'", "settable_per_mesh": true }, "wall_0_inset": From aef39991a2e78c4f05731be0eb618349593a1871 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Thu, 2 Mar 2017 07:47:41 +0000 Subject: [PATCH 097/128] Disable infill_angles setting when infill_pattern is concentric, concentric_3d or cubicsubdiv. --- 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 133c0b0dfb..a79ac58547 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1104,6 +1104,7 @@ "description": "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the traditional default angles (45 and 135 degrees for the lines and zig zag patterns and 45 degrees for all other patterns).", "type": "[int]", "default_value": "[ ]", + "enabled": "infill_pattern != 'concentric' and infill_pattern != 'concentric_3d' and infill_pattern != 'cubicsubdiv'", "settable_per_mesh": true }, "sub_div_rad_mult": From d372e73eda7938e26859da9fe77ed8704bb3aa6d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 2 Mar 2017 10:35:22 +0100 Subject: [PATCH 098/128] Adjust warning values for temperatures We know that some printers (e.g. UM3) are able to reach at least 285 degrees so we set that to be our warning value now. The warning value for the bed temperature was probably mixed up with the warning value for nozzle temperature. Fixed that too. --- resources/definitions/fdmprinter.def.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index d838109f88..96aac81885 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1271,6 +1271,8 @@ "unit": "°C", "type": "float", "default_value": 210, + "minimum_value_warning": "0", + "maximum_value_warning": "285", "enabled": false, "settable_per_extruder": true, "minimum_value": "-273.15" @@ -1285,7 +1287,7 @@ "value": "default_material_print_temperature", "minimum_value": "-273.15", "minimum_value_warning": "0", - "maximum_value_warning": "270", + "maximum_value_warning": "285", "enabled": "not (material_flow_dependent_temperature) and machine_gcode_flavor != \"UltiGCode\"", "settable_per_mesh": false, "settable_per_extruder": true @@ -1300,7 +1302,7 @@ "value": "material_print_temperature", "minimum_value": "-273.15", "minimum_value_warning": "0", - "maximum_value_warning": "270", + "maximum_value_warning": "285", "enabled": "machine_gcode_flavor != \"UltiGCode\"", "settable_per_mesh": false, "settable_per_extruder": true @@ -1372,7 +1374,7 @@ "default_value": 60, "minimum_value": "-273.15", "minimum_value_warning": "0", - "maximum_value_warning": "260", + "maximum_value_warning": "130", "enabled": "machine_heated_bed and machine_gcode_flavor != \"UltiGCode\"", "settable_per_mesh": false, "settable_per_extruder": false, @@ -1389,7 +1391,7 @@ "value": "resolveOrValue('material_bed_temperature')", "minimum_value": "-273.15", "minimum_value_warning": "max(extruderValues('material_bed_temperature'))", - "maximum_value_warning": "260", + "maximum_value_warning": "130", "enabled": "machine_heated_bed and machine_gcode_flavor != \"UltiGCode\"", "settable_per_mesh": false, "settable_per_extruder": false, From 3e4ee0639c5180bd66575d832223bd9634d65a75 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Thu, 2 Mar 2017 11:46:28 +0100 Subject: [PATCH 099/128] Fixed case of the button text. CURA-3398 --- resources/qml/DiscardOrKeepProfileChangesDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index 570fd06013..a19400de5e 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -164,7 +164,7 @@ UM.Dialog Button { id: createNewProfileButton - text: catalog.i18nc("@action:button", "Create new profile"); + text: catalog.i18nc("@action:button", "Create New Profile"); anchors.left: parent.left action: Cura.Actions.addProfile onClicked: base.hide() From c54d5ce707e704e297a8212bbf757338febb8023 Mon Sep 17 00:00:00 2001 From: "U-ULTIMAKER\\j.ha" Date: Thu, 2 Mar 2017 13:15:29 +0100 Subject: [PATCH 100/128] Fixed compatibility mode active extruder. CURA-3321 --- cura/LayerDataBuilder.py | 2 +- plugins/CuraEngineBackend/CuraEngineBackend.py | 1 - plugins/LayerView/LayerPass.py | 0 plugins/LayerView/layers.shader | 0 plugins/LayerView/layers3d.shader | 4 ++-- 5 files changed, 3 insertions(+), 4 deletions(-) mode change 100644 => 100755 cura/LayerDataBuilder.py mode change 100644 => 100755 plugins/CuraEngineBackend/CuraEngineBackend.py mode change 100644 => 100755 plugins/LayerView/LayerPass.py mode change 100644 => 100755 plugins/LayerView/layers.shader mode change 100644 => 100755 plugins/LayerView/layers3d.shader diff --git a/cura/LayerDataBuilder.py b/cura/LayerDataBuilder.py old mode 100644 new mode 100755 index 7cb6f75df3..df4b9e3218 --- a/cura/LayerDataBuilder.py +++ b/cura/LayerDataBuilder.py @@ -63,7 +63,7 @@ class LayerDataBuilder(MeshBuilder): line_dimensions = numpy.empty((vertex_count, 2), numpy.float32) colors = numpy.empty((vertex_count, 4), numpy.float32) indices = numpy.empty((index_count, 2), numpy.int32) - extruders = numpy.empty((vertex_count), numpy.int32) # Only usable for newer OpenGL versions + extruders = numpy.empty((vertex_count), numpy.float32) line_types = numpy.empty((vertex_count), numpy.float32) vertex_offset = 0 diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py old mode 100644 new mode 100755 index ab6e0a08a5..3aa226c518 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -517,7 +517,6 @@ class CuraEngineBackend(QObject, Backend): # \param tool The tool that the user was using. def _onToolOperationStopped(self, tool): self._tool_active = False # React on scene change again - self.determineAutoSlicing() # Process all the postponed scene changes while self._postponed_scene_change_sources: source = self._postponed_scene_change_sources.pop(0) diff --git a/plugins/LayerView/LayerPass.py b/plugins/LayerView/LayerPass.py old mode 100644 new mode 100755 diff --git a/plugins/LayerView/layers.shader b/plugins/LayerView/layers.shader old mode 100644 new mode 100755 diff --git a/plugins/LayerView/layers3d.shader b/plugins/LayerView/layers3d.shader old mode 100644 new mode 100755 index 5bc6066152..2108d85eb2 --- a/plugins/LayerView/layers3d.shader +++ b/plugins/LayerView/layers3d.shader @@ -16,7 +16,7 @@ vertex41core = in lowp vec4 a_material_color; in highp vec4 a_normal; in highp vec2 a_line_dim; // line width and thickness - in highp int a_extruder; // Note: cannot use this in compatibility, int is only available in newer OpenGL. + in highp float a_extruder; in highp float a_line_type; out lowp vec4 v_color; @@ -53,7 +53,7 @@ vertex41core = v_vertex = world_space_vert.xyz; v_normal = (u_normalMatrix * normalize(a_normal)).xyz; v_line_dim = a_line_dim; - v_extruder = a_extruder; + v_extruder = int(a_extruder); v_line_type = a_line_type; v_extruder_opacity = u_extruder_opacity; From c0b4d4399591ed81ee907b0af77eeff86a23ad02 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 2 Mar 2017 15:42:36 +0100 Subject: [PATCH 101/128] Add hotkey for reload all models Small change. I can't be bothered to make an issue for this. --- resources/qml/Actions.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 8d74f1b67c..1a345deafa 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -262,6 +262,7 @@ Item id: reloadAllAction; text: catalog.i18nc("@action:inmenu menubar:file","Re&load All Models"); iconName: "document-revert"; + shortcut: "F5" onTriggered: Printer.reloadAll(); } From 1029fb4dddae90fbfee8900cf3c0786612e31e95 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 2 Mar 2017 16:38:31 +0100 Subject: [PATCH 102/128] Not to trigger reslice happy anymore, only retrigger if necessary. Also using isSliceable instead of property check when inspecting root node. CURA-3413 CURA-3412 --- cura/CuraApplication.py | 18 ++------------- .../CuraEngineBackend/CuraEngineBackend.py | 22 +++++++++---------- plugins/SliceInfoPlugin/SliceInfo.py | 0 3 files changed, 12 insertions(+), 28 deletions(-) mode change 100644 => 100755 cura/CuraApplication.py mode change 100644 => 100755 plugins/SliceInfoPlugin/SliceInfo.py diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py old mode 100644 new mode 100755 index f28d2e4896..bd38bd8045 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1094,18 +1094,6 @@ class CuraApplication(QtApplication): fileLoaded = pyqtSignal(str) - def _onFileLoaded(self, job): - nodes = job.getResult() - for node in nodes: - if node is not None: - self.fileLoaded.emit(job.getFileName()) - node.setSelectable(True) - node.setName(os.path.basename(job.getFileName())) - op = AddSceneNodeOperation(node, self.getController().getScene().getRoot()) - op.push() - - self.getController().getScene().sceneChanged.emit(node) #Force scene change. - def _onJobFinished(self, job): if type(job) is not ReadMeshJob or not job.getResult(): return @@ -1133,10 +1121,8 @@ class CuraApplication(QtApplication): else: Logger.log("w", "Could not find a mesh in reloaded node.") - def _openFile(self, file): - job = ReadMeshJob(os.path.abspath(file)) - job.finished.connect(self._onFileLoaded) - job.start() + def _openFile(self, filename): + self.readLocalFile(QUrl.fromLocalFile(filename)) def _addProfileReader(self, profile_reader): # TODO: Add the profile reader to the list of plug-ins that can be used when importing profiles. diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 3aa226c518..981145bebd 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -342,11 +342,6 @@ class CuraEngineBackend(QObject, Backend): # # \param source The scene node that was changed. def _onSceneChanged(self, source): - if self._tool_active: - # do it later - self._postponed_scene_change_sources.append(source) - return - if type(source) is not SceneNode: return @@ -354,25 +349,27 @@ class CuraEngineBackend(QObject, Backend): if source == self._scene.getRoot(): num_objects = 0 for node in DepthFirstIterator(self._scene.getRoot()): - # For now this seems to be a reliable method to check for nodes that impact slicing - # From: SliceInfo, _onWriteStarted - if type(node) is not SceneNode or not node.getMeshData(): - continue - num_objects += 1 + # Only count sliceable objects + if node.callDecoration("isSliceable"): + num_objects += 1 if num_objects != self._last_num_objects: self._last_num_objects = num_objects root_scene_nodes_changed = True else: return - self.determineAutoSlicing() - if not source.callDecoration("isGroup") and not root_scene_nodes_changed: if source.getMeshData() is None: return if source.getMeshData().getVertices() is None: return + if self._tool_active: + # do it later, each source only has to be done once + if source not in self._postponed_scene_change_sources: + self._postponed_scene_change_sources.append(source) + return + self.needsSlicing() self.stopSlicing() self._onChanged() @@ -517,6 +514,7 @@ class CuraEngineBackend(QObject, Backend): # \param tool The tool that the user was using. def _onToolOperationStopped(self, tool): self._tool_active = False # React on scene change again + self.determineAutoSlicing() # Switch timer on if appropriate # Process all the postponed scene changes while self._postponed_scene_change_sources: source = self._postponed_scene_change_sources.pop(0) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py old mode 100644 new mode 100755 From bedb41b6d340d368fa6464542e50f60ad027ea88 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 2 Mar 2017 16:44:40 +0100 Subject: [PATCH 103/128] SliceInfo now only sends sliceable model hashes (layer data was also sent) --- plugins/SliceInfoPlugin/SliceInfo.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 05f7c0e6f5..50ca1dbd06 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -90,9 +90,8 @@ class SliceInfo(Extension): # Listing all files placed on the buildplate modelhashes = [] for node in DepthFirstIterator(CuraApplication.getInstance().getController().getScene().getRoot()): - if type(node) is not SceneNode or not node.getMeshData(): - continue - modelhashes.append(node.getMeshData().getHash()) + if node.callDecoration("isSliceable"): + modelhashes.append(node.getMeshData().getHash()) # Creating md5sums and formatting them as discussed on JIRA modelhash_formatted = ",".join(modelhashes) From bae7af1ea0eeee1cab39215f863c3af94111eccc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 2 Mar 2017 17:06:10 +0100 Subject: [PATCH 104/128] Dots in the ID no longer confuse workspace reader CURA-3450 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index b0d0da66c4..707238ab26 100644 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -476,7 +476,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader): return nodes def _stripFileToId(self, file): - return file.replace("Cura/", "").split(".")[0] + mime_type = MimeTypeDatabase.getMimeTypeForFile(file) + file = mime_type.stripExtension(file) + return file.replace("Cura/", "") def _getXmlProfileClass(self): return self._container_registry.getContainerForMimeType(MimeTypeDatabase.getMimeType("application/x-ultimaker-material-profile")) From 87336c4c013e032c6dd4f1b798d9554f775bcfd1 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 2 Mar 2017 17:11:33 +0100 Subject: [PATCH 105/128] Fixed exception for clean start --- cura/Settings/UserChangesModel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/Settings/UserChangesModel.py b/cura/Settings/UserChangesModel.py index ed070d55a9..526529ff6f 100644 --- a/cura/Settings/UserChangesModel.py +++ b/cura/Settings/UserChangesModel.py @@ -37,6 +37,8 @@ class UserChangesModel(ListModel): def _update(self): items = [] global_stack = Application.getInstance().getGlobalContainerStack() + if not global_stack: + return stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() # Check if the definition container has a translation file and ensure it's loaded. From 8e4f650746f84f7177b8a6e4cff40622e6b9c983 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 3 Mar 2017 09:47:58 +0100 Subject: [PATCH 106/128] Added a tiny bit of spacing between machine action buttons --- resources/qml/Preferences/MachinesPage.qml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index e6ddef7979..239e1a2aad 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -89,15 +89,20 @@ UM.ManagementPage id: machineActionRepeater model: base.currentItem ? Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null - Button + Item { - text: machineActionRepeater.model[index].label - onClicked: + width: childrenRect.width + 2 + height: childrenRect.height + Button { - actionDialog.content = machineActionRepeater.model[index].displayItem; - machineActionRepeater.model[index].displayItem.reset(); - actionDialog.title = machineActionRepeater.model[index].label; - actionDialog.show(); + text: machineActionRepeater.model[index].label + onClicked: + { + actionDialog.content = machineActionRepeater.model[index].displayItem; + machineActionRepeater.model[index].displayItem.reset(); + actionDialog.title = machineActionRepeater.model[index].label; + actionDialog.show(); + } } } } From cd9a8dbca5c3de7b989d5cb7696855d8a0257120 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 3 Mar 2017 10:19:53 +0100 Subject: [PATCH 107/128] Listbox now scales with window CURA-3221 --- resources/qml/DiscardOrKeepProfileChangesDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index a19400de5e..89327bfe1c 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -64,7 +64,7 @@ UM.Dialog anchors.margins: UM.Theme.getSize("default_margin").width anchors.left: parent.left anchors.right: parent.right - height: 200 + height: base.height - 100 id: tableView Component { From 4514f53ea4455e5825e3214d1f73c41be44fd9ce Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 3 Mar 2017 10:22:06 +0100 Subject: [PATCH 108/128] Formulas are no longer shown in discard changes dialog CURA-3221 --- cura/Settings/UserChangesModel.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/Settings/UserChangesModel.py b/cura/Settings/UserChangesModel.py index 526529ff6f..66ff88251d 100644 --- a/cura/Settings/UserChangesModel.py +++ b/cura/Settings/UserChangesModel.py @@ -93,13 +93,14 @@ class UserChangesModel(ListModel): break original_value = container.getProperty(setting_key, "value") - if original_value is not None: - break # If a value is a function, ensure it's called with the stack it's in. if isinstance(original_value, SettingFunction): original_value = original_value(stack) + if original_value is not None: + break + item_to_add = {"key": setting_key, "label": label, "user_value": str(user_changes.getProperty(setting_key, "value")), From 3a92bf73a8c4080626e5dd2bae45e107b9e04c4a Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 3 Mar 2017 12:37:06 +0100 Subject: [PATCH 109/128] JSON fix: moved expand_skins_expand_distance and min_skin_width_for_expansion out of illegitimate parent (CURA-3440) --- resources/definitions/fdmprinter.def.json | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index d1ef90ab6a..c0f4536eb0 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1272,32 +1272,32 @@ "value": "expand_skins_into_infill", "enabled": "expand_skins_into_infill", "settable_per_mesh": true - }, - "expand_skins_expand_distance": - { - "label": "Skin Expand Distance", - "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", - "unit": "mm", - "type": "float", - "default_value": 1.0, - "value": "infill_line_distance * 1.4", - "minimum_value": "0", - "enabled": "expand_skins_into_infill", - "settable_per_mesh": true - }, - "min_skin_width_for_expansion": - { - "label": "Minimum Skin Width For Expansion", - "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", - "unit": "mm", - "type": "float", - "default_value": 0, - "value": "wall_thickness * 0.5", - "minimum_value": "0", - "enabled": "expand_skins_into_infill", - "settable_per_mesh": true } } + }, + "expand_skins_expand_distance": + { + "label": "Skin Expand Distance", + "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", + "unit": "mm", + "type": "float", + "default_value": 1.0, + "value": "infill_line_distance * 1.4", + "minimum_value": "0", + "enabled": "expand_skins_into_infill", + "settable_per_mesh": true + }, + "min_skin_width_for_expansion": + { + "label": "Minimum Skin Width For Expansion", + "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", + "unit": "mm", + "type": "float", + "default_value": 0, + "value": "wall_thickness * 0.5", + "minimum_value": "0", + "enabled": "expand_skins_into_infill", + "settable_per_mesh": true } } }, From 5550dbf53f605afa8ae8cc69a8ff6e017a5e5f13 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 3 Mar 2017 12:41:14 +0100 Subject: [PATCH 110/128] JSON fix: don't expand bottom skins by default (CURA-3440) --- resources/definitions/fdmprinter.def.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index c0f4536eb0..cadbc55f38 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1269,7 +1269,6 @@ "description": "Expand lower skin areas (areas with air below) so that they are anchored by the infill layers above and below.", "type": "bool", "default_value": false, - "value": "expand_skins_into_infill", "enabled": "expand_skins_into_infill", "settable_per_mesh": true } From a7e08f10a40ddd21779f68d942e3424e37a4a0ec Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 3 Mar 2017 12:41:54 +0100 Subject: [PATCH 111/128] JSON fix: only enable skin expansion settings when we have it enabled (CURA-3440) --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index cadbc55f38..0fd49ee446 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1283,7 +1283,7 @@ "default_value": 1.0, "value": "infill_line_distance * 1.4", "minimum_value": "0", - "enabled": "expand_skins_into_infill", + "enabled": "expand_upper_skins or expand_lower_skins", "settable_per_mesh": true }, "min_skin_width_for_expansion": @@ -1295,7 +1295,7 @@ "default_value": 0, "value": "wall_thickness * 0.5", "minimum_value": "0", - "enabled": "expand_skins_into_infill", + "enabled": "expand_upper_skins or expand_lower_skins", "settable_per_mesh": true } } From 7997ae55eac332869b371db7fc3dacabce389c3b Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 2 Mar 2017 11:50:47 +0100 Subject: [PATCH 112/128] CURA-3397 Make discard button default --- resources/qml/DiscardOrKeepProfileChangesDialog.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index a19400de5e..f869352f68 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -146,6 +146,7 @@ UM.Dialog Printer.discardOrKeepProfileChangesClosed("discard") base.hide() } + isDefault: true } Button From 67b57129ed1c861a91032e450473179b2833a762 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 2 Mar 2017 18:02:01 +0100 Subject: [PATCH 113/128] CURA-3397 Add options for profile override dialog --- cura/CuraApplication.py | 12 ++++++- .../qml/DiscardOrKeepProfileChangesDialog.qml | 21 +++++++++++ resources/qml/Preferences/GeneralPage.qml | 36 +++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f28d2e4896..2d431da1ed 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -243,6 +243,7 @@ class CuraApplication(QtApplication): Preferences.getInstance().addPreference("mesh/scale_tiny_meshes", True) Preferences.getInstance().addPreference("cura/dialog_on_project_save", True) Preferences.getInstance().addPreference("cura/asked_dialog_on_project_save", False) + Preferences.getInstance().addPreference("cura/choice_on_profile_override", 0) Preferences.getInstance().addPreference("cura/currency", "€") Preferences.getInstance().addPreference("cura/material_settings", "{}") @@ -334,7 +335,16 @@ class CuraApplication(QtApplication): showDiscardOrKeepProfileChanges = pyqtSignal() def discardOrKeepProfileChanges(self): - self.showDiscardOrKeepProfileChanges.emit() + choice = Preferences.getInstance().getValue("cura/choice_on_profile_override") + if choice == 1: + # don't show dialog and DISCARD the profile + self.discardOrKeepProfileChangesClosed("discard") + elif choice == 2: + # don't show dialog and KEEP the profile + self.discardOrKeepProfileChangesClosed("keep") + else: + # ALWAYS ask whether to keep or discard the profile + self.showDiscardOrKeepProfileChanges.emit() @pyqtSlot(str) def discardOrKeepProfileChangesClosed(self, option): diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index f869352f68..ef7c9305c6 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -129,6 +129,27 @@ UM.Dialog model: base.changesModel } + Item + { + anchors.right: parent.right + anchors.left: parent.left + anchors.margins: UM.Theme.getSize("default_margin").width + height:childrenRect.height + + ComboBox + { + id: discardOrKeepProfileChangesDropDownButton + model: [ + catalog.i18nc("@option:discardOrKeep", "Always ask me this"), + catalog.i18nc("@option:discardOrKeep", "Discard and never ask again"), + catalog.i18nc("@option:discardOrKeep", "Keep and never ask again") + ] + width: 300 + currentIndex: UM.Preferences.getValue("cura/choice_on_profile_override") + onCurrentIndexChanged: UM.Preferences.setValue("cura/choice_on_profile_override", currentIndex) + } + } + Item { anchors.right: parent.right diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 017de45521..b0646d5287 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -47,6 +47,8 @@ UM.PreferencesPage centerOnSelectCheckbox.checked = boolCheck(UM.Preferences.getValue("view/center_on_select")) UM.Preferences.resetPreference("view/top_layer_count"); topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count")) + UM.Preferences.resetPreference("cura/choice_on_profile_override") + choiceOnProfileOverrideDropDownButton.currentIndex = UM.Preferences.getValue("cura/choice_on_profile_override") if (plugins.find("id", "SliceInfoPlugin") > -1) { UM.Preferences.resetPreference("info/send_slice_info") @@ -377,6 +379,40 @@ UM.PreferencesPage } } + Item + { + //: Spacer + height: UM.Theme.getSize("default_margin").height + width: UM.Theme.getSize("default_margin").width + } + + Label + { + font.bold: true + text: catalog.i18nc("@label", "Override Profile") + } + + UM.TooltipArea + { + width: childrenRect.width; + height: childrenRect.height; + + text: catalog.i18nc("@info:tooltip", "When you have made changes to a profile and switched to a different one, a dialog will be shown asking whether you want to keep your modifications or not, or you can choose a default behaviour and never show that dialog again.") + + ComboBox + { + id: choiceOnProfileOverrideDropDownButton + + model: [ + catalog.i18nc("@option:discardOrKeep", "Always ask me this"), + catalog.i18nc("@option:discardOrKeep", "Discard and never ask again"), + catalog.i18nc("@option:discardOrKeep", "Keep and never ask again") + ] + width: 300 + currentIndex: UM.Preferences.getValue("cura/choice_on_profile_override") + onCurrentIndexChanged: UM.Preferences.setValue("cura/choice_on_profile_override", currentIndex) + } + } Item { From b65d950181ef88f4730ebb75f4c8039d2a9b9e39 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 3 Mar 2017 08:31:30 +0100 Subject: [PATCH 114/128] CURA-3397 Change headers in override profile table --- resources/qml/DiscardOrKeepProfileChangesDialog.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index ef7c9305c6..c1d167a5b6 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -101,7 +101,7 @@ UM.Dialog TableViewColumn { role: "label" - title: catalog.i18nc("@title:column", "Settings") + title: catalog.i18nc("@title:column", "Profile settings") delegate: labelDelegate width: tableView.width * 0.5 } @@ -109,7 +109,7 @@ UM.Dialog TableViewColumn { role: "original_value" - title: "Profile" + title: "Default" width: tableView.width * 0.25 delegate: defaultDelegate } From 2f3998b9dbf4aa812415ab2db42a050946792225 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 3 Mar 2017 14:46:40 +0100 Subject: [PATCH 115/128] Fixed layout of discard dialog --- resources/qml/DiscardOrKeepProfileChangesDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index 0261e88da1..4c88801bb0 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -64,7 +64,7 @@ UM.Dialog anchors.margins: UM.Theme.getSize("default_margin").width anchors.left: parent.left anchors.right: parent.right - height: base.height - 100 + height: base.height - 130 id: tableView Component { From 4878a50b6164c4f7d4e8fb4d6a8f9aa074138657 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 3 Mar 2017 14:50:46 +0100 Subject: [PATCH 116/128] JSON refactor: skin expansion descriptions, defaults and new min_skin_angle_for_expansion settings (CURA-3440) --- resources/definitions/fdmprinter.def.json | 38 ++++++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 0fd49ee446..1d4b549059 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1247,7 +1247,7 @@ "expand_skins_into_infill": { "label": "Expand Skins Into Infill", - "description": "Expand skin areas into the infill behind walls. By default, skins stop under the wall lines that surround infill but this can lead to holes appearing when the infill density is low. This setting extends the skins beyond the wall lines so that the skins become anchored in the infill.", + "description": "Expand skin areas of top and/or bottom skin of flat surfaces. By default, skins stop under the wall lines that surround infill but this can lead to holes appearing when the infill density is low. This setting extends the skins beyond the wall lines so that the infill on the next layer rests on skin.", "type": "bool", "default_value": false, "settable_per_mesh": true, @@ -1256,11 +1256,10 @@ "expand_upper_skins": { "label": "Expand Upper Skins", - "description": "Expand upper skin areas (areas with air above) so that they are anchored by the infill layers above and below.", + "description": "Expand upper skin areas (areas with air above) so that they support infill above.", "type": "bool", "default_value": false, "value": "expand_skins_into_infill", - "enabled": "expand_skins_into_infill", "settable_per_mesh": true }, "expand_lower_skins": @@ -1269,7 +1268,6 @@ "description": "Expand lower skin areas (areas with air below) so that they are anchored by the infill layers above and below.", "type": "bool", "default_value": false, - "enabled": "expand_skins_into_infill", "settable_per_mesh": true } } @@ -1280,23 +1278,39 @@ "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", "unit": "mm", "type": "float", - "default_value": 1.0, + "default_value": 2.8, "value": "infill_line_distance * 1.4", "minimum_value": "0", "enabled": "expand_upper_skins or expand_lower_skins", "settable_per_mesh": true }, - "min_skin_width_for_expansion": + "min_skin_angle_for_expansion": { - "label": "Minimum Skin Width For Expansion", - "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", - "unit": "mm", + "label": "Minimum Skin Angle for Expansion", + "description": "Top and or bottom surfaces of your object with an angle larger than this setting, won't have their top/bottom skin expanded. This avoids expanding the narrow skin areas that are created when the model surface has a near vertical slope.", + "unit": "°", "type": "float", - "default_value": 0, - "value": "wall_thickness * 0.5", "minimum_value": "0", + "maximum_value": "90", + "maximum_value_warning": "45", + "default_value": 20, "enabled": "expand_upper_skins or expand_lower_skins", - "settable_per_mesh": true + "settable_per_mesh": true, + "children": + { + "min_skin_width_for_expansion": + { + "label": "Minimum Skin Width for Expansion", + "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", + "unit": "mm", + "type": "float", + "default_value": 2.24, + "value": "top_layers * layer_height / math.tan(math.radians(min_skin_angle_for_expansion))", + "minimum_value": "0", + "enabled": "expand_upper_skins or expand_lower_skins", + "settable_per_mesh": true + } + } } } }, From 54c1c995eddb70aeaad2093a4bfb5d7ec352ea93 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 3 Mar 2017 12:37:06 +0100 Subject: [PATCH 117/128] JSON fix: moved expand_skins_expand_distance and min_skin_width_for_expansion out of illegitimate parent (CURA-3440) --- resources/definitions/fdmprinter.def.json | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 9b89f07bff..bd7ecfd672 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1272,32 +1272,32 @@ "value": "expand_skins_into_infill", "enabled": "expand_skins_into_infill", "settable_per_mesh": true - }, - "expand_skins_expand_distance": - { - "label": "Skin Expand Distance", - "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", - "unit": "mm", - "type": "float", - "default_value": 1.0, - "value": "infill_line_distance * 1.4", - "minimum_value": "0", - "enabled": "expand_skins_into_infill", - "settable_per_mesh": true - }, - "min_skin_width_for_expansion": - { - "label": "Minimum Skin Width For Expansion", - "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", - "unit": "mm", - "type": "float", - "default_value": 0, - "value": "wall_thickness * 0.5", - "minimum_value": "0", - "enabled": "expand_skins_into_infill", - "settable_per_mesh": true } } + }, + "expand_skins_expand_distance": + { + "label": "Skin Expand Distance", + "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", + "unit": "mm", + "type": "float", + "default_value": 1.0, + "value": "infill_line_distance * 1.4", + "minimum_value": "0", + "enabled": "expand_skins_into_infill", + "settable_per_mesh": true + }, + "min_skin_width_for_expansion": + { + "label": "Minimum Skin Width For Expansion", + "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", + "unit": "mm", + "type": "float", + "default_value": 0, + "value": "wall_thickness * 0.5", + "minimum_value": "0", + "enabled": "expand_skins_into_infill", + "settable_per_mesh": true } } }, From 016a25ce35c0851cd2bd5727f4d5c642c6f34874 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 3 Mar 2017 12:41:14 +0100 Subject: [PATCH 118/128] JSON fix: don't expand bottom skins by default (CURA-3440) --- resources/definitions/fdmprinter.def.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index bd7ecfd672..8a5424a7a7 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1269,7 +1269,6 @@ "description": "Expand lower skin areas (areas with air below) so that they are anchored by the infill layers above and below.", "type": "bool", "default_value": false, - "value": "expand_skins_into_infill", "enabled": "expand_skins_into_infill", "settable_per_mesh": true } From e5090f70aad39f237864160ed0b740fe356d158c Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 3 Mar 2017 12:41:54 +0100 Subject: [PATCH 119/128] JSON fix: only enable skin expansion settings when we have it enabled (CURA-3440) --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8a5424a7a7..cc5d147b98 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1283,7 +1283,7 @@ "default_value": 1.0, "value": "infill_line_distance * 1.4", "minimum_value": "0", - "enabled": "expand_skins_into_infill", + "enabled": "expand_upper_skins or expand_lower_skins", "settable_per_mesh": true }, "min_skin_width_for_expansion": @@ -1295,7 +1295,7 @@ "default_value": 0, "value": "wall_thickness * 0.5", "minimum_value": "0", - "enabled": "expand_skins_into_infill", + "enabled": "expand_upper_skins or expand_lower_skins", "settable_per_mesh": true } } From 396198797e8a0120d69dbd43c99a5063d819d743 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 3 Mar 2017 14:50:46 +0100 Subject: [PATCH 120/128] JSON refactor: skin expansion descriptions, defaults and new min_skin_angle_for_expansion settings (CURA-3440) --- resources/definitions/fdmprinter.def.json | 38 ++++++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index cc5d147b98..870f5ba7ff 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1247,7 +1247,7 @@ "expand_skins_into_infill": { "label": "Expand Skins Into Infill", - "description": "Expand skin areas into the infill behind walls. By default, skins stop under the wall lines that surround infill but this can lead to holes appearing when the infill density is low. This setting extends the skins beyond the wall lines so that the skins become anchored in the infill.", + "description": "Expand skin areas of top and/or bottom skin of flat surfaces. By default, skins stop under the wall lines that surround infill but this can lead to holes appearing when the infill density is low. This setting extends the skins beyond the wall lines so that the infill on the next layer rests on skin.", "type": "bool", "default_value": false, "settable_per_mesh": true, @@ -1256,11 +1256,10 @@ "expand_upper_skins": { "label": "Expand Upper Skins", - "description": "Expand upper skin areas (areas with air above) so that they are anchored by the infill layers above and below.", + "description": "Expand upper skin areas (areas with air above) so that they support infill above.", "type": "bool", "default_value": false, "value": "expand_skins_into_infill", - "enabled": "expand_skins_into_infill", "settable_per_mesh": true }, "expand_lower_skins": @@ -1269,7 +1268,6 @@ "description": "Expand lower skin areas (areas with air below) so that they are anchored by the infill layers above and below.", "type": "bool", "default_value": false, - "enabled": "expand_skins_into_infill", "settable_per_mesh": true } } @@ -1280,23 +1278,39 @@ "description": "The distance the skins are expanded into the infill. The default distance is enough to bridge the gap between the infill lines and will stop holes appearing in the skin where it meets the wall when the infill density is low. A smaller distance will often be sufficient.", "unit": "mm", "type": "float", - "default_value": 1.0, + "default_value": 2.8, "value": "infill_line_distance * 1.4", "minimum_value": "0", "enabled": "expand_upper_skins or expand_lower_skins", "settable_per_mesh": true }, - "min_skin_width_for_expansion": + "min_skin_angle_for_expansion": { - "label": "Minimum Skin Width For Expansion", - "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", - "unit": "mm", + "label": "Minimum Skin Angle for Expansion", + "description": "Top and or bottom surfaces of your object with an angle larger than this setting, won't have their top/bottom skin expanded. This avoids expanding the narrow skin areas that are created when the model surface has a near vertical slope.", + "unit": "°", "type": "float", - "default_value": 0, - "value": "wall_thickness * 0.5", "minimum_value": "0", + "maximum_value": "90", + "maximum_value_warning": "45", + "default_value": 20, "enabled": "expand_upper_skins or expand_lower_skins", - "settable_per_mesh": true + "settable_per_mesh": true, + "children": + { + "min_skin_width_for_expansion": + { + "label": "Minimum Skin Width for Expansion", + "description": "Skin areas narrower than this are not expanded. This avoids expanding the narrow skin areas that are created when the model surface has a slope close to the vertical.", + "unit": "mm", + "type": "float", + "default_value": 2.24, + "value": "top_layers * layer_height / math.tan(math.radians(min_skin_angle_for_expansion))", + "minimum_value": "0", + "enabled": "expand_upper_skins or expand_lower_skins", + "settable_per_mesh": true + } + } } } }, From e05236ed72939fc34dfcbf73783e5210b571a800 Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 5 Mar 2017 14:16:36 +0100 Subject: [PATCH 121/128] Add WirelessPrinting Plugin --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0ab3de61a4..28c0f13496 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ Third party plugins * [X3G Writer](https://github.com/Ghostkeeper/X3GWriter): Adds support for exporting X3G files. * [Auto orientation](https://github.com/nallath/CuraOrientationPlugin): Calculate the optimal orientation for a model. * [OctoPrint Plugin](https://github.com/fieldofview/OctoPrintPlugin): Send printjobs directly to OctoPrint and monitor their progress in Cura. +* [WirelessPrinting Plugin](https://github.com/probonopd/WirelessPrinting): Print wirelessly from Cura to your 3D printer connected to an ESP8266 module. Making profiles for other printers ---------------------------------- From 44859210cc758ced2c8503dec6aa49249b312bcb Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 6 Mar 2017 11:13:20 +0100 Subject: [PATCH 122/128] Tweak bed adhesion settings These settings are said to improve bed adhesion. See https://github.com/Ultimaker/Cura/pull/1350#issuecomment-284247064 --- resources/definitions/renkforce_rf100.def.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/definitions/renkforce_rf100.def.json b/resources/definitions/renkforce_rf100.def.json index 7df1fa46fd..bdbc44ea8c 100644 --- a/resources/definitions/renkforce_rf100.def.json +++ b/resources/definitions/renkforce_rf100.def.json @@ -18,8 +18,8 @@ "bottom_thickness": { "value": "0.5" }, - "brim_line_count": { - "value": "20.0" + "brim_width": { + "value": "2.0" }, "cool_fan_enabled": { "value": "True" @@ -81,6 +81,9 @@ "material_diameter": { "value": "1.75" }, + "material_flow": { + "value": "110" + }, "material_print_temperature": { "value": "210.0" }, @@ -151,13 +154,13 @@ "value": "3.0" }, "skirt_line_count": { - "value": "1.0" + "value": "3" }, "speed_infill": { "value": "50.0" }, "speed_layer_0": { - "value": "30.0" + "value": "15.0" }, "speed_print": { "value": "50.0" From c9254a3095ad4fc7654cf8dc3a628912c7186668 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 6 Mar 2017 12:15:58 +0100 Subject: [PATCH 123/128] CURA-3397 Enable/disable "keep" and "discard" buttons according to the choice --- .../qml/DiscardOrKeepProfileChangesDialog.qml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index 4c88801bb0..ed720adafa 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -146,7 +146,25 @@ UM.Dialog ] width: 300 currentIndex: UM.Preferences.getValue("cura/choice_on_profile_override") - onCurrentIndexChanged: UM.Preferences.setValue("cura/choice_on_profile_override", currentIndex) + onCurrentIndexChanged: + { + UM.Preferences.setValue("cura/choice_on_profile_override", currentIndex) + if (currentIndex == 1) { + // 1 == "Discard and never ask again", so only enable the "Discard" button + discardButton.enabled = true + keepButton.enabled = false + } + else if (currentIndex == 2) { + // 2 == "Keep and never ask again", so only enable the "Keep" button + keepButton.enabled = true + discardButton.enabled = false + } + else { + // 0 == "Always ask me this", so show both + keepButton.enabled = true + discardButton.enabled = true + } + } } } From 1c15d24e5bc1d650c27467a8852e3012741f6994 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 6 Mar 2017 12:37:29 +0100 Subject: [PATCH 124/128] CURA-3397 Reduce tableView height to show buttons --- resources/qml/DiscardOrKeepProfileChangesDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/DiscardOrKeepProfileChangesDialog.qml index ed720adafa..26c343ad5c 100644 --- a/resources/qml/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/DiscardOrKeepProfileChangesDialog.qml @@ -64,7 +64,7 @@ UM.Dialog anchors.margins: UM.Theme.getSize("default_margin").width anchors.left: parent.left anchors.right: parent.right - height: base.height - 130 + height: base.height - 200 id: tableView Component { From 356d4f9288b85622d99657bd89f1bd93c6f56350 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 6 Mar 2017 14:41:33 +0100 Subject: [PATCH 125/128] Heated bed timeout time now hides correctly if time ran out CURA-3360 --- cura/PrinterOutputDevice.py | 8 ++++++-- plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 7f0b7c4c07..f411190fd5 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -47,8 +47,8 @@ class PrinterOutputDevice(QObject, OutputDevice): self._job_name = "" self._error_text = "" self._accepts_commands = True - self._preheat_bed_timeout = 900 #Default time-out for pre-heating the bed, in seconds. - self._preheat_bed_timer = QTimer() #Timer that tracks how long to preheat still. + self._preheat_bed_timeout = 900 # Default time-out for pre-heating the bed, in seconds. + self._preheat_bed_timer = QTimer() # Timer that tracks how long to preheat still. self._preheat_bed_timer.setSingleShot(True) self._preheat_bed_timer.timeout.connect(self.cancelPreheatBed) @@ -232,11 +232,15 @@ class PrinterOutputDevice(QObject, OutputDevice): # \return The duration of the time-out to pre-heat the bed, formatted. @pyqtProperty(str, notify = preheatBedRemainingTimeChanged) def preheatBedRemainingTime(self): + if not self._preheat_bed_timer.isActive(): + return "" period = self._preheat_bed_timer.remainingTime() if period <= 0: return "" minutes, period = divmod(period, 60000) #60000 milliseconds in a minute. seconds, _ = divmod(period, 1000) #1000 milliseconds in a second. + if minutes <= 0 and seconds <= 0: + return "" return "%d:%02d" % (minutes, seconds) ## Time the print has been printing. diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index a7223128b4..ea8917ed9f 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -558,7 +558,6 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._preheat_bed_timer.stop() self.preheatBedRemainingTimeChanged.emit() - def close(self): Logger.log("d", "Closing connection of printer %s with ip %s", self._key, self._address) self._updateJobState("") From 38a9df9d76a83e966110bfa1bf20302c8863715f Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 6 Mar 2017 14:42:11 +0100 Subject: [PATCH 126/128] fix: more lenient int-list validator parsing (CURA-3275) allow for empty integers allow the brackets to be omitted --- resources/qml/Settings/SettingTextField.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 05c99d7e25..ce376e1c77 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -100,7 +100,7 @@ SettingItem maximumLength: (definition.type == "[int]") ? 20 : 10; - validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[(\s*-?[0-9]+\s*,)*(\s*-?[0-9]+)\s*\]$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry + validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry Binding { From 8a77dd66fc1408dc5c7929fa0b5a2e3f64b73759 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 6 Mar 2017 17:24:53 +0100 Subject: [PATCH 127/128] Properly handle CMake options that are enabled but not "ON" Contributes to CURA-2787 --- CMakeLists.txt | 3 +++ cura/CuraVersion.py.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab08a4d624..8105b677ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,9 @@ add_custom_target(tests) add_custom_command(TARGET tests POST_BUILD COMMAND "PYTHONPATH=${CMAKE_SOURCE_DIR}/../Uranium/:${CMAKE_SOURCE_DIR}" ${PYTHON_EXECUTABLE} -m pytest -r a --junitxml=${CMAKE_BINARY_DIR}/junit.xml ${CMAKE_SOURCE_DIR} || exit 0) option(CURA_DEBUGMODE "Enable debug dialog and other debug features" OFF) +if(CURA_DEBUGMODE) + set(_cura_debugmode "ON") +endif() set(CURA_VERSION "master" CACHE STRING "Version name of Cura") set(CURA_BUILDTYPE "" CACHE STRING "Build type of Cura, eg. 'PPA'") diff --git a/cura/CuraVersion.py.in b/cura/CuraVersion.py.in index 8a4d13e526..fb66275395 100644 --- a/cura/CuraVersion.py.in +++ b/cura/CuraVersion.py.in @@ -3,4 +3,4 @@ CuraVersion = "@CURA_VERSION@" CuraBuildType = "@CURA_BUILDTYPE@" -CuraDebugMode = True if "@CURA_DEBUGMODE@" == "ON" else False +CuraDebugMode = True if "@_cura_debugmode@" == "ON" else False From 3468bae732312a6c10541971f7c1945c5affe047 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 7 Mar 2017 10:31:11 +0100 Subject: [PATCH 128/128] Add result type. --- cura/BuildVolume.py | 2 +- resources/qml/Cura.qml | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 cura/BuildVolume.py mode change 100644 => 100755 resources/qml/Cura.qml diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py old mode 100644 new mode 100755 index c911844b58..1b04e0390a --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -385,7 +385,7 @@ class BuildVolume(SceneNode): self.setPosition(Vector(0, -self._raft_thickness, 0), SceneNode.TransformSpace.World) self.raftThicknessChanged.emit() - def _updateExtraZClearance(self): + def _updateExtraZClearance(self) -> None: extra_z = 0.0 extruders = ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId()) use_extruders = False diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml old mode 100644 new mode 100755