From 24a0ba3974933ab15d55c0e5a262aa22b9c19856 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Tue, 10 Oct 2023 05:20:19 +0200 Subject: [PATCH 01/21] Update PyQt6 dependencies to latest versions PyQt6 and PyQt6-sip along with their dependencies are updated to newer versions (6.5.2 and 13.5.2) in both requirements.txt and Uranium/requirements.txt. This is to ensure the application uses the latest and most secure versions of the libraries, potentially improving application performance and security. These updates also ensure compatibility with current and upcoming features and bug fixes. Contributes to CURA-11137 --- requirements.txt | 75 ++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/requirements.txt b/requirements.txt index dfa974ef7d..48ee3abcdc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,41 +1,42 @@ ### Direct requirements for Uranium and libCharon ### -PyQt6-sip==13.4.1 \ - --hash=sha256:0df998f2b6ceeacfd10de773441572e215be0c9cae566cc7dd36e231bf714a12 \ - --hash=sha256:224575e84805c4317bacd5d1b8e93e0ad5c48685dadbbe1e902d4ebe16f22828 \ - --hash=sha256:36ae29cdc223cacc1257d0f5075cf81474550c6d26b728f922487a2aa935f130 \ - --hash=sha256:3a674c591d4274d4ea8127205290e927a7dab0eb87a0038d4f4ea1d430782649 \ - --hash=sha256:3ef9392e4ae29d393b79237d85840cdc6b8831f36eed5d56c7d9b329b380cc8d \ - --hash=sha256:43935873d60f57719632840d517afee04ef8f30e92cfe0dadc7e6326691920fc \ - --hash=sha256:5731f22618435654352ef07684549a17be82b75254227fc80b4b5b0b59fc6656 \ - --hash=sha256:5bc4beb6fb1de4c9ba8beee7b1a4a813fa888c3b095206dafcd25d7e6e4ed2a7 \ - --hash=sha256:5c36ab984402e96792eebf4b031abfaa589aa20af3190a79c54502c16964d97e \ - --hash=sha256:a2a0461992c6657f343308b150c4d6b57e9e7a0e5c2f79538434e7fb869ea827 \ - --hash=sha256:a81490ee84d7a41a126b116081bd97d758f41bf706aee0a8cec24d6e4c660184 \ - --hash=sha256:e00e287ea05bbc293fc6e2198301962af9b7b622bd2daf4288f925a88ae35dc9 \ - --hash=sha256:e670a7b2fb7e32204ce67d274017bfff3e21139d217d60cebbfcb75b019c91ee \ - --hash=sha256:ee06f255787a0b4957f357f93b78d2a11ca3761916833e3afa83f1381d4d1a46 \ - --hash=sha256:fbee0d554e0e98f56dbf6d94b00a28cc32425938ad7ae98fd91f8822c5b24d45 \ - --hash=sha256:fcc6d78314783f4a193f02353f431b7ea4d357f47c3c7a7d0740e723f69c64dc -PyQt6==6.4.2 \ - --hash=sha256:18d1daf98d9236d55102cdadafd1056f5802f3c9288fcf7238569937b71a89f0 \ - --hash=sha256:25bd399b4a95dce65d5f937c1aa85d3c7e14a21745ae2a4ca14c0116cd104290 \ - --hash=sha256:740244f608fe15ee1d89695c43f31a14caeca41c4f02ac36c86dfba4a5d5813d \ - --hash=sha256:c128bc0f17833e324593e3db83e99470d451a197dd17ff0333927b946c935bd9 -PyQt6-Qt6==6.4.2 \ - --hash=sha256:9f07c3c100cb46cca4074965e7494d4df4f0fc016497d5303c1fe135822876e1 \ - --hash=sha256:a29b8c858babd523e80c8db5f8fd19792641588ec04eab49af18b7a4423eb99f \ - --hash=sha256:c0e91d0275d428496cacff717a9b719c52bfa52b21f124d638b79cc2217bc81e \ - --hash=sha256:d19c4e72615762cd6f0b043f23fa5f0b02656091427ce6de1efccd58e10e6a53 -PyQt6-NetworkAuth==6.4.0 \ - --hash=sha256:ab6178b3b2902ae9939a148555cfcee8c7803d6b0d5924cd1bd8f3407b8b9210 \ - --hash=sha256:c16ec80232d88024b60d04386a23cc93067e5644a65f47f26ffb13d84dcd4a6d \ - --hash=sha256:c302cd0d838c7229eda5e26e0b1b3d3ec4f8720f8d9379472bce5a89ff0735c2 \ - --hash=sha256:d948fc0cf43b64afbda2acb5bf2392f785a1e7a2950d79ea850c1a3f4ae12f1a -PyQt6-NetworkAuth-Qt6==6.4.2 \ - --hash=sha256:179094bcb4d4d056316c22d3d067cd94d4591da23f804461bfb025ccfa29b2b4 \ - --hash=sha256:1de6abbb5fa6585b97ae49d3f64b0dfad40bd56b1a31744d9775ff26247241c8 \ - --hash=sha256:79ec4b0fc9450bbedbff03541b93b10d1c7e761cd2cc16ce70d2b09dcdf8c720 \ - --hash=sha256:d96d557fe61edb9b68d189f270f0393d6579c8d308e6b0d41bc0699371d7cb4e +PyQt6-sip==13.5.2 \ + --hash=sha256:1bdb1f7b5b2f6ac31d517a6f3a13c38055640ac0014f67a2e5422d2083ce69ec \ + --hash=sha256:318d4d1c7ef60f69c68227cef78fc439accc9028ec6149200eea3d34c433d373 \ + --hash=sha256:4b5b0c4b557e0293eba008021342459a0f91c69a7a2eb5231276d495d1d2960a \ + --hash=sha256:5b499eff7150d9f31fe835a73cc41f076bba2fcde0f5b0325b1284797f17c0ac \ + --hash=sha256:5d0fd42da765198b51d7fe12c29721cbe3e14b77ca4f68aa43618149ee7dbeff \ + --hash=sha256:831f5d606fc5296a80303ab30892c3308954c5766039bf7a96267488bb2524a5 \ + --hash=sha256:87d758ba999baa16459f0a3c7f7ed47a5b45e8991ad691f17345bf3c493a4281 \ + --hash=sha256:91812f0094443b816a74a89954d60bb50060807f54d7c016a4de7bd29454091e \ + --hash=sha256:94afb031db89159aa330891eba2c937b0378b4b264570998848c7a78eddf7c94 \ + --hash=sha256:9ad5b8c4c92d62e00ebf254a4c9656668b130f2a1d2792034e0d82b2d6571509 \ + --hash=sha256:9c9dac067710015895f523f5a2a4d59cbef8624a152b6f9a426e5b848d8c6d29 \ + --hash=sha256:ace942b78378bff8ae2d6bafccc84465f1ff0cf30720b8321e0bd6c95c36ede6 \ + --hash=sha256:b54b0d8d21c5835af8f6d6d8a323a23106e67b7cd4c31e23c35bb4c321000de8 \ + --hash=sha256:c0b4e55c4d0dc44728da90eb1451dfff0d05260b4a3496ff0014494e6c1865a6 \ + --hash=sha256:dcf602c233ee7600e810927adcb9e518d61bc796a6b2013c17feedd24c4e5413 \ + --hash=sha256:ebf6264b6feda01ba37d3b60a4bb87493bdb87be70f7b2a5384a7acd4902d88d +PyQt6==6.5.2 \ + --hash=sha256:1487ee7350f9ffb66d60ab4176519252c2b371762cbe8f8340fd951f63801280 \ + --hash=sha256:5bad1437eb0c1ae801103b32ef04ef62ef1cce505b448525f60089ce36329b89 \ + --hash=sha256:70468cca4537756c714a57fa1baa5beabb9b38775f52f9611f49870705672c55 \ + --hash=sha256:ff1d12767b578f0f0e87cdb12198e7dcad9a176c40d1d1d799984181b0af93cb +PyQt6-Qt6==6.5.2 \ + --hash=sha256:4b37f6f93c0980469ccc570998d3e3de243028bae7389fb6330443ab215ce2f6 \ + --hash=sha256:5a3c7bb899678bf801136b31cd589ed4d0d54ab32be5fb76c2bdeb161a9662ad \ + --hash=sha256:8dad61b4666d91882d7e1c4d619c71e7429c13e19182f8b3bebf3ecf95107d4c \ + --hash=sha256:953f3c0e99e486081a6d438b32fbc240da97457226562eb68cf1b11c516386fd +PyQt6-NetworkAuth==6.5.0 \ + --hash=sha256:6dc9e44a978698b673926e34da486f946ccbbeeac02078517c4d1ee23d0546a4 \ + --hash=sha256:7170db3f99e13aef855d9d52a00a8baa2dea92d12f9b441fed9c6dec57f83e09 \ + --hash=sha256:a8c8cb00a615dde1efaf1d7926e8532df77d6d08798d33b6325fb8f2ff0f220d \ + --hash=sha256:ac56d362c9efcfc194e358cc2bba362535b0775dc2bd8257f964e0bcfe7d421a +PyQt6-NetworkAuth-Qt6==6.5.2 \ + --hash=sha256:0588b93ec5a6f2c492a42dc56967f06d33306169e716c5636448816a65956278 \ + --hash=sha256:29396a63b68e8fa26587c35e8befad0a84e3a05e03551d1329ffd527684edc68 \ + --hash=sha256:2ec8ca45764d2f122912ad6c754b5ffe65f143b5a52f99649cc7931b475e064b \ + --hash=sha256:76e0877ed86247784740a0eb928f3c77da7466f08d96d17306efda6060df2c44 + certifi==2023.5.7; \ --hash=sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716 cryptography==41.0.1 \ From 6301926885f170f79189b0cf6fdc2d3594d1ba2e Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 7 Nov 2023 18:08:08 +0530 Subject: [PATCH 02/21] Calculating time of travel for each line segment CURA-7647 --- cura/LayerPolygon.py | 6 ++++++ plugins/SimulationView/SimulationView.py | 5 +++++ plugins/SimulationView/SimulationViewMainComponent.qml | 6 +++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 103703e594..4eb21dd45f 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -1,5 +1,6 @@ # Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. +import math import numpy from typing import Optional, cast @@ -186,6 +187,11 @@ class LayerPolygon: def types(self): return self._types + @property + def lineLengths(self): + return [math.sqrt(sum((b - a) ** 2 for a, b in zip(self._data[i], self._data[i + 1]))) + for i in range(len(self._data) - 1)] + @property def data(self): return self._data diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 473948bc46..88fc44df98 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -400,6 +400,9 @@ class SimulationView(CuraView): def getMaxFeedrate(self) -> float: return self._max_feedrate + def getSimulationTime(self) -> list: + return [length / feedrate for length, feedrate in zip(self._visible_lengths, self._current_feedrates)] + def getMinThickness(self) -> float: if abs(self._min_thickness - sys.float_info.max) < 10: # Some lenience due to floating point rounding. return 0.0 # If it's still max-float, there are no measurements. Use 0 then. @@ -524,8 +527,10 @@ class SimulationView(CuraView): visible_indicies_with_extrusion = numpy.where(numpy.isin(polyline.types, visible_line_types_with_extrusion))[0] if visible_indices.size == 0: # No items to take maximum or minimum of. continue + self._visible_lengths = numpy.take(polyline.lineLengths, visible_indices) visible_feedrates = numpy.take(polyline.lineFeedrates, visible_indices) visible_feedrates_with_extrusion = numpy.take(polyline.lineFeedrates, visible_indicies_with_extrusion) + self._current_feedrates = visible_feedrates visible_linewidths = numpy.take(polyline.lineWidths, visible_indices) visible_linewidths_with_extrusion = numpy.take(polyline.lineWidths, visible_indicies_with_extrusion) visible_thicknesses = numpy.take(polyline.lineThicknesses, visible_indices) diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml index a82d1e3db9..b2ef7b8356 100644 --- a/plugins/SimulationView/SimulationViewMainComponent.qml +++ b/plugins/SimulationView/SimulationViewMainComponent.qml @@ -136,9 +136,10 @@ Item Timer { id: simulationTimer - interval: 100 + interval: parseFloat(UM.SimulationView.getSimulationTime[pathNumber]).toFixed(2) //10 //dont change running: false repeat: true + property int pathNumber : 0 onTriggered: { var currentPath = UM.SimulationView.currentPath @@ -153,10 +154,12 @@ Item if (currentPath >= numPaths) { UM.SimulationView.setCurrentPath(0) + pathNumber =0 } else { UM.SimulationView.setCurrentPath(currentPath + 1) + pathNumber = 0 } } // If the simulation is already playing and we reach the end of a layer, then it automatically @@ -184,6 +187,7 @@ Item // The status must be set here instead of in the resumeSimulation function otherwise it won't work // correctly, because part of the logic is in this trigger function. isSimulationPlaying = true + pathNumber += 1 } } From efda0aaba4329948485021bbbc4d2e365a5b63c4 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 7 Nov 2023 18:42:41 +0530 Subject: [PATCH 03/21] updated for every layer CURA-7647 --- plugins/SimulationView/SimulationView.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 88fc44df98..2f09c8018b 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -78,6 +78,8 @@ class SimulationView(CuraView): self._minimum_path_num = 0 self.currentLayerNumChanged.connect(self._onCurrentLayerNumChanged) + self._current_feedrates = {} + self._visible_lengths ={} self._busy = False self._simulation_running = False @@ -401,7 +403,7 @@ class SimulationView(CuraView): return self._max_feedrate def getSimulationTime(self) -> list: - return [length / feedrate for length, feedrate in zip(self._visible_lengths, self._current_feedrates)] + return [length / feedrate for length, feedrate in zip(self._visible_lengths[self._current_layer_num], self._current_feedrates[self._current_layer_num])] def getMinThickness(self) -> float: if abs(self._min_thickness - sys.float_info.max) < 10: # Some lenience due to floating point rounding. @@ -527,10 +529,10 @@ class SimulationView(CuraView): visible_indicies_with_extrusion = numpy.where(numpy.isin(polyline.types, visible_line_types_with_extrusion))[0] if visible_indices.size == 0: # No items to take maximum or minimum of. continue - self._visible_lengths = numpy.take(polyline.lineLengths, visible_indices) + self._visible_lengths[layer_index] = numpy.take(polyline.lineLengths, visible_indices) visible_feedrates = numpy.take(polyline.lineFeedrates, visible_indices) visible_feedrates_with_extrusion = numpy.take(polyline.lineFeedrates, visible_indicies_with_extrusion) - self._current_feedrates = visible_feedrates + self._current_feedrates[layer_index] = visible_feedrates visible_linewidths = numpy.take(polyline.lineWidths, visible_indices) visible_linewidths_with_extrusion = numpy.take(polyline.lineWidths, visible_indicies_with_extrusion) visible_thicknesses = numpy.take(polyline.lineThicknesses, visible_indices) From 457cecba5943c09b1b3b5b2a573a18c0915e0bc0 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Wed, 8 Nov 2023 13:29:47 +0530 Subject: [PATCH 04/21] using numpy for array calculation CURA-7647 --- cura/LayerPolygon.py | 4 ++-- plugins/SimulationView/SimulationView.py | 2 +- plugins/SimulationView/SimulationViewMainComponent.qml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 4eb21dd45f..e5fd307dc9 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -189,8 +189,8 @@ class LayerPolygon: @property def lineLengths(self): - return [math.sqrt(sum((b - a) ** 2 for a, b in zip(self._data[i], self._data[i + 1]))) - for i in range(len(self._data) - 1)] + data_array = numpy.array(self._data) + return numpy.linalg.norm(data_array[1:] - data_array[:-1], axis=1) @property def data(self): diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 2f09c8018b..18d1f981c7 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -403,7 +403,7 @@ class SimulationView(CuraView): return self._max_feedrate def getSimulationTime(self) -> list: - return [length / feedrate for length, feedrate in zip(self._visible_lengths[self._current_layer_num], self._current_feedrates[self._current_layer_num])] + return self._visible_lengths[self._current_layer_num] / self._current_feedrates[self._current_layer_num] def getMinThickness(self) -> float: if abs(self._min_thickness - sys.float_info.max) < 10: # Some lenience due to floating point rounding. diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml index b2ef7b8356..66acff656a 100644 --- a/plugins/SimulationView/SimulationViewMainComponent.qml +++ b/plugins/SimulationView/SimulationViewMainComponent.qml @@ -136,7 +136,7 @@ Item Timer { id: simulationTimer - interval: parseFloat(UM.SimulationView.getSimulationTime[pathNumber]).toFixed(2) //10 //dont change + interval: parseFloat(UM.SimulationView.getSimulationTime[pathNumber]).toFixed(2) running: false repeat: true property int pathNumber : 0 From 79c7db3e6f621ad444be94d98a2c27da6d2c9c04 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 1 Dec 2023 08:13:30 +0100 Subject: [PATCH 05/21] Use Uranium workign branch CURA-11137 Contributes to CURA-10831 and CURA-11137 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index d52d62e5cc..1244661849 100644 --- a/conanfile.py +++ b/conanfile.py @@ -328,7 +328,7 @@ class CuraConan(ConanFile): self.requires("pysavitar/5.3.0") self.requires("pynest2d/5.3.0") self.requires("curaengine_plugin_gradual_flow/0.1.0") - self.requires("uranium/(latest)@ultimaker/testing") + self.requires("uranium/(latest)@ultimaker/cura_11137") # FIXME: Use `testing` once the branch is merged self.requires("cura_binary_data/(latest)@ultimaker/testing") self.requires("cpython/3.10.4@ultimaker/stable") self.requires("openssl/3.2.0") From 31d48aabe7ca0b2eca3033b94f2eed7d9b3e20f5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 1 Dec 2023 09:15:21 +0100 Subject: [PATCH 06/21] Use Qt6.6 and PyQt6.6 Contributes to CURA-11137 --- requirements.txt | 79 +++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/requirements.txt b/requirements.txt index 48ee3abcdc..76339c884f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,41 +1,46 @@ ### Direct requirements for Uranium and libCharon ### -PyQt6-sip==13.5.2 \ - --hash=sha256:1bdb1f7b5b2f6ac31d517a6f3a13c38055640ac0014f67a2e5422d2083ce69ec \ - --hash=sha256:318d4d1c7ef60f69c68227cef78fc439accc9028ec6149200eea3d34c433d373 \ - --hash=sha256:4b5b0c4b557e0293eba008021342459a0f91c69a7a2eb5231276d495d1d2960a \ - --hash=sha256:5b499eff7150d9f31fe835a73cc41f076bba2fcde0f5b0325b1284797f17c0ac \ - --hash=sha256:5d0fd42da765198b51d7fe12c29721cbe3e14b77ca4f68aa43618149ee7dbeff \ - --hash=sha256:831f5d606fc5296a80303ab30892c3308954c5766039bf7a96267488bb2524a5 \ - --hash=sha256:87d758ba999baa16459f0a3c7f7ed47a5b45e8991ad691f17345bf3c493a4281 \ - --hash=sha256:91812f0094443b816a74a89954d60bb50060807f54d7c016a4de7bd29454091e \ - --hash=sha256:94afb031db89159aa330891eba2c937b0378b4b264570998848c7a78eddf7c94 \ - --hash=sha256:9ad5b8c4c92d62e00ebf254a4c9656668b130f2a1d2792034e0d82b2d6571509 \ - --hash=sha256:9c9dac067710015895f523f5a2a4d59cbef8624a152b6f9a426e5b848d8c6d29 \ - --hash=sha256:ace942b78378bff8ae2d6bafccc84465f1ff0cf30720b8321e0bd6c95c36ede6 \ - --hash=sha256:b54b0d8d21c5835af8f6d6d8a323a23106e67b7cd4c31e23c35bb4c321000de8 \ - --hash=sha256:c0b4e55c4d0dc44728da90eb1451dfff0d05260b4a3496ff0014494e6c1865a6 \ - --hash=sha256:dcf602c233ee7600e810927adcb9e518d61bc796a6b2013c17feedd24c4e5413 \ - --hash=sha256:ebf6264b6feda01ba37d3b60a4bb87493bdb87be70f7b2a5384a7acd4902d88d -PyQt6==6.5.2 \ - --hash=sha256:1487ee7350f9ffb66d60ab4176519252c2b371762cbe8f8340fd951f63801280 \ - --hash=sha256:5bad1437eb0c1ae801103b32ef04ef62ef1cce505b448525f60089ce36329b89 \ - --hash=sha256:70468cca4537756c714a57fa1baa5beabb9b38775f52f9611f49870705672c55 \ - --hash=sha256:ff1d12767b578f0f0e87cdb12198e7dcad9a176c40d1d1d799984181b0af93cb -PyQt6-Qt6==6.5.2 \ - --hash=sha256:4b37f6f93c0980469ccc570998d3e3de243028bae7389fb6330443ab215ce2f6 \ - --hash=sha256:5a3c7bb899678bf801136b31cd589ed4d0d54ab32be5fb76c2bdeb161a9662ad \ - --hash=sha256:8dad61b4666d91882d7e1c4d619c71e7429c13e19182f8b3bebf3ecf95107d4c \ - --hash=sha256:953f3c0e99e486081a6d438b32fbc240da97457226562eb68cf1b11c516386fd -PyQt6-NetworkAuth==6.5.0 \ - --hash=sha256:6dc9e44a978698b673926e34da486f946ccbbeeac02078517c4d1ee23d0546a4 \ - --hash=sha256:7170db3f99e13aef855d9d52a00a8baa2dea92d12f9b441fed9c6dec57f83e09 \ - --hash=sha256:a8c8cb00a615dde1efaf1d7926e8532df77d6d08798d33b6325fb8f2ff0f220d \ - --hash=sha256:ac56d362c9efcfc194e358cc2bba362535b0775dc2bd8257f964e0bcfe7d421a -PyQt6-NetworkAuth-Qt6==6.5.2 \ - --hash=sha256:0588b93ec5a6f2c492a42dc56967f06d33306169e716c5636448816a65956278 \ - --hash=sha256:29396a63b68e8fa26587c35e8befad0a84e3a05e03551d1329ffd527684edc68 \ - --hash=sha256:2ec8ca45764d2f122912ad6c754b5ffe65f143b5a52f99649cc7931b475e064b \ - --hash=sha256:76e0877ed86247784740a0eb928f3c77da7466f08d96d17306efda6060df2c44 +PyQt6-sip==13.6.0 \ + --hash=sha256:0dfd22cfedd87e96f9d51e0778ca2ba3dc0be83e424e9e0f98f6994d8d9c90f0 \ + --hash=sha256:13885361ca2cb2f5085d50359ba61b3fabd41b139fb58f37332acbe631ef2357 \ + --hash=sha256:24441032a29791e82beb7dfd76878339058def0e97fdb7c1cea517f3a0e6e96b \ + --hash=sha256:2486e1588071943d4f6657ba09096dc9fffd2322ad2c30041e78ea3f037b5778 \ + --hash=sha256:3075d8b325382750829e6cde6971c943352309d35768a4d4da0587459606d562 \ + --hash=sha256:33ea771fe777eb0d1a2c3ef35bcc3f7a286eb3ff09cd5b2fdd3d87d1f392d7e8 \ + --hash=sha256:39854dba35f8e5a4288da26ecb5f40b4c5ec1932efffb3f49d5ea435a7f37fb3 \ + --hash=sha256:3bf03e130fbfd75c9c06e687b86ba375410c7a9e835e4e03285889e61dd4b0c4 \ + --hash=sha256:43fb8551796030aae3d66d6e35e277494071ec6172cd182c9569ab7db268a2f5 \ + --hash=sha256:58f68a48400e0b3d1ccb18090090299bad26e3aed7ccb7057c65887b79b8aeea \ + --hash=sha256:5b9c6b6f9cfccb48cbb78a59603145a698fb4ffd176764d7083e5bf47631d8df \ + --hash=sha256:747f6ca44af81777a2c696bd501bc4815a53ec6fc94d4e25830e10bc1391f8ab \ + --hash=sha256:86a7b67c64436e32bffa9c28c9f21bf14a9faa54991520b12c3f6f435f24df7f \ + --hash=sha256:8c282062125eea5baf830c6998587d98c50be7c3a817a057fb95fef647184012 \ + --hash=sha256:8f9df9f7ccd8a9f0f1d36948c686f03ce1a1281543a3e636b7b7d5e086e1a436 \ + --hash=sha256:98bf954103b087162fa63b3a78f30b0b63da22fd6450b610ec1b851dbb798228 \ + --hash=sha256:9adf672f9114687533a74d5c2d4c03a9a929ad5ad9c3e88098a7da1a440ab916 \ + --hash=sha256:a6ce80bc24618d8a41be8ca51ad9f10e8bc4296dd90ab2809573df30a23ae0e5 \ + --hash=sha256:d6b5f699aaed0ac1fcd23e8fbca70d8a77965831b7c1ce474b81b1678817a49d \ + --hash=sha256:fa759b6339ff7e25f9afe2a6b651b775f0a36bcb3f5fa85e81a90d3b033c83f4 \ + --hash=sha256:fa7b10af7488efc5e53b41dd42c0f421bde6c2865a107af7ae259aff9d841da9 +PyQt6==6.6.0 \ + --hash=sha256:33655db05ac2de699320f035250c21434c77144a6a2943aca3f4c579dabc3f7b \ + --hash=sha256:3ef68830a9b32050c30f7962c56a5927802c9193b68eaf405faecb8ce9ae10a8 \ + --hash=sha256:d41512d66044c2df9c5f515a56a922170d68a37b3406ffddc8b4adc57181b576 \ + --hash=sha256:fc7185d65755f26d7a6842492ec5398c92544dc4eafbbcbef1b1922aca585c96 +PyQt6-Qt6==6.6.0 \ + --hash=sha256:1b079a33088d32ff47872cdb37fd15aa42101f0be46c3340244483849b781438 \ + --hash=sha256:8cb30d64a4d32465ea1686bc827cbe452225fb387c4873356b0fa7b9ae63534f \ + --hash=sha256:a151f34712cd645111e89cb30b02e5fb69c9dcc3603ab3c03a561e874bd7cbcf \ + --hash=sha256:e5483ae04bf107411c7469f1be9f9e2eb9840303e788b3ac524fe30af90d45f4 +PyQt6-NetworkAuth==6.6.0 \ + --hash=sha256:7b90b81792fe53105287c8cbb5e4b22bc44a482268ffb7d3e33f852807f86182 \ + --hash=sha256:c7e2335159aa795e2fe6fb069ccce6308672ab80f26c50fab57caf957371cbb5 \ + --hash=sha256:cdfc0bfaea16a9e09f075bdafefb996aa9fdec392052ba4fb3cbac233c1958fb \ + --hash=sha256:f60ff9a62f5129dc2a9d4c495fb47f9a03e4dfb666b50fb7d61f46e89bf7b6a2 +PyQt6-NetworkAuth-Qt6==6.6.0 \ + --hash=sha256:481d9093e1fb1ac6843d8beabcd359cc34b74b9a2cbb3e2b68d96bd3f178d4e0 \ + --hash=sha256:4cc48fd375730a0ba5fbed9d64abb2914f587377560a78a63aff893f9e276a45 \ + --hash=sha256:5006deabf55304d4a3e0b3c954f93e5835546b11e789d14653a2493d12d3a063 \ + --hash=sha256:bcd56bfc892fec961c51eba3c0bf32ba8317a762d9e254d3830569611ed569d6 certifi==2023.5.7; \ --hash=sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716 From e904123b8095376d31138b0c095909773a4e7d43 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 4 Dec 2023 14:41:46 +0100 Subject: [PATCH 07/21] Use Uranium CURA-11137 Contribute to CURA-11137 --- .github/workflows/conan-recipe-export.yml | 110 ---------------------- conandata.yml | 2 +- 2 files changed, 1 insertion(+), 111 deletions(-) delete mode 100644 .github/workflows/conan-recipe-export.yml diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml deleted file mode 100644 index 69c4e4d34a..0000000000 --- a/.github/workflows/conan-recipe-export.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: Export Conan Recipe to server - -on: - workflow_call: - inputs: - recipe_id_full: - required: true - type: string - - recipe_id_latest: - required: false - type: string - - runs_on: - required: true - type: string - - python_version: - required: true - type: string - - conan_config_branch: - required: false - type: string - - conan_logging_level: - required: false - type: string - - conan_export_binaries: - required: false - type: boolean - - conan_upload_community: - required: false - default: true - type: boolean - -env: - CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }} - CONAN_PASSWORD: ${{ secrets.CONAN_PASS }} - CONAN_LOG_RUN_TO_OUTPUT: 1 - CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }} - CONAN_NON_INTERACTIVE: 1 - -jobs: - package-export: - runs-on: ${{ inputs.runs_on }} - - steps: - - name: Checkout project - uses: actions/checkout@v3 - - - name: Setup Python and pip - uses: actions/setup-python@v4 - with: - python-version: ${{ inputs.python_version }} - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - - - name: Install Python requirements and Create default Conan profile - run: | - pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt - conan profile new default --detect - # Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo - - - name: Cache Conan local repository packages - uses: actions/cache@v3 - with: - path: $HOME/.conan/data - key: ${{ runner.os }}-conan-export-cache - - - name: Get Conan configuration from branch - if: ${{ inputs.conan_config_branch != '' }} - run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}" - - - name: Get Conan configuration - run: | - conan config install https://github.com/Ultimaker/conan-config.git - conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}" - - - name: Add Cura private Artifactory remote - run: conan remote add cura-private-conan-dev https://cura.jfrog.io/artifactory/api/conan/cura-private-conan-dev True - - - name: Set GH service account for remote cura-conan-dev - run: conan user -p ${{ secrets.CONAN_GH_RUNNER_PASS }} -r cura-private-conan-dev "${{ secrets.CONAN_GH_RUNNER_USER }}" - - - name: Export the Package (binaries) - if: ${{ inputs.conan_export_binaries }} - run: conan create . ${{ inputs.recipe_id_full }} --build=missing --update -c tools.build:skip_test=True - - - name: Export the Package - if: ${{ !inputs.conan_export_binaries }} - run: conan export . ${{ inputs.recipe_id_full }} - - - name: Create the latest alias - if: always() - run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }} - - - name: Upload the Package(s) - if: ${{ always() && inputs.conan_upload_community }} - run: | - conan upload ${{ inputs.recipe_id_full }} -r cura --all -c - conan upload ${{ inputs.recipe_id_latest }} -r cura -c - - - name: Upload the Package(s) to the private Artifactory - if: ${{ always() && ! inputs.conan_upload_community }} - run: | - conan upload ${{ inputs.recipe_id_full }} -r cura-private-conan-dev --all -c - conan upload ${{ inputs.recipe_id_latest }} -r cura-private-conan-dev -c diff --git a/conandata.yml b/conandata.yml index 52f15cb3f3..347602a02e 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,6 +1,6 @@ version: "5.7.0-alpha.0" requirements: - - "uranium/(latest)@ultimaker/cura_10831" + - "uranium/(latest)@ultimaker/cura_11137" - "curaengine/(latest)@ultimaker/cura_10831" - "cura_binary_data/(latest)@ultimaker/cura_10831" - "fdm_materials/(latest)@ultimaker/cura_10831" From ce0cdd0b91f8df5a28e9bdf0bebd13c8f850bdb2 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 4 Dec 2023 17:07:43 +0100 Subject: [PATCH 08/21] =?UTF-8?q?Model=20translations=20while=20changing?= =?UTF-8?q?=20build=20plates=20while=20importing=20models,=20coordinate=20?= =?UTF-8?q?translations=20shouldn=E2=80=99t=20matter=20and=20the=20object?= =?UTF-8?q?=20should=20be=20organized=20on=20the=20plate=20where=20it=20fi?= =?UTF-8?q?nds=20space.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CURA-11166 --- cura/CuraApplication.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index c6c44cf8f5..7e2f0fb1ca 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -179,6 +179,7 @@ class CuraApplication(QtApplication): self._use_single_instance = False self._single_instance = None + self._project_mode = None self._cura_formula_functions = None # type: Optional[CuraFormulaFunctions] @@ -1845,7 +1846,7 @@ class CuraApplication(QtApplication): Logger.log("i", "Attempting to read file %s", file.toString()) if not file.isValid(): return - + self._project_mode = project_mode scene = self.getController().getScene() for node in DepthFirstIterator(scene.getRoot()): @@ -1855,16 +1856,16 @@ class CuraApplication(QtApplication): is_project_file = self.checkIsValidProjectFile(file) - if project_mode is None: - project_mode = self.getPreferences().getValue("cura/choice_on_open_project") + if self._project_mode is None: + self._project_mode = self.getPreferences().getValue("cura/choice_on_open_project") - if is_project_file and project_mode == "open_as_project": + if is_project_file and self._project_mode == "open_as_project": # open as project immediately without presenting a dialog workspace_handler = self.getWorkspaceFileHandler() workspace_handler.readLocalFile(file, add_to_recent_files_hint = add_to_recent_files) return - if is_project_file and project_mode == "always_ask": + if is_project_file and self._project_mode == "always_ask": # present a dialog asking to open as project or import models self.callLater(self.openProjectFile.emit, file, add_to_recent_files) return @@ -1999,8 +2000,11 @@ class CuraApplication(QtApplication): center_y = 0 node.translate(Vector(0, center_y, 0)) - nodes_to_arrange.append(node) + # If file extention is 3mf and models are to be loaded from a cura project, + # models are to be arranged in buildplate. + elif self._project_mode == "open_as_model": + nodes_to_arrange.append(node) # This node is deep copied from some other node which already has a BuildPlateDecorator, but the deepcopy # of BuildPlateDecorator produces one that's associated with build plate -1. So, here we need to check if From 30e4c61620fc31703cf0b4227f419beea882db30 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Wed, 6 Dec 2023 12:39:10 +0100 Subject: [PATCH 09/21] review comments fix CURA-11166 --- cura/CuraApplication.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 7e2f0fb1ca..28dfd5e1c9 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -179,7 +179,7 @@ class CuraApplication(QtApplication): self._use_single_instance = False self._single_instance = None - self._project_mode = None + self._open_project_mode: Optional[str] = None self._cura_formula_functions = None # type: Optional[CuraFormulaFunctions] @@ -1846,7 +1846,7 @@ class CuraApplication(QtApplication): Logger.log("i", "Attempting to read file %s", file.toString()) if not file.isValid(): return - self._project_mode = project_mode + self._open_project_mode = project_mode scene = self.getController().getScene() for node in DepthFirstIterator(scene.getRoot()): @@ -1856,16 +1856,16 @@ class CuraApplication(QtApplication): is_project_file = self.checkIsValidProjectFile(file) - if self._project_mode is None: - self._project_mode = self.getPreferences().getValue("cura/choice_on_open_project") + if self._open_project_mode is None: + self._open_project_mode = self.getPreferences().getValue("cura/choice_on_open_project") - if is_project_file and self._project_mode == "open_as_project": + if is_project_file and self._open_project_mode == "open_as_project": # open as project immediately without presenting a dialog workspace_handler = self.getWorkspaceFileHandler() workspace_handler.readLocalFile(file, add_to_recent_files_hint = add_to_recent_files) return - if is_project_file and self._project_mode == "always_ask": + if is_project_file and self._open_project_mode == "always_ask": # present a dialog asking to open as project or import models self.callLater(self.openProjectFile.emit, file, add_to_recent_files) return @@ -2001,9 +2001,9 @@ class CuraApplication(QtApplication): node.translate(Vector(0, center_y, 0)) nodes_to_arrange.append(node) - # If file extention is 3mf and models are to be loaded from a cura project, - # models are to be arranged in buildplate. - elif self._project_mode == "open_as_model": + # If the file is a project,and models are to be loaded from a that project, + # models inside file should be arranged in buildplate. + elif self._open_project_mode == "open_as_model": nodes_to_arrange.append(node) # This node is deep copied from some other node which already has a BuildPlateDecorator, but the deepcopy From bf2c8b5a08e0fbf442edfa70ae4f11f04d3c32f2 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 8 Dec 2023 11:41:16 +0100 Subject: [PATCH 10/21] Simulation time fed to the timer controlling speed simulation time is made 10x faster than the actual time, for better visualisation CURA-7647 --- plugins/SimulationView/SimulationView.py | 10 ++++++---- .../SimulationViewMainComponent.qml | 6 +----- plugins/SimulationView/SimulationViewProxy.py | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 18d1f981c7..6874b27625 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -79,7 +79,7 @@ class SimulationView(CuraView): self.currentLayerNumChanged.connect(self._onCurrentLayerNumChanged) self._current_feedrates = {} - self._visible_lengths ={} + self._lengths_of_polyline ={} self._busy = False self._simulation_running = False @@ -403,7 +403,9 @@ class SimulationView(CuraView): return self._max_feedrate def getSimulationTime(self) -> list: - return self._visible_lengths[self._current_layer_num] / self._current_feedrates[self._current_layer_num] + if len(self._lengths_of_polyline) > 0 and len(self._lengths_of_polyline) == len(self._current_feedrates): + return self._lengths_of_polyline[self._current_layer_num] / self._current_feedrates[self._current_layer_num] + return numpy.zeros(0) def getMinThickness(self) -> float: if abs(self._min_thickness - sys.float_info.max) < 10: # Some lenience due to floating point rounding. @@ -529,10 +531,10 @@ class SimulationView(CuraView): visible_indicies_with_extrusion = numpy.where(numpy.isin(polyline.types, visible_line_types_with_extrusion))[0] if visible_indices.size == 0: # No items to take maximum or minimum of. continue - self._visible_lengths[layer_index] = numpy.take(polyline.lineLengths, visible_indices) + self._lengths_of_polyline[layer_index] = polyline.lineLengths visible_feedrates = numpy.take(polyline.lineFeedrates, visible_indices) visible_feedrates_with_extrusion = numpy.take(polyline.lineFeedrates, visible_indicies_with_extrusion) - self._current_feedrates[layer_index] = visible_feedrates + self._current_feedrates[layer_index] = polyline.lineFeedrates visible_linewidths = numpy.take(polyline.lineWidths, visible_indices) visible_linewidths_with_extrusion = numpy.take(polyline.lineWidths, visible_indicies_with_extrusion) visible_thicknesses = numpy.take(polyline.lineThicknesses, visible_indices) diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml index 66acff656a..216095c15c 100644 --- a/plugins/SimulationView/SimulationViewMainComponent.qml +++ b/plugins/SimulationView/SimulationViewMainComponent.qml @@ -136,10 +136,9 @@ Item Timer { id: simulationTimer - interval: parseFloat(UM.SimulationView.getSimulationTime[pathNumber]).toFixed(2) + interval: UM.SimulationView.simulationTime running: false repeat: true - property int pathNumber : 0 onTriggered: { var currentPath = UM.SimulationView.currentPath @@ -154,12 +153,10 @@ Item if (currentPath >= numPaths) { UM.SimulationView.setCurrentPath(0) - pathNumber =0 } else { UM.SimulationView.setCurrentPath(currentPath + 1) - pathNumber = 0 } } // If the simulation is already playing and we reach the end of a layer, then it automatically @@ -187,7 +184,6 @@ Item // The status must be set here instead of in the resumeSimulation function otherwise it won't work // correctly, because part of the logic is in this trigger function. isSimulationPlaying = true - pathNumber += 1 } } diff --git a/plugins/SimulationView/SimulationViewProxy.py b/plugins/SimulationView/SimulationViewProxy.py index 669f7fdbcc..e80005fc36 100644 --- a/plugins/SimulationView/SimulationViewProxy.py +++ b/plugins/SimulationView/SimulationViewProxy.py @@ -2,9 +2,11 @@ # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING +import numpy from PyQt6.QtCore import QObject, pyqtSignal, pyqtProperty from UM.FlameProfiler import pyqtSlot from UM.Application import Application +from UM.Logger import Logger if TYPE_CHECKING: from .SimulationView import SimulationView @@ -54,6 +56,19 @@ class SimulationViewProxy(QObject): def currentPath(self): return self._simulation_view.getCurrentPath() + @pyqtProperty(int, notify=currentPathChanged) + def simulationTime(self): + # This if is activated when there is a layer change + if numpy.all(self._simulation_view.getSimulationTime()==0) or len(self._simulation_view.getSimulationTime()) <= self._simulation_view.getCurrentPath(): + return 100 + # Extracts the currents paths simulation time (in seconds) from the dict of simulation time of the current layer. + # We multiply the time with 100 to make it to ms from s.(Should be 1000 in real time). This scaling makes the simulation time 10x faster than the real time. + simulationTimeOfpath =self._simulation_view.getSimulationTime()[0][self._simulation_view.getCurrentPath()] * 100 + # Since the timer cannot process time less than 1 ms, we put a lower limit here + if simulationTimeOfpath < 1: + return 1 + return int(simulationTimeOfpath) + @pyqtProperty(int, notify=currentPathChanged) def minimumPath(self): return self._simulation_view.getMinimumPath() From 7711c15ddedcce78e735d0a016f36e0134d3814d Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 8 Dec 2023 11:43:38 +0100 Subject: [PATCH 11/21] removed unnecessary import CURA-7647 --- plugins/SimulationView/SimulationViewProxy.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/SimulationView/SimulationViewProxy.py b/plugins/SimulationView/SimulationViewProxy.py index e80005fc36..8f83e9b403 100644 --- a/plugins/SimulationView/SimulationViewProxy.py +++ b/plugins/SimulationView/SimulationViewProxy.py @@ -6,7 +6,6 @@ import numpy from PyQt6.QtCore import QObject, pyqtSignal, pyqtProperty from UM.FlameProfiler import pyqtSlot from UM.Application import Application -from UM.Logger import Logger if TYPE_CHECKING: from .SimulationView import SimulationView From a19c667106fce8ab4e6f7c7f50bd16c709d2aa51 Mon Sep 17 00:00:00 2001 From: Saumya Jain <70144862+saumyaj3@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:29:33 +0100 Subject: [PATCH 12/21] Update plugins/SimulationView/SimulationViewProxy.py simplified code Co-authored-by: Casper Lamboo --- plugins/SimulationView/SimulationViewProxy.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/SimulationView/SimulationViewProxy.py b/plugins/SimulationView/SimulationViewProxy.py index 8f83e9b403..e3d5ca13a7 100644 --- a/plugins/SimulationView/SimulationViewProxy.py +++ b/plugins/SimulationView/SimulationViewProxy.py @@ -64,9 +64,7 @@ class SimulationViewProxy(QObject): # We multiply the time with 100 to make it to ms from s.(Should be 1000 in real time). This scaling makes the simulation time 10x faster than the real time. simulationTimeOfpath =self._simulation_view.getSimulationTime()[0][self._simulation_view.getCurrentPath()] * 100 # Since the timer cannot process time less than 1 ms, we put a lower limit here - if simulationTimeOfpath < 1: - return 1 - return int(simulationTimeOfpath) + return int(max(1, simulationTimeOfpath)) @pyqtProperty(int, notify=currentPathChanged) def minimumPath(self): From ba0fb97d6373bd51c143a4ad7169885bf354c236 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 12 Dec 2023 10:01:59 +0100 Subject: [PATCH 13/21] Include threshold settings Contributes to CURA-11391 --- resources/definitions/fdmprinter.def.json | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index b640fb5746..85785981d6 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -8305,6 +8305,88 @@ } } }, + "ppr": + { + "label": "Print Process Reporting", + "type": "category", + "icon": "DocumentFilled", + "description": "Reporting events that go out of set thresholds", + "enabled": false, + "children": + { + "ppr_enable": + { + "label": "Enable Print Process Reporting", + "description": "Enable print process reporting for setting threshold values for possible fault detection.", + "type": "bool", + "enabled": false, + "default_value": false, + "value": false, + "settable_per_mesh": false, + "settable_per_extruder": false + }, + "flow_warn_limit": + { + "label": "Flow Warning Detection Limit", + "description": "Limit on the flow warning for detection.", + "default_value": "15.0", + "enabled": "ppr_enable", + "unit": "%", + "type": "float", + "settable_per_extruder": true + }, + "flow_anomaly_limit": + { + "label": "Flow Anomaly Detection Limit", + "description": "Limit on flow anomaly for detection.", + "default_value": "25.0", + "enabled": "ppr_enable", + "unit": "%", + "type": "float", + "settable_per_extruder": true + }, + "print_temp_warn_limit": + { + "label": "Print temperature Warning Detection Limit", + "description": "Limit on Print temperature warning for detection.", + "unit": "\u00b0C", + "type": "float", + "default_value": "3.0", + "enabled": "ppr_enable", + "settable_per_extruder": true + }, + "print_temp_anomaly_limit": + { + "label": "Print temperature Anomaly Detection Limit", + "description": "Limit on Print Temperature anomaly for detection.", + "unit": "\u00b0C", + "type": "float", + "default_value": "7.0", + "enabled": "ppr_enable", + "settable_per_extruder": true + }, + "bv_temp_warn_limit": + { + "label": "Build Volume temperature Warning Detection Limit", + "description": "Limit on Build Volume Temperature warning for detection.", + "unit": "\u00b0C", + "type": "float", + "default_value": "7.5", + "enabled": "ppr_enable", + "settable_per_extruder": false + }, + "bv_temp_anomaly_limit": + { + "label": "Build Volume temperature Anomaly Detection Limit", + "description": "Limit on Build Volume temperature Anomaly for detection.", + "unit": "\u00b0C", + "type": "float", + "default_value": "10.0", + "enabled": "ppr_enable", + "settable_per_extruder": false + } + } + }, "command_line_settings": { "label": "Command Line Settings", From cc4627886b85f2e1ef94f3190350e812d591a303 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 12 Dec 2023 13:01:37 +0100 Subject: [PATCH 14/21] Name shortned for Cura settings CURA-11392 --- resources/definitions/fdmprinter.def.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 85785981d6..62143cf8f8 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -8327,7 +8327,7 @@ }, "flow_warn_limit": { - "label": "Flow Warning Detection Limit", + "label": "Flow Warning", "description": "Limit on the flow warning for detection.", "default_value": "15.0", "enabled": "ppr_enable", @@ -8337,7 +8337,7 @@ }, "flow_anomaly_limit": { - "label": "Flow Anomaly Detection Limit", + "label": "Flow Limit", "description": "Limit on flow anomaly for detection.", "default_value": "25.0", "enabled": "ppr_enable", @@ -8347,7 +8347,7 @@ }, "print_temp_warn_limit": { - "label": "Print temperature Warning Detection Limit", + "label": "Print temperature Warning", "description": "Limit on Print temperature warning for detection.", "unit": "\u00b0C", "type": "float", @@ -8357,7 +8357,7 @@ }, "print_temp_anomaly_limit": { - "label": "Print temperature Anomaly Detection Limit", + "label": "Print temperature Limit", "description": "Limit on Print Temperature anomaly for detection.", "unit": "\u00b0C", "type": "float", @@ -8367,7 +8367,7 @@ }, "bv_temp_warn_limit": { - "label": "Build Volume temperature Warning Detection Limit", + "label": "Build Volume temperature Warning", "description": "Limit on Build Volume Temperature warning for detection.", "unit": "\u00b0C", "type": "float", @@ -8377,7 +8377,7 @@ }, "bv_temp_anomaly_limit": { - "label": "Build Volume temperature Anomaly Detection Limit", + "label": "Build Volume temperature Limit", "description": "Limit on Build Volume temperature Anomaly for detection.", "unit": "\u00b0C", "type": "float", From 189a22aa4fc9a5414424760ccab87a0418cf99d7 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 12 Dec 2023 14:56:06 +0100 Subject: [PATCH 15/21] refactoring of code for easier access and avoid hanging issues CURA-7647 --- plugins/SimulationView/SimulationView.py | 13 +++++++++---- plugins/SimulationView/SimulationViewProxy.py | 7 ++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 6874b27625..186036a581 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -402,10 +402,13 @@ class SimulationView(CuraView): def getMaxFeedrate(self) -> float: return self._max_feedrate - def getSimulationTime(self) -> list: - if len(self._lengths_of_polyline) > 0 and len(self._lengths_of_polyline) == len(self._current_feedrates): - return self._lengths_of_polyline[self._current_layer_num] / self._current_feedrates[self._current_layer_num] - return numpy.zeros(0) + def getSimulationTime(self, currentIndex) -> list: + try: + return self._lengths_of_polyline[self._current_layer_num][currentIndex] / self._current_feedrates[self._current_layer_num][currentIndex] + except: + # In case of change in layers, currentIndex comes one more than the items in the lengths_of_polyline + # We give 1 second time for layer change + return 1 def getMinThickness(self) -> float: if abs(self._min_thickness - sys.float_info.max) < 10: # Some lenience due to floating point rounding. @@ -535,6 +538,8 @@ class SimulationView(CuraView): visible_feedrates = numpy.take(polyline.lineFeedrates, visible_indices) visible_feedrates_with_extrusion = numpy.take(polyline.lineFeedrates, visible_indicies_with_extrusion) self._current_feedrates[layer_index] = polyline.lineFeedrates + # if len(polyline.lineLengths) > 0 and len(polyline.lineLengths) == len(polyline.lineFeedrates): + # self._simulation_time[layer_index] = polyline.lineLengths / polyline.lineFeedrates visible_linewidths = numpy.take(polyline.lineWidths, visible_indices) visible_linewidths_with_extrusion = numpy.take(polyline.lineWidths, visible_indicies_with_extrusion) visible_thicknesses = numpy.take(polyline.lineThicknesses, visible_indices) diff --git a/plugins/SimulationView/SimulationViewProxy.py b/plugins/SimulationView/SimulationViewProxy.py index e3d5ca13a7..61366fccbb 100644 --- a/plugins/SimulationView/SimulationViewProxy.py +++ b/plugins/SimulationView/SimulationViewProxy.py @@ -57,12 +57,9 @@ class SimulationViewProxy(QObject): @pyqtProperty(int, notify=currentPathChanged) def simulationTime(self): - # This if is activated when there is a layer change - if numpy.all(self._simulation_view.getSimulationTime()==0) or len(self._simulation_view.getSimulationTime()) <= self._simulation_view.getCurrentPath(): - return 100 - # Extracts the currents paths simulation time (in seconds) from the dict of simulation time of the current layer. + # Extracts the currents paths simulation time (in seconds) for the current path from the dict of simulation time of the current layer. # We multiply the time with 100 to make it to ms from s.(Should be 1000 in real time). This scaling makes the simulation time 10x faster than the real time. - simulationTimeOfpath =self._simulation_view.getSimulationTime()[0][self._simulation_view.getCurrentPath()] * 100 + simulationTimeOfpath = self._simulation_view.getSimulationTime(self._simulation_view.getCurrentPath()) * 100 # Since the timer cannot process time less than 1 ms, we put a lower limit here return int(max(1, simulationTimeOfpath)) From 3c0b9a65db5e204cecc0dcdb43d8dd59d3b1d4f0 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 12 Dec 2023 14:59:41 +0100 Subject: [PATCH 16/21] removing commented code CURA-7647 --- plugins/SimulationView/SimulationView.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 186036a581..cbf5e571fc 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -538,8 +538,6 @@ class SimulationView(CuraView): visible_feedrates = numpy.take(polyline.lineFeedrates, visible_indices) visible_feedrates_with_extrusion = numpy.take(polyline.lineFeedrates, visible_indicies_with_extrusion) self._current_feedrates[layer_index] = polyline.lineFeedrates - # if len(polyline.lineLengths) > 0 and len(polyline.lineLengths) == len(polyline.lineFeedrates): - # self._simulation_time[layer_index] = polyline.lineLengths / polyline.lineFeedrates visible_linewidths = numpy.take(polyline.lineWidths, visible_indices) visible_linewidths_with_extrusion = numpy.take(polyline.lineWidths, visible_indicies_with_extrusion) visible_thicknesses = numpy.take(polyline.lineThicknesses, visible_indices) From a9aba2df748977554a454ce3e7d7b1667d152e8d Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 12 Dec 2023 16:06:22 +0100 Subject: [PATCH 17/21] maintenence. CURA-7647 --- plugins/SimulationView/SimulationView.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index cbf5e571fc..a659a6de97 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -402,13 +402,14 @@ class SimulationView(CuraView): def getMaxFeedrate(self) -> float: return self._max_feedrate - def getSimulationTime(self, currentIndex) -> list: + def getSimulationTime(self, currentIndex) -> float: try: - return self._lengths_of_polyline[self._current_layer_num][currentIndex] / self._current_feedrates[self._current_layer_num][currentIndex] + return (self._lengths_of_polyline[self._current_layer_num][currentIndex] / self._current_feedrates[self._current_layer_num][currentIndex])[0] + except: # In case of change in layers, currentIndex comes one more than the items in the lengths_of_polyline # We give 1 second time for layer change - return 1 + return 1.0 def getMinThickness(self) -> float: if abs(self._min_thickness - sys.float_info.max) < 10: # Some lenience due to floating point rounding. From 84565b7daa03613087b2544b78fc944e249eae3d Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 12 Dec 2023 16:53:34 +0100 Subject: [PATCH 18/21] removal of magic number CURA-7647 --- plugins/SimulationView/SimulationViewProxy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/SimulationView/SimulationViewProxy.py b/plugins/SimulationView/SimulationViewProxy.py index 61366fccbb..576281874c 100644 --- a/plugins/SimulationView/SimulationViewProxy.py +++ b/plugins/SimulationView/SimulationViewProxy.py @@ -12,6 +12,11 @@ if TYPE_CHECKING: class SimulationViewProxy(QObject): + + S_TO_MS = 1000 + SPEED_OF_SIMULATION = 10 + FACTOR = S_TO_MS/SPEED_OF_SIMULATION + def __init__(self, simulation_view: "SimulationView", parent=None) -> None: super().__init__(parent) self._simulation_view = simulation_view @@ -59,7 +64,7 @@ class SimulationViewProxy(QObject): def simulationTime(self): # Extracts the currents paths simulation time (in seconds) for the current path from the dict of simulation time of the current layer. # We multiply the time with 100 to make it to ms from s.(Should be 1000 in real time). This scaling makes the simulation time 10x faster than the real time. - simulationTimeOfpath = self._simulation_view.getSimulationTime(self._simulation_view.getCurrentPath()) * 100 + simulationTimeOfpath = self._simulation_view.getSimulationTime(self._simulation_view.getCurrentPath()) * SimulationViewProxy.FACTOR # Since the timer cannot process time less than 1 ms, we put a lower limit here return int(max(1, simulationTimeOfpath)) From 3472ec26a10c330cd6aea040ef70e0d6db94434d Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 12 Dec 2023 17:19:28 +0100 Subject: [PATCH 19/21] Fix snapshot for makerbot CURA-11442 --- cura/Snapshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Snapshot.py b/cura/Snapshot.py index 40c74c9693..f94b3ff42e 100644 --- a/cura/Snapshot.py +++ b/cura/Snapshot.py @@ -49,7 +49,7 @@ class Snapshot: """ if node is None: - root = Application.getInstance().getController().getScene().getRoot() + node = Application.getInstance().getController().getScene().getRoot() # the direction the camera is looking at to create the isometric view iso_view_dir = Vector(-1, -1, -1).normalized() From 5125c7d33a6dd1f36374d084d8100e22c9c3f99c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 13 Dec 2023 17:00:02 +0100 Subject: [PATCH 20/21] Don't package system managed openssl This should fall back on the Conan package ssl version which is in the root of the AppDir Contributes to CURA-11080 --- packaging/AppImage-builder/AppImageBuilder.yml.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/AppImage-builder/AppImageBuilder.yml.jinja b/packaging/AppImage-builder/AppImageBuilder.yml.jinja index 446c0dacc0..9090a5f209 100644 --- a/packaging/AppImage-builder/AppImageBuilder.yml.jinja +++ b/packaging/AppImage-builder/AppImageBuilder.yml.jinja @@ -38,6 +38,7 @@ AppDir: - usr/share/doc/*/changelog.* - usr/share/doc/*/NEWS.* - usr/share/doc/*/TODO.* + - usr/lib/x86_64-linux-gnu/libssl.so* runtime: env: APPDIR_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders" From aebd5f32c5bb82a39d9d2f7a6ab070761e8e7e28 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 15 Dec 2023 10:08:16 +0100 Subject: [PATCH 21/21] Update Sentry to `1.39.1` Contributes to CURA-11464 --- requirements.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/requirements.txt b/requirements.txt index 76339c884f..916886e369 100644 --- a/requirements.txt +++ b/requirements.txt @@ -171,9 +171,9 @@ scipy==1.9.1 \ trimesh==3.9.36 \ --hash=sha256:f01e8edab14d1999700c980c21a1546f37417216ad915a53be649d263130181e \ --hash=sha256:8ac8bea693b3ee119f11b022fc9b9481c9f1af06cb38bc859bf5d16bbbe49b23 -sentry-sdk==0.13.5 \ - --hash=sha256:05285942901d38c7ce2498aba50d8e87b361fc603281a5902dda98f3f8c5e145 \ - --hash=sha256:c6b919623e488134a728f16326c6f0bcdab7e3f59e7f4c472a90eea4d6d8fe82 +sentry-sdk==1.39.1 \ + --hash=sha256:320a55cdf9da9097a0bead239c35b7e61f53660ef9878861824fd6d9b2eaf3b5 \ + --hash=sha256:81b5b9ffdd1a374e9eb0c053b5d2012155db9cbe76393a8585677b753bd5fdc1 mypy==0.931 \ --hash=sha256:0038b21890867793581e4cb0d810829f5fd4441aa75796b53033af3aa30430ce \ --hash=sha256:1171f2e0859cfff2d366da2c7092b06130f232c636a3f7301e3feb8b41f6377d \ @@ -209,9 +209,9 @@ idna==2.8 \ attrs==21.2.0 \ --hash=sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1 \ --hash=sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb -requests==2.22.0 \ - --hash=sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4 \ - --hash=sha256:9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31 +requests==2.31.0 \ + --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 \ + --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f # twisted Twisted==21.2.0 \ --hash=sha256:77544a8945cf69b98d2946689bbe0c75de7d145cdf11f391dd487eae8fc95a12 \ @@ -372,9 +372,9 @@ cffi==1.15.0 \ --hash=sha256:f6f824dc3bce0edab5f427efcfb1d63ee75b6fcb7282900ccaf925be84efb0fc \ --hash=sha256:fd8a250edc26254fe5b33be00402e6d287f562b6a5b2152dec302fa15bb3e997 \ --hash=sha256:ffaa5c925128e29efbde7301d8ecaf35c8c60ffbcd6a1ffd3a552177c8e5e796 -urllib3==1.25.9 \ - --hash=sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527 \ - --hash=sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115 +urllib3==2.1.0 \ + --hash=sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54 \ + --hash=sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3 mypy-extensions==0.4.3 \ --hash=sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d \ --hash=sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8