diff --git a/.gitignore b/.gitignore index 5a077bd6b2..616d325ffb 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,4 @@ cmake_install.cmake #Debug *.gcode run.sh -.scannerwork/ -CuraEngine diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index bfeb690192..8726ecb6e6 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -266,7 +266,7 @@ class ConvexHullDecorator(SceneNodeDecorator): if self._getSettingProperty("mold_enabled", "value"): mold_width = self._getSettingProperty("mold_width", "value") hull_offset = horizontal_expansion + mold_width - if hull_offset > 0: #TODO: Implement Minkowski subtraction for if the offset < 0. + if hull_offset != 0: expansion_polygon = Polygon(numpy.array([ [-hull_offset, -hull_offset], [-hull_offset, hull_offset], diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index ea07a1714d..dc3b5f7823 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -362,7 +362,7 @@ UM.Dialog Label { id: warningLabel - text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.") + text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the buildplate") wrapMode: Text.Wrap } } diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index 5939102e65..7b2b7ac2c2 100755 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -1,7 +1,7 @@ // Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.4 +import QtQuick 2.2 import QtQuick.Controls 1.2 import QtQuick.Layouts 1.1 import QtQuick.Controls.Styles 1.1 @@ -602,7 +602,7 @@ Item anchors.leftMargin: UM.Theme.getSize("default_margin").width / 2; anchors.verticalCenter: parent.verticalCenter; - width: fontMetrics.averageCharacterWidth * (maxValue.length) + UM.Theme.getSize("default_margin").width; + width: Math.max(UM.Theme.getSize("line").width * maxValue.length + 2 * screenScaleFactor, 20 * screenScaleFactor); style: TextFieldStyle { textColor: UM.Theme.getColor("setting_control_text"); @@ -630,9 +630,4 @@ Item } } } - - FontMetrics { - id: fontMetrics - font: UM.Theme.getFont("default") - } } diff --git a/plugins/PluginBrowser/PluginBrowser.qml b/plugins/PluginBrowser/PluginBrowser.qml index 71e88c652b..cbb60aed70 100644 --- a/plugins/PluginBrowser/PluginBrowser.qml +++ b/plugins/PluginBrowser/PluginBrowser.qml @@ -217,7 +217,7 @@ UM.Dialog anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - text: licenseDialog.pluginName + catalog.i18nc("@label", "This plugin contains a license.\nYou need to accept this license to install this plugin.\nDo you agree with the terms below?") + text: licenseDialog.pluginName + catalog.i18nc("@label", " plugin contains a license.\nYou need to accept this license to install this plugin.\nDo you agree with the terms below?") wrapMode: Text.Wrap } diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml index 1bcbd1c4b9..b1964c6c06 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml @@ -378,7 +378,7 @@ Cura.MachineAction }, Button { id: btnOk - text: catalog.i18nc("@action:button", "OK") + text: catalog.i18nc("@action:button", "Ok") onClicked: { manualPrinterDialog.accept() diff --git a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py index 32ed18bc9f..5ce498e11c 100644 --- a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py @@ -340,6 +340,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte def _compressDataAndNotifyQt(data_to_append): compressed_data = gzip.compress(data_to_append.encode("utf-8")) + self._progress_message.setProgress(-1) # Tickle the message so that it's clear that it's still being used. QCoreApplication.processEvents() # Ensure that the GUI does not freeze. # Pretend that this is a response, as zipping might take a bit of time. self._last_response_time = time.time() diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 3ea48be33c..a3df717a67 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -27,7 +27,6 @@ import zlib from time import time from time import sleep -from time import gmtime i18n_catalog = i18nCatalog("cura") @@ -871,6 +870,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): def _compress_data_and_notify_qt(data_to_append): compressed_data = gzip.compress(data_to_append.encode("utf-8")) + self._progress_message.setProgress(-1) # Tickle the message so that it's clear that it's still being used. QCoreApplication.processEvents() # Ensure that the GUI does not freeze. # Pretend that this is a response, as zipping might take a bit of time. self._last_response_time = time() @@ -1132,11 +1132,6 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): else: Logger.log("w", "Unable to save authentication for id %s and key %s", self._authentication_id, self._getSafeAuthKey()) - # Request 'system' printer data once, when we know we have authentication, so we know we can set the system time. - url = QUrl("http://" + self._address + self._api_prefix + "system") - system_data_request = QNetworkRequest(url) - self._manager.get(system_data_request) - else: # Got a response that we didn't expect, so something went wrong. Logger.log("e", "While trying to authenticate, we got an unexpected response: %s", reply.attribute(QNetworkRequest.HttpStatusCodeAttribute)) self.setAuthenticationState(AuthState.NotAuthenticated) @@ -1156,27 +1151,6 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): else: pass - elif self._api_prefix + "system" in reply_url: - # Check if the printer has time, and if this has a valid system time. - try: - data = json.loads(bytes(reply.readAll()).decode("utf-8")) - except json.decoder.JSONDecodeError: - Logger.log("w", "Received an invalid authentication request reply from printer: Not valid JSON.") - return - if "time" in data and "utc" in data["time"]: - try: - printer_time = gmtime(float(data["time"]["utc"])) - Logger.log("i", "Printer has system time of: %s", str(printer_time)) - except ValueError: - printer_time = None - if printer_time is not None and printer_time.tm_year < 1990: - # The system time is not valid, sync our current system time to it, so we at least have some reasonable time in the printer. - Logger.log("w", "Printer system time invalid, setting system time") - url = QUrl("http://" + self._address + self._api_prefix + "system/time/utc") - put_request = QNetworkRequest(url) - put_request.setHeader(QNetworkRequest.ContentTypeHeader, "application/json") - self._manager.put(put_request, str(time()).encode()) - elif reply.operation() == QNetworkAccessManager.PostOperation: if "/auth/request" in reply_url: # We got a response to requesting authentication. diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py index e4d554b2fa..0ed745d9d8 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py @@ -31,7 +31,6 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin): self._zero_conf = None self._browser = None self._printers = {} - self._cluster_printers_seen = {} # do not forget a cluster printer when we have seen one, to not 'downgrade' from Connect to legacy printer self._api_version = "1" self._api_prefix = "/api/v" + self._api_version + "/" @@ -219,16 +218,12 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin): ## Because the model needs to be created in the same thread as the QMLEngine, we use a signal. def addPrinter(self, name, address, properties, force_cluster=False): cluster_size = int(properties.get(b"cluster_size", -1)) - was_cluster_before = name in self._cluster_printers_seen - if was_cluster_before: - Logger.log("d", "Printer [%s] had Cura Connect before, so assume it's still equipped with Cura Connect.", name) - if force_cluster or cluster_size >= 0 or was_cluster_before: + if force_cluster or cluster_size >= 0: printer = NetworkClusterPrinterOutputDevice.NetworkClusterPrinterOutputDevice( name, address, properties, self._api_prefix, self._plugin_path) else: printer = NetworkPrinterOutputDevice.NetworkPrinterOutputDevice(name, address, properties, self._api_prefix) self._printers[printer.getKey()] = printer - self._cluster_printers_seen[printer.getKey()] = name # Cluster printers that may be temporary unreachable or is rebooted keep being stored here global_container_stack = Application.getInstance().getGlobalContainerStack() if global_container_stack and printer.getKey() == global_container_stack.getMetaDataEntry("um_network_key"): if printer.getKey() not in self._old_printers: # Was the printer already connected, but a re-scan forced? diff --git a/plugins/UM3NetworkPrinting/OpenPanelButton.qml b/plugins/UM3NetworkPrinting/OpenPanelButton.qml index 4bc1728f76..a06a97f8f9 100644 --- a/plugins/UM3NetworkPrinting/OpenPanelButton.qml +++ b/plugins/UM3NetworkPrinting/OpenPanelButton.qml @@ -11,7 +11,7 @@ Button { UM.I18nCatalog { id: catalog; name: "cura"; } height: UM.Theme.getSize("save_button_save_to_button").height - tooltip: catalog.i18nc("@info:tooltip", "Opens the print jobs page with your default web browser.") + tooltip: catalog.i18nc("@info:tooltip", "Opens the print jobs page with your default web browser.") text: catalog.i18nc("@action:button", "View print jobs") // FIXME: This button style is copied and duplicated from SaveButton.qml diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 3b9603cc1b..06efd4d55b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -119,8 +119,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._sendCommand("G0 Y%s F%s" % (z, speed)) def _homeHead(self): - self._sendCommand("G28 X") - self._sendCommand("G28 Y") + self._sendCommand("G28") def _homeBed(self): self._sendCommand("G28 Z") diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 5bc323dfbe..06bc04b1fe 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1405,28 +1405,6 @@ "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true }, - "infill_offset_x": - { - "label": "Infill X Offset", - "description": "The infill pattern is offset this distance along the X axis.", - "unit": "mm", - "type": "float", - "default_value": 0, - "enabled": "infill_pattern == 'grid' or infill_pattern == 'lines' or infill_pattern == 'triangles' or infill_pattern == 'cubic' or infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' or infill_pattern == 'zigzag'", - "limit_to_extruder": "infill_extruder_nr", - "settable_per_mesh": true - }, - "infill_offset_y": - { - "label": "Infill Y Offset", - "description": "The infill pattern is offset this distance along the Y axis.", - "unit": "mm", - "type": "float", - "default_value": 0, - "enabled": "infill_pattern == 'grid' or infill_pattern == 'lines' or infill_pattern == 'triangles' or infill_pattern == 'cubic' or infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' or infill_pattern == 'zigzag'", - "limit_to_extruder": "infill_extruder_nr", - "settable_per_mesh": true - }, "sub_div_rad_add": { "label": "Cubic Subdivision Shell", @@ -4008,7 +3986,7 @@ "skirt_gap": { "label": "Skirt Distance", - "description": "The horizontal distance between the skirt and the first layer of the print.\nThis is the minimum distance. Multiple skirt lines will extend outwards from this distance.", + "description": "The horizontal distance between the skirt and the first layer of the print.\nThis is the minimum distance, multiple skirt lines will extend outwards from this distance.", "unit": "mm", "type": "float", "default_value": 3, diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 99948fc4fc..b1c5008d38 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -324,7 +324,7 @@ Rectangle anchors.bottom: timeSpecDescription.top font: UM.Theme.getFont("large") color: UM.Theme.getColor("text_subtext") - text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label Hours and minutes", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short) + text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short) MouseArea { @@ -407,12 +407,12 @@ Rectangle } if(someCostsKnown) { - return catalog.i18nc("@label Print estimates: m for meters, g for grams, %4 is currency and %3 is print cost", "%1m / ~ %2g / ~ %4 %3").arg(lengths.join(" + ")) + return catalog.i18nc("@label", "%1m / ~ %2g / ~ %4 %3").arg(lengths.join(" + ")) .arg(weights.join(" + ")).arg(costs.join(" + ")).arg(UM.Preferences.getValue("cura/currency")); } else { - return catalog.i18nc("@label Print estimates: m for meters, g for grams", "%1m / ~ %2g").arg(lengths.join(" + ")).arg(weights.join(" + ")); + return catalog.i18nc("@label", "%1m / ~ %2g").arg(lengths.join(" + ")).arg(weights.join(" + ")); } } } diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 03d3e2cd10..c87bb576d0 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -549,8 +549,11 @@ Item enabled: true onClicked: { + // Restore to 90% only when enabling gradual infill + if (parseInt(infillSteps.properties.value) == 0) { + infillDensity.setPropertyValue("value", 90) + } infillSteps.setPropertyValue("value", (parseInt(infillSteps.properties.value) == 0) ? 5 : 0) - infillDensity.setPropertyValue("value", 90) } onEntered: {