From 2f54e3554ad446d1715a29c397b5b57aa73d2711 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Mon, 9 May 2016 11:36:43 +0200 Subject: [PATCH 01/14] When trying to exit the application, forcefully shutdown the backend exe. Fixes CURA-1453 Cura in slicing loop (Arcus Error (6, native 54)) --- plugins/CuraEngineBackend/CuraEngineBackend.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 09817aa995..e3f9a4542e 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -103,6 +103,9 @@ class CuraEngineBackend(Backend): return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", json_path, "-vv"] + def close(self): + self._terminate() # Forcefully shutdown the backend. + ## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished. # \param time The amount of time the print will take. # \param material_amount The amount of material the print will use. From 9993fcc3cf20e5b1c380c166d708b65475230bab Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Wed, 11 May 2016 17:14:49 +0200 Subject: [PATCH 02/14] JSON feat: layer_0_z_overlap (CURA-1549) --- resources/machines/fdmprinter.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 638301d4a7..9bb53c89a2 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1485,13 +1485,26 @@ "description": "The gap between the final raft layer and the first layer of the object. Only the first layer is raised by this amount to lower the bonding between the raft layer and the object. Makes it easier to peel off the raft.", "unit": "mm", "type": "float", - "default": 0.35, + "default": 0.3, "min_value": "0", "max_value_warning": "1.0", "enabled": "adhesion_type == \"raft\"", "global_only": "True", "visible": true }, + "layer_0_z_overlap": { + "label": "First Layer Z Overlap", + "description": "Make the first and second layer of the object overlap in the Z direction to compensate for the filament lost in the airgap. All models above the first model layer will be shifted down by this amount.", + "unit": "mm", + "type": "float", + "default": 0.05, + "inherit_function": "layer_height / 2", + "min_value": "0", + "max_value_warning": "layer_height", + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": true + }, "raft_surface_layers": { "label": "Raft Top Layers", "description": "The number of top layers on top of the 2nd raft layer. These are fully filled layers that the object sits on. 2 layers result in a smoother top surface than 1.", From 5a7486a32e4463aa22831f8139d4228701f38ccf Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 11 May 2016 17:27:14 +0200 Subject: [PATCH 03/14] Add conversion of First Layer Airgap from legacy First Layer Airgap's internal name is raft_airgap (yeah don't ask). Contributes to issue CURA-1549. --- plugins/LegacyProfileReader/DictionaryOfDoom.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/LegacyProfileReader/DictionaryOfDoom.json b/plugins/LegacyProfileReader/DictionaryOfDoom.json index e30460f103..1fe7d7b7a5 100644 --- a/plugins/LegacyProfileReader/DictionaryOfDoom.json +++ b/plugins/LegacyProfileReader/DictionaryOfDoom.json @@ -50,7 +50,8 @@ "skirt_minimal_length": "skirt_minimal_length", "brim_line_count": "brim_line_count", "raft_margin": "raft_margin", - "raft_airgap": "raft_airgap_all", + "raft_airgap": "raft_airgap_all - raft_airgap", + "layer_0_z_overlap": "raft_airgap", "raft_surface_layers": "raft_surface_layers", "raft_surface_thickness": "raft_surface_thickness", "raft_surface_line_width": "raft_surface_linewidth", From c79d064107008c1b79e83981001bbe94733f6130 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 11 May 2016 18:26:18 +0200 Subject: [PATCH 04/14] Convert raft_airgap settings to float before computing Can't subtract strings from each other, after all. Contributes to issue CURA-1549. --- plugins/LegacyProfileReader/DictionaryOfDoom.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/LegacyProfileReader/DictionaryOfDoom.json b/plugins/LegacyProfileReader/DictionaryOfDoom.json index 1fe7d7b7a5..8c4b49074b 100644 --- a/plugins/LegacyProfileReader/DictionaryOfDoom.json +++ b/plugins/LegacyProfileReader/DictionaryOfDoom.json @@ -50,7 +50,7 @@ "skirt_minimal_length": "skirt_minimal_length", "brim_line_count": "brim_line_count", "raft_margin": "raft_margin", - "raft_airgap": "raft_airgap_all - raft_airgap", + "raft_airgap": "float(raft_airgap_all) - float(raft_airgap)", "layer_0_z_overlap": "raft_airgap", "raft_surface_layers": "raft_surface_layers", "raft_surface_thickness": "raft_surface_thickness", From 76f78295c4ecbfc278e3a367ab202dfa348cd744 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 12 May 2016 10:28:18 +0200 Subject: [PATCH 05/14] Translation correction suggested by BagelOrb BagelOrb indicated the translation wrongly at first. This is apparently correct. Contributes to issue CURA-1549. --- plugins/LegacyProfileReader/DictionaryOfDoom.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/LegacyProfileReader/DictionaryOfDoom.json b/plugins/LegacyProfileReader/DictionaryOfDoom.json index 8c4b49074b..9dd0c04a05 100644 --- a/plugins/LegacyProfileReader/DictionaryOfDoom.json +++ b/plugins/LegacyProfileReader/DictionaryOfDoom.json @@ -50,7 +50,7 @@ "skirt_minimal_length": "skirt_minimal_length", "brim_line_count": "brim_line_count", "raft_margin": "raft_margin", - "raft_airgap": "float(raft_airgap_all) - float(raft_airgap)", + "raft_airgap": "float(raft_airgap_all) + float(raft_airgap)", "layer_0_z_overlap": "raft_airgap", "raft_surface_layers": "raft_surface_layers", "raft_surface_thickness": "raft_surface_thickness", From 5716069fe47e7a39fae12081d62a88ce54a23732 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 12 May 2016 11:01:46 +0200 Subject: [PATCH 06/14] JSON fix: First Layer Z OVerlap ==> Inital Layer ... (CURA-1549) --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 9bb53c89a2..44a1ef5291 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1493,7 +1493,7 @@ "visible": true }, "layer_0_z_overlap": { - "label": "First Layer Z Overlap", + "label": "Initial Layer Z Overlap", "description": "Make the first and second layer of the object overlap in the Z direction to compensate for the filament lost in the airgap. All models above the first model layer will be shifted down by this amount.", "unit": "mm", "type": "float", From f9adb2c601be147dc9afce75db982cf369998afd Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 13 May 2016 13:05:58 +0200 Subject: [PATCH 07/14] Reset stored layer data as soon as a new slice operation starts This prevents layer view showing a combination of stale and fresh data Fixes CURA-1370 (and CURA-1519) --- plugins/CuraEngineBackend/CuraEngineBackend.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index c5b38034b5..32e9f8da65 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -118,6 +118,7 @@ class CuraEngineBackend(Backend): ## Perform a slice of the scene. def slice(self): + self._stored_layer_data = [] if not self._enabled: return From 3d94d2437274f1bfe001fbb25a3bf4ffdc2a8971 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 13 May 2016 13:28:00 +0200 Subject: [PATCH 08/14] JSON feat: skin overlap (CURA-967) --- resources/machines/fdmprinter.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 7171d140ff..53e60beb26 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -573,6 +573,29 @@ } } }, + "skin_overlap": { + "label": "Skin Overlap Percentage", + "description": "The amount of overlap between the skin and the walls. A slight overlap allows the walls to connect firmly to the skin.", + "unit": "%", + "type": "float", + "default": 5, + "min_value_warning": "-50", + "max_value_warning": "100", + "visible": false, + "children": { + "skin_overlap_mm": { + "label": "Skin Overlap", + "description": "The amount of overlap between the skin and the walls. A slight overlap allows the walls to connect firmly to the skin.", + "unit": "mm", + "type": "float", + "default": 0.02, + "min_value_warning": "-0.5 * machine_nozzle_size", + "max_value_warning": "machine_nozzle_size", + "inherit_function": "skin_line_width * parent_value / 100", + "visible": false + } + } + }, "infill_wipe_dist": { "label": "Infill Wipe Distance", "description": "Distance of a travel move inserted after every infill line, to make the infill stick to the walls better. This option is similar to infill overlap, but without extrusion and only on one end of the infill line.", From c832b92e6f1effada7c044b528272224b51621a7 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 13 May 2016 13:37:43 +0200 Subject: [PATCH 09/14] JSON fix: made infill/skin overlap disabled for concentric pattern (CURA-967) --- resources/machines/fdmprinter.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 53e60beb26..c872437f7d 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -555,10 +555,11 @@ "unit": "%", "type": "float", "default": 10, - "inherit_function": "10 if infill_sparse_density < 95 else 0", + "inherit_function": "10 if infill_sparse_density < 95 and infill_pattern != \"concentric\" else 0", "min_value_warning": "-50", "max_value_warning": "100", "visible": false, + "enabled": "infill_pattern != \"concentric\"", "children": { "infill_overlap_mm": { "label": "Infill Overlap", @@ -568,8 +569,9 @@ "default": 0.04, "min_value_warning": "-0.5 * machine_nozzle_size", "max_value_warning": "machine_nozzle_size", - "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 else 0", - "visible": false + "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 and infill_pattern != \"concentric\" else 0", + "visible": false, + "enabled": "infill_pattern != \"concentric\"" } } }, @@ -581,7 +583,9 @@ "default": 5, "min_value_warning": "-50", "max_value_warning": "100", + "inherit_function": "5 if top_bottom_pattern != \"concentric\" else 0", "visible": false, + "enabled": "top_bottom_pattern != \"concentric\"", "children": { "skin_overlap_mm": { "label": "Skin Overlap", @@ -591,8 +595,9 @@ "default": 0.02, "min_value_warning": "-0.5 * machine_nozzle_size", "max_value_warning": "machine_nozzle_size", - "inherit_function": "skin_line_width * parent_value / 100", - "visible": false + "inherit_function": "skin_line_width * parent_value / 100 if top_bottom_pattern != \"concentric\" else 0", + "visible": false, + "enabled": "top_bottom_pattern != \"concentric\"" } } }, From 5df7c519c20cfc3da470e46499a9b3a87f20d1fe Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 13 May 2016 17:29:49 +0200 Subject: [PATCH 10/14] Removed option to turn off automatic updated check from GeneralPage.qml UpdateChecker is not a required plugin, so we cannot rely on there being functionality to automatically check for updates. Note that the preference is still there, so the user can still turn off automatic update checking by editing the cura.cfg file. CURA-1540 --- resources/qml/GeneralPage.qml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index 9138fffc45..b2ff44b15a 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -30,10 +30,8 @@ UM.PreferencesPage UM.Preferences.resetPreference("general/language") UM.Preferences.resetPreference("physics/automatic_push_free") UM.Preferences.resetPreference("mesh/scale_to_fit") - UM.Preferences.resetPreference("info/automatic_update_check") UM.Preferences.resetPreference("info/send_slice_info") pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) - checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) var defaultLanguage = UM.Preferences.getValue("general/language") @@ -152,20 +150,6 @@ UM.PreferencesPage } } - UM.TooltipArea { - width: childrenRect.width - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") - - CheckBox - { - id: checkUpdatesCheckbox - text: catalog.i18nc("@option:check","Check for updates on start") - checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check")) - onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked) - } - } - UM.TooltipArea { width: childrenRect.width height: childrenRect.height From da872871bd5cbbacf325bb6b006011028b37cd51 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 13 May 2016 18:35:41 +0200 Subject: [PATCH 11/14] Add back option to turn off automatic update check if the UpdateChecker plugin is available CURA-1540 --- resources/qml/GeneralPage.qml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index b2ff44b15a..3db56d4699 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -36,6 +36,11 @@ UM.PreferencesPage scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) var defaultLanguage = UM.Preferences.getValue("general/language") setDefaultLanguage(defaultLanguage) + + if (UM.Models.pluginsModel.find("id", "UpdateChecker") > -1) { + UM.Preferences.resetPreference("info/automatic_update_check") + checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) + } } ColumnLayout @@ -150,6 +155,21 @@ UM.PreferencesPage } } + UM.TooltipArea { + visible: UM.Models.pluginsModel.find("id", "UpdateChecker") > -1 + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") + + CheckBox + { + id: checkUpdatesCheckbox + text: catalog.i18nc("@option:check","Check for updates on start") + checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check")) + onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked) + } + } + UM.TooltipArea { width: childrenRect.width height: childrenRect.height From 12638f3601eb95217a9ee74858f19a2ae1bca3ef Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 13 May 2016 19:04:32 +0200 Subject: [PATCH 12/14] Make machine prefix for jobname optional CURA-1480 --- cura/CuraApplication.py | 1 + resources/qml/GeneralPage.qml | 18 +++++++++++++++++- resources/qml/JobSpecs.qml | 6 +++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f381faa482..996e1f59a3 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -114,6 +114,7 @@ class CuraApplication(QtApplication): Preferences.getInstance().addPreference("cura/active_mode", "simple") Preferences.getInstance().addPreference("cura/recent_files", "") Preferences.getInstance().addPreference("cura/categories_expanded", "") + Preferences.getInstance().addPreference("cura/jobname_prefix", True) Preferences.getInstance().addPreference("view/center_on_select", True) Preferences.getInstance().addPreference("mesh/scale_to_fit", True) Preferences.getInstance().addPreference("mesh/scale_tiny_meshes", True) diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index 3db56d4699..4f597ff32b 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -31,9 +31,11 @@ UM.PreferencesPage UM.Preferences.resetPreference("physics/automatic_push_free") UM.Preferences.resetPreference("mesh/scale_to_fit") UM.Preferences.resetPreference("info/send_slice_info") + UM.Preferences.resetPreference("cura/jobname_prefix") pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) + prefixJobNameCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/jobname_prefix")) var defaultLanguage = UM.Preferences.getValue("general/language") setDefaultLanguage(defaultLanguage) @@ -116,7 +118,7 @@ UM.PreferencesPage UM.TooltipArea { width: childrenRect.width height: childrenRect.height - text: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect.") + text: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect?") CheckBox { @@ -183,5 +185,19 @@ UM.PreferencesPage onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked) } } + + UM.TooltipArea { + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip", "Should a prefix based on the printer name be added to the print job name automatically?") + + CheckBox + { + id: prefixJobNameCheckbox + text: catalog.i18nc("@option:check", "Add machine prefix to job name") + checked: boolCheck(UM.Preferences.getValue("cura/jobname_prefix")) + onCheckedChanged: UM.Preferences.setValue("cura/jobname_prefix", checked) + } + } } } diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index fac4fd841d..99b2d00c36 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -31,6 +31,7 @@ Rectangle { function createFileName(){ var splitMachineName = UM.MachineManager.activeMachineInstance.split(" ") var abbrMachine = '' + if ((UM.Preferences.getValue("cura/jobname_prefix"))) { for (var i = 0; i < splitMachineName.length; i++){ if (splitMachineName[i].search(/ultimaker/i) != -1){ abbrMachine += 'UM' @@ -48,7 +49,10 @@ Rectangle { } } } - printJobTextfield.text = abbrMachine + '_' + base.fileBaseName + printJobTextfield.text = abbrMachine + '_' + base.fileBaseName + } else { + printJobTextfield.text = base.fileBaseName + } } Connections { From 481b350cfd66bb204a5b9a513ca3d1be1a38ab2f Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Sat, 14 May 2016 18:42:23 +0200 Subject: [PATCH 13/14] BQ Hephestos2: Removing override of support_enable "support_enable" is already set as "enabled": false in fdmprinter.json. So this line is unneeded here. --- resources/machines/bq_hephestos_2.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json index 8b1ed34caa..1655c28009 100644 --- a/resources/machines/bq_hephestos_2.json +++ b/resources/machines/bq_hephestos_2.json @@ -58,6 +58,5 @@ "skirt_minimal_length": { "default": 30.0, "visible": false }, "skirt_gap": { "default": 6.0 }, "cool_fan_full_at_height": { "default": 0.4, "visible": false }, - "support_enable": { "default": false } } } From c83a5a30cc2e5e9c7500715a12ce9d835a25b43a Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Mon, 16 May 2016 11:13:39 +0200 Subject: [PATCH 14/14] BQ Hephestos2: Removing machine_gcode_flavor This is already default at https://github.com/Ultimaker/Cura/blob/master/resources/machines/fdmprinter.json#L115 --- resources/machines/bq_hephestos_2.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json index 8b1ed34caa..4bb665cdc6 100644 --- a/resources/machines/bq_hephestos_2.json +++ b/resources/machines/bq_hephestos_2.json @@ -30,9 +30,6 @@ "machine_center_is_zero": { "default": false }, - "machine_gcode_flavor": { - "default": "RepRap" - }, "machine_platform_offset": { "default": [6, 1320, 0] },