From 776c71e5c9f648d7c0b83e2feba0e1d4cd8b1eec Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Sat, 23 Jul 2022 22:35:18 +0200 Subject: [PATCH 01/32] Shorten excessively long lines - Some lines in the files were excessively long, even in the context of the Cura project which seems to prefer a long line length. These lines could not be read easily even on github .... - Removed some unnecessary whitespaces - Added some extra spaces so that inline comments are separated by at least two spaces from the statement --- cura/LayerPolygon.py | 62 +++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 2c3b432b1d..89bb84d375 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -24,9 +24,12 @@ class LayerPolygon: PrimeTowerType = 11 __number_of_types = 12 - __jump_map = numpy.logical_or(numpy.logical_or(numpy.arange(__number_of_types) == NoneType, numpy.arange(__number_of_types) == MoveCombingType), numpy.arange(__number_of_types) == MoveRetractionType) + __jump_map = numpy.logical_or(numpy.logical_or(numpy.arange(__number_of_types) == NoneType, + numpy.arange(__number_of_types) == MoveCombingType), + numpy.arange(__number_of_types) == MoveRetractionType) - def __init__(self, extruder: int, line_types: numpy.ndarray, data: numpy.ndarray, line_widths: numpy.ndarray, line_thicknesses: numpy.ndarray, line_feedrates: numpy.ndarray) -> None: + def __init__(self, extruder: int, line_types: numpy.ndarray, data: numpy.ndarray, + line_widths: numpy.ndarray, line_thicknesses: numpy.ndarray, line_feedrates: numpy.ndarray) -> None: """LayerPolygon, used in ProcessSlicedLayersJob :param extruder: The position of the extruder @@ -58,14 +61,16 @@ class LayerPolygon: self._mesh_line_count = len(self._types) - self._jump_count self._vertex_count = self._mesh_line_count + numpy.sum(self._types[1:] == self._types[:-1]) - # Buffering the colors shouldn't be necessary as it is not + # Buffering the colors shouldn't be necessary as it is not # re-used and can save a lot of memory usage. self._color_map = LayerPolygon.getColorMap() self._colors = self._color_map[self._types] # type: numpy.ndarray - # When type is used as index returns true if type == LayerPolygon.InfillType or type == LayerPolygon.SkinType or type == LayerPolygon.SupportInfillType + # When type is used as index returns true if type == LayerPolygon.InfillType + # or type == LayerPolygon.SkinType + # or type == LayerPolygon.SupportInfillType # Should be generated in better way, not hardcoded. - self._is_infill_or_skin_type_map = numpy.array([0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0], dtype = bool) + self._is_infill_or_skin_type_map = numpy.array([0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0], dtype=bool) self._build_cache_line_mesh_mask = None # type: Optional[numpy.ndarray] self._build_cache_needed_points = None # type: Optional[numpy.ndarray] @@ -80,12 +85,14 @@ class LayerPolygon: # Only if the type of line segment changes do we need to add an extra vertex to change colors self._build_cache_needed_points[1:, 0][:, numpy.newaxis] = self._types[1:] != self._types[:-1] # Mark points as unneeded if they are of types we don't want in the line mesh according to the calculated mask - numpy.logical_and(self._build_cache_needed_points, self._build_cache_line_mesh_mask, self._build_cache_needed_points ) + numpy.logical_and(self._build_cache_needed_points, self._build_cache_line_mesh_mask, self._build_cache_needed_points) self._vertex_begin = 0 self._vertex_end = cast(int, numpy.sum(self._build_cache_needed_points)) - def build(self, vertex_offset: int, index_offset: int, vertices: numpy.ndarray, colors: numpy.ndarray, line_dimensions: numpy.ndarray, feedrates: numpy.ndarray, extruders: numpy.ndarray, line_types: numpy.ndarray, indices: numpy.ndarray) -> None: + def build(self, vertex_offset: int, index_offset: int, vertices: numpy.ndarray, + colors: numpy.ndarray, line_dimensions: numpy.ndarray, feedrates: numpy.ndarray, + extruders: numpy.ndarray, line_types: numpy.ndarray, indices: numpy.ndarray) -> None: """Set all the arrays provided by the function caller, representing the LayerPolygon The arrays are either by vertex or by indices. @@ -112,18 +119,18 @@ class LayerPolygon: needed_points_list = self._build_cache_needed_points # Index to the points we need to represent the line mesh. This is constructed by generating simple - # start and end points for each line. For line segment n these are points n and n+1. Row n reads [n n+1] - # Then then the indices for the points we don't need are thrown away based on the pre-calculated list. - index_list = ( numpy.arange(len(self._types)).reshape((-1, 1)) + numpy.array([[0, 1]]) ).reshape((-1, 1))[needed_points_list.reshape((-1, 1))] + # start and end points for each line. For line segment n these are points n and n+1. Row n reads [n n+1] + # Then then the indices for the points we don't need are thrown away based on the pre-calculated list. + index_list = (numpy.arange(len(self._types)).reshape((-1, 1)) + numpy.array([[0, 1]])).reshape((-1, 1))[needed_points_list.reshape((-1, 1))] # The relative values of begin and end indices have already been set in buildCache, so we only need to offset them to the parents offset. self._vertex_begin += vertex_offset self._vertex_end += vertex_offset - # Points are picked based on the index list to get the vertices needed. + # Points are picked based on the index list to get the vertices needed. vertices[self._vertex_begin:self._vertex_end, :] = self._data[index_list, :] - # Create an array with colors for each vertex and remove the color data for the points that has been thrown away. + # Create an array with colors for each vertex and remove the color data for the points that has been thrown away. colors[self._vertex_begin:self._vertex_end, :] = numpy.tile(self._colors, (1, 2)).reshape((-1, 4))[needed_points_list.ravel()] # Create an array with line widths and thicknesses for each vertex. @@ -138,14 +145,15 @@ class LayerPolygon: # Convert type per vertex to type per line line_types[self._vertex_begin:self._vertex_end] = numpy.tile(self._types, (1, 2)).reshape((-1, 1))[needed_points_list.ravel()][:, 0] - # The relative values of begin and end indices have already been set in buildCache, so we only need to offset them to the parents offset. + # The relative values of begin and end indices have already been set in buildCache, + # so we only need to offset them to the parents offset. self._index_begin += index_offset self._index_end += index_offset - indices[self._index_begin:self._index_end, :] = numpy.arange(self._index_end-self._index_begin, dtype = numpy.int32).reshape((-1, 1)) + indices[self._index_begin:self._index_end, :] = numpy.arange(self._index_end-self._index_begin, dtype=numpy.int32).reshape((-1, 1)) # When the line type changes the index needs to be increased by 2. indices[self._index_begin:self._index_end, :] += numpy.cumsum(needed_points_list[line_mesh_mask.ravel(), 0], dtype = numpy.int32).reshape((-1, 1)) - # Each line segment goes from it's starting point p to p+1, offset by the vertex index. + # Each line segment goes from it's starting point p to p+1, offset by the vertex index. # The -1 is to compensate for the necessarily True value of needed_points_list[0,0] which causes an unwanted +1 in cumsum above. indices[self._index_begin:self._index_end, :] += numpy.array([self._vertex_begin - 1, self._vertex_begin]) @@ -214,7 +222,7 @@ class LayerPolygon: """ normals = numpy.copy(self._data) - normals[:, 1] = 0.0 # We are only interested in 2D normals + normals[:, 1] = 0.0 # We are only interested in 2D normals # Calculate the edges between points. # The call to numpy.roll shifts the entire array by one so that @@ -245,17 +253,17 @@ class LayerPolygon: if cls.__color_map is None: theme = cast(Theme, QtApplication.getInstance().getTheme()) cls.__color_map = numpy.array([ - theme.getColor("layerview_none").getRgbF(), # NoneType - theme.getColor("layerview_inset_0").getRgbF(), # Inset0Type - theme.getColor("layerview_inset_x").getRgbF(), # InsetXType - theme.getColor("layerview_skin").getRgbF(), # SkinType - theme.getColor("layerview_support").getRgbF(), # SupportType - theme.getColor("layerview_skirt").getRgbF(), # SkirtType - theme.getColor("layerview_infill").getRgbF(), # InfillType - theme.getColor("layerview_support_infill").getRgbF(), # SupportInfillType - theme.getColor("layerview_move_combing").getRgbF(), # MoveCombingType - theme.getColor("layerview_move_retraction").getRgbF(), # MoveRetractionType - theme.getColor("layerview_support_interface").getRgbF(), # SupportInterfaceType + theme.getColor("layerview_none").getRgbF(), # NoneType + theme.getColor("layerview_inset_0").getRgbF(), # Inset0Type + theme.getColor("layerview_inset_x").getRgbF(), # InsetXType + theme.getColor("layerview_skin").getRgbF(), # SkinType + theme.getColor("layerview_support").getRgbF(), # SupportType + theme.getColor("layerview_skirt").getRgbF(), # SkirtType + theme.getColor("layerview_infill").getRgbF(), # InfillType + theme.getColor("layerview_support_infill").getRgbF(), # SupportInfillType + theme.getColor("layerview_move_combing").getRgbF(), # MoveCombingType + theme.getColor("layerview_move_retraction").getRgbF(), # MoveRetractionType + theme.getColor("layerview_support_interface").getRgbF(), # SupportInterfaceType theme.getColor("layerview_prime_tower").getRgbF() # PrimeTowerType ]) From bce60a7d96d88e47723c68a69e9bbbcf33d689ff Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Sat, 23 Jul 2022 23:02:00 +0200 Subject: [PATCH 02/32] Fix typo Correct typo (duplicated word) --- cura/LayerPolygon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 89bb84d375..4ba206e34d 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -120,7 +120,7 @@ class LayerPolygon: # Index to the points we need to represent the line mesh. This is constructed by generating simple # start and end points for each line. For line segment n these are points n and n+1. Row n reads [n n+1] - # Then then the indices for the points we don't need are thrown away based on the pre-calculated list. + # Then the indices for the points we don't need are thrown away based on the pre-calculated list. index_list = (numpy.arange(len(self._types)).reshape((-1, 1)) + numpy.array([[0, 1]])).reshape((-1, 1))[needed_points_list.reshape((-1, 1))] # The relative values of begin and end indices have already been set in buildCache, so we only need to offset them to the parents offset. From 9221c3e21e41c6cd318c350028677ce984b2fc21 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Sat, 23 Jul 2022 23:11:06 +0200 Subject: [PATCH 03/32] Improve layout of comment Modify the layout of the comment to improve readability. Now each sentence starts on a new line. Add a punctuation mark (comma) to improve clarity. --- cura/LayerPolygon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 4ba206e34d..7a66b60ca0 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -118,8 +118,9 @@ class LayerPolygon: line_mesh_mask = self._build_cache_line_mesh_mask needed_points_list = self._build_cache_needed_points - # Index to the points we need to represent the line mesh. This is constructed by generating simple - # start and end points for each line. For line segment n these are points n and n+1. Row n reads [n n+1] + # Index to the points we need to represent the line mesh. + # This is constructed by generating simple start and end points for each line. + # For line segment n, these are points n and n+1. Row n reads [n n+1] # Then the indices for the points we don't need are thrown away based on the pre-calculated list. index_list = (numpy.arange(len(self._types)).reshape((-1, 1)) + numpy.array([[0, 1]])).reshape((-1, 1))[needed_points_list.reshape((-1, 1))] From 1bf330df66f0797077d7ffdd469d1fe5b3762c82 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Sat, 23 Jul 2022 23:19:20 +0200 Subject: [PATCH 04/32] Improve layout of comment Modify the layout of the comment to improve readability. Now each sentence starts on a new line. --- cura/LayerPolygon.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 7a66b60ca0..d5714f403e 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -226,10 +226,9 @@ class LayerPolygon: normals[:, 1] = 0.0 # We are only interested in 2D normals # Calculate the edges between points. - # The call to numpy.roll shifts the entire array by one so that - # we end up subtracting each next point from the current, wrapping - # around. This gives us the edges from the next point to the current - # point. + # The call to numpy.roll shifts the entire array by one + # so that we end up subtracting each next point from the current, wrapping around. + # This gives us the edges from the next point to the current point. normals = numpy.diff(normals, 1, 0) # Calculate the length of each edge using standard Pythagoras From b8f448a359b84ef33bfee783cfe3bceab3d91541 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Thu, 28 Jul 2022 11:18:16 +0200 Subject: [PATCH 05/32] Add link to style guide Add link to the document that describes the code conventions and guidelines to be followed in all Ultimaker code, regardless the programming environment / language. This document is located in the Ultimaker/Meta repo. --- contributing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index 06f9dd472b..180b6b1461 100644 --- a/contributing.md +++ b/contributing.md @@ -16,4 +16,6 @@ Making pull requests -------------------- If you want to propose a change to Cura's source code, please create a pull request in the appropriate repository (being [Cura](https://github.com/Ultimaker/Cura), [Uranium](https://github.com/Ultimaker/Uranium), [CuraEngine](https://github.com/Ultimaker/CuraEngine), [fdm_materials](https://github.com/Ultimaker/fdm_materials), [libArcus](https://github.com/Ultimaker/libArcus), [cura-build](https://github.com/Ultimaker/cura-build), [cura-build-environment](https://github.com/Ultimaker/cura-build-environment), [libSavitar](https://github.com/Ultimaker/libSavitar), [libCharon](https://github.com/Ultimaker/libCharon) or [cura-binary-data](https://github.com/Ultimaker/cura-binary-data)) and if your change requires changes on multiple of these repositories, please link them together so that we know to merge them together. -Some of these repositories will have automated tests running when you create a pull request, indicated by green check marks or red crosses in the Github web page. If you see a red cross, that means that a test has failed. If the test doesn't fail on the Master branch but does fail on your branch, that indicates that you've probably made a mistake and you need to do that. Click on the cross for more details, or run the test locally by running `cmake . && ctest --verbose`. \ No newline at end of file +The style guide for code contributions to Cura and other Ultimaker projects can be found [here](https://github.com/Ultimaker/Meta/blob/master/general/generic_code_conventions.md). + +Some of these repositories will have automated tests running when you create a pull request, indicated by green check marks or red crosses in the Github web page. If you see a red cross, that means that a test has failed. If the test doesn't fail on the Master branch but does fail on your branch, that indicates that you've probably made a mistake and you need to do that. Click on the cross for more details, or run the test locally by running `cmake . && ctest --verbose`. From 556b009a9dbe68ba25960a29e9ff1eb88725e140 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 3 Aug 2022 11:26:39 +0200 Subject: [PATCH 06/32] Fix Bug in timing MachineErrorChecker execution We want the Logger in line 215 to give the execution time in seconds so we don't want the start time to be the epoch. Currently the logger will output something like time = 1659518458.5s not like time = 3.0s --- cura/Machines/MachineErrorChecker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/MachineErrorChecker.py b/cura/Machines/MachineErrorChecker.py index 2cb333d157..d2140cc49b 100644 --- a/cura/Machines/MachineErrorChecker.py +++ b/cura/Machines/MachineErrorChecker.py @@ -43,7 +43,7 @@ class MachineErrorChecker(QObject): self._application = cura.CuraApplication.CuraApplication.getInstance() self._machine_manager = self._application.getMachineManager() - self._start_time = 0. # measure checking time + self._start_time = time.time() # measure checking time # This timer delays the starting of error check so we can react less frequently if the user is frequently # changing settings. From fad47856e49ac4c9e4052e5fb9f9c581335ebc30 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 3 Aug 2022 11:40:15 +0200 Subject: [PATCH 07/32] Rename _start_time to _check_start_time This better reflects what _start_time is and makes the code easier to read. _check_start_time is self documenting. The current comment next to _start_time is erroneous since _start_time is not "measuring the checking time" --- cura/Machines/MachineErrorChecker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/Machines/MachineErrorChecker.py b/cura/Machines/MachineErrorChecker.py index d2140cc49b..df335eddb4 100644 --- a/cura/Machines/MachineErrorChecker.py +++ b/cura/Machines/MachineErrorChecker.py @@ -43,7 +43,7 @@ class MachineErrorChecker(QObject): self._application = cura.CuraApplication.CuraApplication.getInstance() self._machine_manager = self._application.getMachineManager() - self._start_time = time.time() # measure checking time + self._check_start_time = time.time() # This timer delays the starting of error check so we can react less frequently if the user is frequently # changing settings. @@ -152,7 +152,7 @@ class MachineErrorChecker(QObject): self._stacks_and_keys_to_check.append((stack, key)) self._application.callLater(self._checkStack) - self._start_time = time.time() + self._check_start_time = time.time() Logger.log("d", "New error check scheduled.") def _checkStack(self) -> None: @@ -212,4 +212,4 @@ class MachineErrorChecker(QObject): self._check_in_progress = False self.needToWaitForResultChanged.emit() self.errorCheckFinished.emit() - Logger.log("i", "Error check finished, result = %s, time = %0.1fs", result, time.time() - self._start_time) + Logger.log("i", "Error check finished, result = %s, time = %0.1fs", result, time.time() - self._check_start_time) From a39fed1dc3c99650e701e434c78a4b14b2303574 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Thu, 4 Aug 2022 09:45:47 +0200 Subject: [PATCH 08/32] Use one line conditional assignment Use one line conditional assignement instead of if else block. The intent is now clearer and the code is easier to read. --- cura/Machines/MachineErrorChecker.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cura/Machines/MachineErrorChecker.py b/cura/Machines/MachineErrorChecker.py index 2cb333d157..022b01ae35 100644 --- a/cura/Machines/MachineErrorChecker.py +++ b/cura/Machines/MachineErrorChecker.py @@ -204,10 +204,7 @@ class MachineErrorChecker(QObject): self._has_errors = result self.hasErrorUpdated.emit() self._machine_manager.stacksValidationChanged.emit() - if keys_to_recheck is None: - self._keys_to_check = set() - else: - self._keys_to_check = keys_to_recheck + self._keys_to_check = keys_to_recheck if keys_to_recheck else set() self._need_to_check = False self._check_in_progress = False self.needToWaitForResultChanged.emit() From 9ac7eb4da7d2859f430792b4dca7fa24caa63e2f Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Fri, 5 Aug 2022 10:37:02 +0200 Subject: [PATCH 09/32] Use enumerate to iterate over self._types This is more pythonic. The comparaison in the if block below the for loop now becomes clearer. --- cura/LayerPolygon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 2c3b432b1d..c13bef85de 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -39,10 +39,10 @@ class LayerPolygon: self._extruder = extruder self._types = line_types - for i in range(len(self._types)): - if self._types[i] >= self.__number_of_types: # Got faulty line data from the engine. - Logger.log("w", "Found an unknown line type: %s", i) - self._types[i] = self.NoneType + for idx, line_type in enumerate(self._types): + if line_type >= self.__number_of_types: # Got faulty line data from the engine. + Logger.log("w", "Found an unknown line type: %s", line_type) + self._types[idx] = self.NoneType self._data = data self._line_widths = line_widths self._line_thicknesses = line_thicknesses From 1c3479c9fc63ae7fc23726cd24dd42e458b06237 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Fri, 5 Aug 2022 11:08:20 +0200 Subject: [PATCH 10/32] Refactor check for unknown line types Using .where() clarifies the intent. --- cura/LayerPolygon.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index c13bef85de..01970bd54f 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -39,9 +39,11 @@ class LayerPolygon: self._extruder = extruder self._types = line_types - for idx, line_type in enumerate(self._types): - if line_type >= self.__number_of_types: # Got faulty line data from the engine. - Logger.log("w", "Found an unknown line type: %s", line_type) + unknown_types = np.where(self_types >= self_number_of_types) + if unknown_types: + # Got faulty line data from the engine. + for idx in unknown_types: + Logger.log("w", "Found an unknown line type at: %s", idx) self._types[idx] = self.NoneType self._data = data self._line_widths = line_widths From 50a0ffa2573ee4a957168cf7bb92e44ca9a6f760 Mon Sep 17 00:00:00 2001 From: Michel Wilhelm Date: Sat, 13 Aug 2022 16:07:56 -0300 Subject: [PATCH 11/32] chore: definition file is out of the pattern --- .../definitions/renkforce_rf100_xl.def.json | 122 +++++++++--------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/resources/definitions/renkforce_rf100_xl.def.json b/resources/definitions/renkforce_rf100_xl.def.json index f0e8644ae4..a8cad09618 100644 --- a/resources/definitions/renkforce_rf100_xl.def.json +++ b/resources/definitions/renkforce_rf100_xl.def.json @@ -7,66 +7,64 @@ "file_formats": "text/x-gcode", "manufacturer": "Renkforce", "visible": true, - "machine_extruder_trains": - { + "machine_extruder_trains": { "0": "renkforce_rf100_xl_extruder_0" } }, - "overrides": { "adhesion_type": { "default_value": "skirt" }, "bottom_thickness": { - "value": "0.6" + "value": 0.6 }, "brim_width": { - "value": "3.0" + "value": 3.0 }, "cool_fan_enabled": { - "value": "True" + "value": true }, "cool_fan_full_at_height": { - "value": "0.5" + "value": 0.5 }, "cool_fan_speed_max": { - "value": "100.0" + "value": 100.0 }, "cool_fan_speed_min": { - "value": "100.0" + "value": 100.0 }, "cool_lift_head": { - "value": "True" + "value": true }, "cool_min_layer_time": { - "value": "1.0" + "value": 1.0 }, "cool_min_speed": { - "value": "5.0" + "value": 5.0 }, "infill_before_walls": { - "value": "True" + "value": true }, "infill_line_width": { - "value": "0.6" + "value": 0.6 }, "infill_overlap": { - "value": "15.0" + "value": 15.0 }, "infill_sparse_density": { - "value": "26.0" + "value": 26.0 }, "ironing_enabled": { - "value": "True" + "value": true }, "layer_0_z_overlap": { - "value": "0.11" + "value": 0.11 }, "layer_height_0": { - "value": "0.3" + "value": 0.3 }, "machine_depth": { - "value": "200" + "value": 200 }, "machine_end_gcode": { "default_value": ";End GCode\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-4 F300 ;move Z up a bit and retract filament even more\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG0 Z{machine_height} F1800 ;move the platform all the way down\nG28 X0 Y0 F1800 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning\nM117 Done" @@ -75,10 +73,10 @@ "default_value": "RepRap (Marlin/Sprinter)" }, "machine_heated_bed": { - "default_value": "true" + "default_value": true }, "machine_height": { - "value": "200" + "value": 200 }, "machine_name": { "default_value": "Renkforce RF100 XL" @@ -87,112 +85,112 @@ "default_value": ";Sliced at: {day} {date} {time}\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG1 Z5.0 F1800 ;move Z to 5mm\nG28 X0 Y0 F1800 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstop\nG92 E0 ;zero the extruded length\nG1 F200 E6.0 ;extrude 6.0mm of feed stock to build pressure\nG1 Z5.0 F300 ;move the platform down 5mm\nG92 E0 ;zero the extruded length again\nG1 F1800\n;Put printing message on LCD screen\nM117 Printing..." }, "machine_width": { - "value": "200" + "value": 200 }, "material_bed_temperature": { - "value": "70" + "value": 70 }, "material_print_temperature": { - "value": "210.0" + "value": 210.0 }, "ooze_shield_enabled": { - "value": "True" + "value": true }, "raft_airgap": { - "value": "0.33" + "value": 0.33 }, "raft_base_line_spacing": { - "value": "3.0" + "value": 3.0 }, "raft_base_line_width": { - "value": "1.0" + "value": 1.0 }, "raft_base_thickness": { - "value": "0.3" + "value": 0.3 }, "raft_interface_line_spacing": { - "value": "3.0" + "value": 3.0 }, "raft_interface_line_width": { - "value": "0.4" + "value": 0.4 }, "raft_interface_thickness": { - "value": "0.27" + "value": 0.27 }, "raft_margin": { - "value": "6.0" + "value": 6.0 }, "raft_speed": { - "value": "20.0" + "value": 20.0 }, "raft_surface_layers": { - "value": "2" + "value": 2 }, "raft_surface_line_spacing": { - "value": "0.4" + "value": 0.4 }, "raft_surface_line_width": { - "value": "0.4" + "value": 0.4 }, "raft_surface_thickness": { - "value": "0.1" + "value": 0.1 }, "retraction_amount": { - "value": "5.0" + "value": 5.0 }, "retraction_combing": { - "value": "'all'" + "value": "all" }, "retraction_enable": { - "value": "True" + "value": true }, "retraction_min_travel": { - "value": "1.5" + "value": 1.5 }, "skin_overlap": { - "value": "15.0" + "value": 15.0 }, "skirt_brim_minimal_length": { - "value": "150.0" + "value": 150.0 }, "skirt_gap": { - "value": "3.0" + "value": 3.0 }, "skirt_line_count": { - "value": "3" + "value": 3 }, "speed_infill": { - "value": "50.0" + "value": 50.0 }, "speed_layer_0": { - "value": "15.0" + "value": 15.0 }, "speed_print": { - "value": "50.0" + "value": 50.0 }, "speed_topbottom": { - "value": "30.0" + "value": 30.0 }, "speed_travel": { - "value": "50.0" + "value": 50.0 }, "speed_wall_0": { - "value": "25.0" + "value": 25.0 }, "speed_wall_x": { - "value": "35.0" + "value": 35.0 }, "support_angle": { - "value": "60.0" + "value": 60.0 }, "support_enable": { - "value": "False" + "value": false }, "support_infill_rate": { "value": "15 if support_enable and support_structure == 'normal' else 0 if support_enable and support_structure == 'tree' else 15" }, "support_line_width": { - "value": "0.6" + "value": 0.6 }, "support_pattern": { "default_value": "lines" @@ -201,16 +199,16 @@ "default_value": "everywhere" }, "support_xy_distance": { - "value": "0.7" + "value": 0.7 }, "support_z_distance": { - "value": "0.35" + "value": 0.35 }, "top_bottom_thickness": { - "value": "0.8" + "value": 0.8 }, "wall_thickness": { - "value": "0.8" + "value": 0.8 } } -} +} \ No newline at end of file From 9f3a1cfe0ae3810e41ddba09f2ec836f12b2f6ec Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Tue, 23 Aug 2022 19:53:50 +0200 Subject: [PATCH 12/32] Use f-string and info method with Logger Use f-string and info method for Logger instead of "Old Style" string formating. --- cura/Machines/MachineErrorChecker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cura/Machines/MachineErrorChecker.py b/cura/Machines/MachineErrorChecker.py index df335eddb4..a770e63785 100644 --- a/cura/Machines/MachineErrorChecker.py +++ b/cura/Machines/MachineErrorChecker.py @@ -212,4 +212,5 @@ class MachineErrorChecker(QObject): self._check_in_progress = False self.needToWaitForResultChanged.emit() self.errorCheckFinished.emit() - Logger.log("i", "Error check finished, result = %s, time = %0.1fs", result, time.time() - self._check_start_time) + execution_time = time.time() - self._check_start_time + Logger.info(f"Error check finished, result = {result}, time = {execution_time:.2f}s") From e9172b10af9e8132ab81c1841b3d0262e489f17c Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Tue, 23 Aug 2022 20:01:47 +0200 Subject: [PATCH 13/32] Use f-string and warn method with Logger Use f-string and warn method for Logger instead of "Old Style" string formatting. Co-authored-by: Jelle Spijker --- cura/LayerPolygon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 01970bd54f..91a26b2500 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -43,7 +43,7 @@ class LayerPolygon: if unknown_types: # Got faulty line data from the engine. for idx in unknown_types: - Logger.log("w", "Found an unknown line type at: %s", idx) + Logger.warn(f"Found an unknown line type at: {idx}") self._types[idx] = self.NoneType self._data = data self._line_widths = line_widths From 8bb2671a28aaf213ba3ee98f967a0c26b336016e Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 2 Sep 2022 15:35:59 +0200 Subject: [PATCH 14/32] Don't show abstract machines in configuration page So they cannot be removed through the preferences CURA-9289 --- cura/Machines/Models/GlobalStacksModel.py | 22 ++++++++++++++++++++++ resources/qml/Preferences/MachinesPage.qml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cura/Machines/Models/GlobalStacksModel.py b/cura/Machines/Models/GlobalStacksModel.py index 8f13d34ccf..69f2ec3822 100644 --- a/cura/Machines/Models/GlobalStacksModel.py +++ b/cura/Machines/Models/GlobalStacksModel.py @@ -44,6 +44,7 @@ class GlobalStacksModel(ListModel): self._filter_connection_type = None # type: Optional[ConnectionType] self._filter_online_only = False self._filter_capabilities: List[str] = [] # Required capabilities that all listed printers must have. + self._filter_abstract_machines: Optional[bool] = None # Listen to changes CuraContainerRegistry.getInstance().containerAdded.connect(self._onContainerChanged) @@ -54,6 +55,7 @@ class GlobalStacksModel(ListModel): filterConnectionTypeChanged = pyqtSignal() filterCapabilitiesChanged = pyqtSignal() filterOnlineOnlyChanged = pyqtSignal() + filterAbstractMachinesChanged = pyqtSignal() def setFilterConnectionType(self, new_filter: Optional[ConnectionType]) -> None: if self._filter_connection_type != new_filter: @@ -98,6 +100,22 @@ class GlobalStacksModel(ListModel): """ return self._filter_capabilities + def setFilterAbstractMachines(self, new_filter: Optional[bool]) -> None: + if self._filter_abstract_machines != new_filter: + self._filter_abstract_machines = new_filter + self.filterAbstractMachinesChanged.emit() + + @pyqtProperty(bool, fset = setFilterAbstractMachines, notify = filterAbstractMachinesChanged) + def filterAbstractMachines(self) -> Optional[bool]: + """ + Weather we include abstract printers, non-abstract printers or both + + if this is set to None both abstract and non-abstract printers will be included in the list + set to True will only include abstract printers + set to False will only inclde non-abstract printers + """ + return self._filter_abstract_machines + def _onContainerChanged(self, container) -> None: """Handler for container added/removed events from registry""" @@ -130,6 +148,10 @@ class GlobalStacksModel(ListModel): if self._filter_online_only and not is_online: continue + is_abstract_machine = parseBool(container_stack.getMetaDataEntry("is_abstract_machine", False)) + if self._filter_abstract_machines is not None and self._filter_abstract_machines is not is_abstract_machine: + continue + capabilities = set(container_stack.getMetaDataEntry(META_CAPABILITIES, "").split(",")) if set(self._filter_capabilities) - capabilities: # Not all required capabilities are met. continue diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index c77545bc03..258b45292e 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -17,7 +17,7 @@ UM.ManagementPage title: catalog.i18nc("@title:tab", "Printers") detailsPlaneCaption: base.currentItem && base.currentItem.name ? base.currentItem.name : "" - model: Cura.GlobalStacksModel { } + model: Cura.GlobalStacksModel { filterAbstractMachines: false } sectionRole: "discoverySource" From 27fc11b8404ed84a9b95b2fdddab239d2cd3c93b Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 2 Sep 2022 15:48:22 +0200 Subject: [PATCH 15/32] Prevent abstract machines from being deleted in the config menu CURA-9277 --- cura/Machines/Models/GlobalStacksModel.py | 3 ++- resources/qml/Preferences/MachinesPage.qml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cura/Machines/Models/GlobalStacksModel.py b/cura/Machines/Models/GlobalStacksModel.py index 69f2ec3822..62b470daee 100644 --- a/cura/Machines/Models/GlobalStacksModel.py +++ b/cura/Machines/Models/GlobalStacksModel.py @@ -172,6 +172,7 @@ class GlobalStacksModel(ListModel): "metadata": container_stack.getMetaData().copy(), "discoverySource": section_name, "removalWarning": removal_warning, - "isOnline": is_online}) + "isOnline": is_online, + "isAbstractMachine": is_abstract_machine}) items.sort(key=lambda i: (not i["hasRemoteConnection"], i["name"])) self.setItems(items) diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index 258b45292e..16f144cf85 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -17,7 +17,7 @@ UM.ManagementPage title: catalog.i18nc("@title:tab", "Printers") detailsPlaneCaption: base.currentItem && base.currentItem.name ? base.currentItem.name : "" - model: Cura.GlobalStacksModel { filterAbstractMachines: false } + model: Cura.GlobalStacksModel { } sectionRole: "discoverySource" @@ -139,7 +139,7 @@ UM.ManagementPage Cura.MenuItem { text: catalog.i18nc("@action:button", "Remove") - enabled: base.currentItem != null && model.count > 1 + enabled: base.currentItem != null && model.count > 1 && !base.currentItem.isAbstractMachine onTriggered: confirmDialog.open() } Cura.MenuItem From 6d0acbe0952408cbe4c08961127a99ee7d8be59e Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 2 Sep 2022 16:28:10 +0200 Subject: [PATCH 16/32] Always show correct number of connected machines Calculate number of connected machines _after_ the abstract machine its connected is removed from the list CURA-9277 --- cura/Machines/Models/MachineListModel.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/Machines/Models/MachineListModel.py b/cura/Machines/Models/MachineListModel.py index 55db072180..d3ae8f7acb 100644 --- a/cura/Machines/Models/MachineListModel.py +++ b/cura/Machines/Models/MachineListModel.py @@ -89,12 +89,13 @@ class MachineListModel(ListModel): machines_manager = CuraApplication.getInstance().getMachineManager() online_machine_stacks = machines_manager.getMachinesWithDefinition(definition_id, online_only = True) - # Create a list item for abstract machine - self.addItem(abstract_machine, len(online_machine_stacks)) other_machine_stacks.remove(abstract_machine) if abstract_machine in online_machine_stacks: online_machine_stacks.remove(abstract_machine) + # Create a list item for abstract machine + self.addItem(abstract_machine, len(online_machine_stacks)) + # Create list of machines that are children of the abstract machine for stack in online_machine_stacks: if self._show_cloud_printers: From ce6d7d72bd0194e3146e153450ce7d3fa7045d30 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 5 Sep 2022 11:14:13 +0200 Subject: [PATCH 17/32] Fix calculating number of removed devices CURA-9277 --- .../UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py b/plugins/UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py index c875eb183a..caed6ddf91 100644 --- a/plugins/UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py +++ b/plugins/UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py @@ -31,7 +31,7 @@ class RemovedPrintersMessage(Message): super().__init__(title=self.i18n_catalog.i18ncp("info:status", "A cloud connection is not available for a printer", "A cloud connection is not available for some printers", - len(self.removed_devices)), + len(self._removed_devices)), message_type=Message.MessageType.WARNING, text = message_text) From 48b8585ce669a1e52bb21968a727acc8268cae3e Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 5 Sep 2022 11:44:29 +0200 Subject: [PATCH 18/32] Make sure online printers are always shown in the correct tab CURA-9277 --- cura/Machines/Models/MachineListModel.py | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/cura/Machines/Models/MachineListModel.py b/cura/Machines/Models/MachineListModel.py index d3ae8f7acb..ead1061a05 100644 --- a/cura/Machines/Models/MachineListModel.py +++ b/cura/Machines/Models/MachineListModel.py @@ -89,17 +89,27 @@ class MachineListModel(ListModel): machines_manager = CuraApplication.getInstance().getMachineManager() online_machine_stacks = machines_manager.getMachinesWithDefinition(definition_id, online_only = True) + def online_machines_has_connection_filter(machine_stack): + # This is required because machines loaded from projects have the is_online="True" but no connection type. + # We want to display them the same way as unconnected printers in this case. + has_connection = False + for connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]: + has_connection |= connection_type in machine_stack.configuredConnectionTypes + return has_connection + + online_machine_stacks = list(filter(online_machines_has_connection_filter, online_machine_stacks)) + other_machine_stacks.remove(abstract_machine) if abstract_machine in online_machine_stacks: online_machine_stacks.remove(abstract_machine) # Create a list item for abstract machine - self.addItem(abstract_machine, len(online_machine_stacks)) + self.addItem(abstract_machine, True, len(online_machine_stacks)) # Create list of machines that are children of the abstract machine for stack in online_machine_stacks: if self._show_cloud_printers: - self.addItem(stack) + self.addItem(stack, True) # Remove this machine from the other stack list if stack in other_machine_stacks: other_machine_stacks.remove(stack) @@ -119,25 +129,18 @@ class MachineListModel(ListModel): }) for stack in other_machine_stacks: - self.addItem(stack) + self.addItem(stack, False) - def addItem(self, container_stack: ContainerStack, machine_count: int = 0) -> None: + def addItem(self, container_stack: ContainerStack, is_online, machine_count: int = 0) -> None: if parseBool(container_stack.getMetaDataEntry("hidden", False)): return - # This is required because machines loaded from projects have the is_online="True" but no connection type. - # We want to display them the same way as unconnected printers in this case. - has_connection = False - has_connection |= parseBool(container_stack.getMetaDataEntry("is_abstract_machine", False)) - for connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]: - has_connection |= connection_type in container_stack.configuredConnectionTypes - self.appendItem({ "componentType": "MACHINE", "name": container_stack.getName(), "id": container_stack.getId(), "metadata": container_stack.getMetaData().copy(), - "isOnline": parseBool(container_stack.getMetaDataEntry("is_online", False)) and has_connection, + "isOnline": is_online, "isAbstractMachine": parseBool(container_stack.getMetaDataEntry("is_abstract_machine", False)), "machineCount": machine_count, }) From b6a461bd08d0e5f5a471586e1e1212e0187439f6 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 5 Sep 2022 17:32:23 +0200 Subject: [PATCH 19/32] Revert "Prevent abstract machines from being deleted in the config menu" This reverts commit 27fc11b8404ed84a9b95b2fdddab239d2cd3c93b. --- cura/Machines/Models/GlobalStacksModel.py | 3 +-- resources/qml/Preferences/MachinesPage.qml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cura/Machines/Models/GlobalStacksModel.py b/cura/Machines/Models/GlobalStacksModel.py index 62b470daee..69f2ec3822 100644 --- a/cura/Machines/Models/GlobalStacksModel.py +++ b/cura/Machines/Models/GlobalStacksModel.py @@ -172,7 +172,6 @@ class GlobalStacksModel(ListModel): "metadata": container_stack.getMetaData().copy(), "discoverySource": section_name, "removalWarning": removal_warning, - "isOnline": is_online, - "isAbstractMachine": is_abstract_machine}) + "isOnline": is_online}) items.sort(key=lambda i: (not i["hasRemoteConnection"], i["name"])) self.setItems(items) diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index 16f144cf85..258b45292e 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -17,7 +17,7 @@ UM.ManagementPage title: catalog.i18nc("@title:tab", "Printers") detailsPlaneCaption: base.currentItem && base.currentItem.name ? base.currentItem.name : "" - model: Cura.GlobalStacksModel { } + model: Cura.GlobalStacksModel { filterAbstractMachines: false } sectionRole: "discoverySource" @@ -139,7 +139,7 @@ UM.ManagementPage Cura.MenuItem { text: catalog.i18nc("@action:button", "Remove") - enabled: base.currentItem != null && model.count > 1 && !base.currentItem.isAbstractMachine + enabled: base.currentItem != null && model.count > 1 onTriggered: confirmDialog.open() } Cura.MenuItem From f30fd519b74351bf090310e4358a2d54659b58db Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Mon, 5 Sep 2022 19:37:34 +0200 Subject: [PATCH 20/32] PrintInformation.py Use warning method with Logger Use f-string and warning method with Logger instead of "Old Style string formatting --- cura/UI/PrintInformation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/UI/PrintInformation.py b/cura/UI/PrintInformation.py index 2b8e13b09f..e16037c603 100644 --- a/cura/UI/PrintInformation.py +++ b/cura/UI/PrintInformation.py @@ -186,7 +186,7 @@ class PrintInformation(QObject): if time != time: # Check for NaN. Engine can sometimes give us weird values. duration.setDuration(0) - Logger.log("w", "Received NaN for print duration message") + Logger.warning("Received NaN for print duration message") continue total_estimated_time += time @@ -368,7 +368,7 @@ class PrintInformation(QObject): mime_type = MimeTypeDatabase.getMimeTypeForFile(name) data = mime_type.stripExtension(name) except MimeTypeNotFoundError: - Logger.log("w", "Unsupported Mime Type Database file extension %s", name) + Logger.warning(f"Unsupported Mime Type Database file extension {name}") if data is not None and check_name is not None: self._base_name = data From bc7db5ffa7a142e578d9f61344e9c747d4e2730e Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Tue, 6 Sep 2022 12:58:57 +0200 Subject: [PATCH 21/32] Always run --- .github/workflows/conan-package-create.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index f753b76e71..4af608b7ac 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -53,7 +53,6 @@ env: jobs: conan-package-create: - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} runs-on: ${{ inputs.runs_on }} steps: From 7eb47d450fe8e00ca9c910311cb3211a8fd06da7 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Tue, 6 Sep 2022 13:00:30 +0200 Subject: [PATCH 22/32] Also use gcc12 for the unittest in case curaengine isn't build --- .github/workflows/unit-test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 20ea83bdb1..eb2edc09d8 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -103,7 +103,18 @@ jobs: - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} - run: sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev -y + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt update + sudo apt upgrade + sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + + - name: Install GCC-12 on ubuntu-22.04 + if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }} + run: | + sudo apt install g++-12 gcc-12 -y + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 - name: Get Conan configuration run: conan config install https://github.com/Ultimaker/conan-config.git From 6253fb2fdc1340a0c457771c7eb6b44f081a5215 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Tue, 6 Sep 2022 13:19:50 +0200 Subject: [PATCH 23/32] Add typing to function argument CURA-9277 Co-authored-by: Joey de l'Arago --- cura/Machines/Models/MachineListModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/MachineListModel.py b/cura/Machines/Models/MachineListModel.py index ead1061a05..8750da6305 100644 --- a/cura/Machines/Models/MachineListModel.py +++ b/cura/Machines/Models/MachineListModel.py @@ -131,7 +131,7 @@ class MachineListModel(ListModel): for stack in other_machine_stacks: self.addItem(stack, False) - def addItem(self, container_stack: ContainerStack, is_online, machine_count: int = 0) -> None: + def addItem(self, container_stack: ContainerStack, is_online: bool, machine_count: int = 0) -> None: if parseBool(container_stack.getMetaDataEntry("hidden", False)): return From 370d0bcf03707db7d7ae6b7edfb264b1a0fbfac9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 6 Sep 2022 13:43:14 +0200 Subject: [PATCH 24/32] Add extra BOM numbers to UMs3 and UMs5 --- resources/definitions/ultimaker_s3.def.json | 2 +- resources/definitions/ultimaker_s5.def.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/ultimaker_s3.def.json b/resources/definitions/ultimaker_s3.def.json index 5d1464396f..4bcc9cf8dd 100644 --- a/resources/definitions/ultimaker_s3.def.json +++ b/resources/definitions/ultimaker_s3.def.json @@ -35,7 +35,7 @@ "update_url": "https://ultimaker.com/firmware?utm_source=cura&utm_medium=software&utm_campaign=fw-update" }, "bom_numbers": [ - 213482 + 213482, 213483 ] }, diff --git a/resources/definitions/ultimaker_s5.def.json b/resources/definitions/ultimaker_s5.def.json index 314da546de..5d4c2616c2 100644 --- a/resources/definitions/ultimaker_s5.def.json +++ b/resources/definitions/ultimaker_s5.def.json @@ -36,7 +36,7 @@ "update_url": "https://ultimaker.com/firmware?utm_source=cura&utm_medium=software&utm_campaign=fw-update" }, "bom_numbers": [ - 9051, 214475 + 9051, 214475, 214476 ] }, From 148263a06828e6b5669854a6f0feacba7d4bc2ce Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 6 Sep 2022 13:52:10 +0200 Subject: [PATCH 25/32] Move `hasNetworkedConnection` to `GlobalStack` From code review CURA-9277 Co-authored-by: Joey --- cura/Machines/Models/MachineListModel.py | 10 +--------- cura/Settings/GlobalStack.py | 6 ++++++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/cura/Machines/Models/MachineListModel.py b/cura/Machines/Models/MachineListModel.py index 8750da6305..919d593200 100644 --- a/cura/Machines/Models/MachineListModel.py +++ b/cura/Machines/Models/MachineListModel.py @@ -89,15 +89,7 @@ class MachineListModel(ListModel): machines_manager = CuraApplication.getInstance().getMachineManager() online_machine_stacks = machines_manager.getMachinesWithDefinition(definition_id, online_only = True) - def online_machines_has_connection_filter(machine_stack): - # This is required because machines loaded from projects have the is_online="True" but no connection type. - # We want to display them the same way as unconnected printers in this case. - has_connection = False - for connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]: - has_connection |= connection_type in machine_stack.configuredConnectionTypes - return has_connection - - online_machine_stacks = list(filter(online_machines_has_connection_filter, online_machine_stacks)) + online_machine_stacks = list(filter(lambda machine: machine.hasNetworkedConnection(), online_machine_stacks)) other_machine_stacks.remove(abstract_machine) if abstract_machine in online_machine_stacks: diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py index b94ca45763..041bd19d3a 100755 --- a/cura/Settings/GlobalStack.py +++ b/cura/Settings/GlobalStack.py @@ -347,6 +347,12 @@ class GlobalStack(CuraContainerStack): nameChanged = pyqtSignal() name = pyqtProperty(str, fget=getName, fset=setName, notify=nameChanged) + def hasNetworkedConnection(self) -> bool: + has_connection = False + for connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]: + has_connection |= connection_type in self.configuredConnectionTypes + return has_connection + ## private: global_stack_mime = MimeType( name = "application/x-cura-globalstack", From f2edc1ac491e1725a8c2f790cfb9b8b246a47040 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 6 Sep 2022 13:56:24 +0200 Subject: [PATCH 26/32] Fix typo --- .../UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py b/plugins/UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py index c875eb183a..caed6ddf91 100644 --- a/plugins/UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py +++ b/plugins/UM3NetworkPrinting/src/Messages/RemovedPrintersMessage.py @@ -31,7 +31,7 @@ class RemovedPrintersMessage(Message): super().__init__(title=self.i18n_catalog.i18ncp("info:status", "A cloud connection is not available for a printer", "A cloud connection is not available for some printers", - len(self.removed_devices)), + len(self._removed_devices)), message_type=Message.MessageType.WARNING, text = message_text) From 6c0d76807efbb25b70cc09be12053df3cc5c8189 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 6 Sep 2022 14:43:38 +0200 Subject: [PATCH 27/32] Add trycatch around whatsnew & changelog pages Fixes CURA-4DX (sentry crash) --- cura/UI/WhatsNewPagesModel.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/cura/UI/WhatsNewPagesModel.py b/cura/UI/WhatsNewPagesModel.py index 4fb7802924..1faf9572c7 100644 --- a/cura/UI/WhatsNewPagesModel.py +++ b/cura/UI/WhatsNewPagesModel.py @@ -62,15 +62,21 @@ class WhatsNewPagesModel(WelcomePagesModel): def initialize(self) -> None: self._pages = [] - self._pages.append({"id": "whats_new", - "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"), - "next_page_button_text": self._catalog.i18nc("@action:button", "Skip"), - "next_page_id": "changelog" - }) - self._pages.append({"id": "changelog", - "page_url": self._getBuiltinWelcomePagePath("ChangelogContent.qml"), - "next_page_button_text": self._catalog.i18nc("@action:button", "Close"), - }) + try: + self._pages.append({"id": "whats_new", + "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"), + "next_page_button_text": self._catalog.i18nc("@action:button", "Skip"), + "next_page_id": "changelog" + }) + except FileNotFoundError: + Logger.warning("Unable to find what's new page") + try: + self._pages.append({"id": "changelog", + "page_url": self._getBuiltinWelcomePagePath("ChangelogContent.qml"), + "next_page_button_text": self._catalog.i18nc("@action:button", "Close"), + }) + except FileNotFoundError: + Logger.warning("Unable to find changelog page") self.setItems(self._pages) images, max_image = WhatsNewPagesModel._collectOrdinalFiles(Resources.Images, WhatsNewPagesModel.image_formats) From 2f1325259c5044692172d23b75dc1eb75ebe1e8b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 6 Sep 2022 14:47:32 +0200 Subject: [PATCH 28/32] Fix 3mf workspace reader crashing on certain invalid files CURA-4DP (Sentry crash) --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index c8f7bc8abd..86be2f0380 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -664,10 +664,22 @@ class ThreeMFWorkspaceReader(WorkspaceReader): cura_file_names = [name for name in archive.namelist() if name.startswith("Cura/")] - # Create a shadow copy of the preferences (we don't want all of the preferences, but we do want to re-use its + # Create a shadow copy of the preferences (We don't want all of the preferences, but we do want to re-use its # parsing code. temp_preferences = Preferences() - serialized = archive.open("Cura/preferences.cfg").read().decode("utf-8") + try: + serialized = archive.open("Cura/preferences.cfg").read().decode("utf-8") + except KeyError: + # If there is no preferences file, it's not a workspace, so notify user of failure. + Logger.log("w", "File %s is not a valid workspace.", file_name) + message = Message(i18n_catalog.i18nc("@info:error Don't translate the XML tags or !", + "Project file {0} is corrupt: {1}.", + file_name, str(e)), + title=i18n_catalog.i18nc("@info:title", "Can't Open Project File"), + message_type=Message.MessageType.ERROR) + message.show() + self.setWorkspaceName("") + return [], {} temp_preferences.deserialize(serialized) # Copy a number of settings from the temp preferences to the global From cc403a9a49f45cfee12243a4c66975c22076c7d2 Mon Sep 17 00:00:00 2001 From: jelle Spijker Date: Tue, 6 Sep 2022 15:38:31 +0200 Subject: [PATCH 29/32] Bump up patch version on release branch --- .github/workflows/conan-recipe-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 3e86c880a6..701efcc658 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -157,8 +157,8 @@ jobs: channel_metadata = f"{channel}_{no_commits}" # FIXME: for when we create a new release branch if latest_branch_version.prerelease == "": - bump_up_minor = int(latest_branch_version.minor) + 1 - actual_version = f"{latest_branch_version.major}.{bump_up_minor}.{latest_branch_version.patch}-alpha+{buildmetadata}{channel_metadata}" + bump_up_patch = int(latest_branch_version.patch) + 1 + actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{bump_up_patch}-alpha+{buildmetadata}{channel_metadata}" else: actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.prerelease.lower()}+{buildmetadata}{channel_metadata}" else: From 3aa2ae27bbed85a2abe309f8f862ba31674e0d98 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 6 Sep 2022 16:20:31 +0200 Subject: [PATCH 30/32] Remove global settings from extruder profiles --- .../dagoma/dagoma_discoeasy200_bicolor_pla_fast.inst.cfg | 1 - .../dagoma/dagoma_discoeasy200_bicolor_pla_fine.inst.cfg | 1 - .../dagoma/dagoma_discoeasy200_bicolor_pla_standard.inst.cfg | 1 - resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg | 1 - resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg | 1 - .../quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg | 1 - .../dagoma/dagoma_discoultimate_bicolor_pla_fast.inst.cfg | 1 - .../dagoma/dagoma_discoultimate_bicolor_pla_fine.inst.cfg | 1 - .../dagoma/dagoma_discoultimate_bicolor_pla_standard.inst.cfg | 1 - resources/quality/dagoma/dagoma_discoultimate_pla_fast.inst.cfg | 1 - resources/quality/dagoma/dagoma_discoultimate_pla_fine.inst.cfg | 1 - .../quality/dagoma/dagoma_discoultimate_pla_standard.inst.cfg | 1 - resources/quality/dagoma/dagoma_magis_pla_fast.inst.cfg | 1 - resources/quality/dagoma/dagoma_magis_pla_fine.inst.cfg | 1 - resources/quality/dagoma/dagoma_magis_pla_standard.inst.cfg | 1 - resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg | 1 - resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg | 1 - resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg | 1 - resources/quality/fabtotum/fabtotum_abs_fast.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_abs_high.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_abs_normal.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_nylon_fast.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_nylon_high.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_nylon_normal.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_pla_fast.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_pla_high.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_pla_normal.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_tpu_fast.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_tpu_high.inst.cfg | 2 -- resources/quality/fabtotum/fabtotum_tpu_normal.inst.cfg | 2 -- resources/quality/fabxpro/fabxpro_abs_draft.inst.cfg | 1 - 31 files changed, 43 deletions(-) diff --git a/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_fast.inst.cfg index 63f9920bf3..1073729905 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_fast.inst.cfg @@ -11,7 +11,6 @@ weight = -2 material = chromatik_pla [values] -layer_height = 0.2 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_fine.inst.cfg index c9828cca5a..e3a5c6eac9 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_fine.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = chromatik_pla [values] -layer_height = 0.1 line_width = =machine_nozzle_size * 0.875 speed_print = 35 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_standard.inst.cfg index 1ac89bfcb6..e1f8934019 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_bicolor_pla_standard.inst.cfg @@ -11,7 +11,6 @@ weight = -1 material = chromatik_pla [values] -layer_height = 0.15 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg index f739b02303..f8635d2cc7 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg @@ -11,7 +11,6 @@ weight = -2 material = chromatik_pla [values] -layer_height = 0.2 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg index 3b25824cbc..6c0597409c 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = chromatik_pla [values] -layer_height = 0.1 line_width = =machine_nozzle_size * 0.875 speed_print = 35 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg index 913af36eb3..5254504da5 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg @@ -11,7 +11,6 @@ weight = -1 material = chromatik_pla [values] -layer_height = 0.15 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_fast.inst.cfg index 87c089438f..5e4467e5ed 100644 --- a/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_fast.inst.cfg @@ -11,7 +11,6 @@ weight = -2 material = chromatik_pla [values] -layer_height = 0.2 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_fine.inst.cfg index e927d2addf..d5d21af6e2 100644 --- a/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_fine.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = chromatik_pla [values] -layer_height = 0.1 line_width = =machine_nozzle_size * 0.875 speed_print = 35 diff --git a/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_standard.inst.cfg index ccbaa8f506..4163399ccc 100644 --- a/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoultimate_bicolor_pla_standard.inst.cfg @@ -11,7 +11,6 @@ weight = -1 material = chromatik_pla [values] -layer_height = 0.15 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_discoultimate_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoultimate_pla_fast.inst.cfg index 290d4be38d..90336926f8 100644 --- a/resources/quality/dagoma/dagoma_discoultimate_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoultimate_pla_fast.inst.cfg @@ -11,7 +11,6 @@ weight = -2 material = chromatik_pla [values] -layer_height = 0.2 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_discoultimate_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_discoultimate_pla_fine.inst.cfg index 3c0d4a70ca..4b70708d41 100644 --- a/resources/quality/dagoma/dagoma_discoultimate_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoultimate_pla_fine.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = chromatik_pla [values] -layer_height = 0.1 line_width = =machine_nozzle_size * 0.875 speed_print = 35 diff --git a/resources/quality/dagoma/dagoma_discoultimate_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_discoultimate_pla_standard.inst.cfg index d7c8fa3360..61b8bb8d2d 100644 --- a/resources/quality/dagoma/dagoma_discoultimate_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoultimate_pla_standard.inst.cfg @@ -11,7 +11,6 @@ weight = -1 material = chromatik_pla [values] -layer_height = 0.15 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_magis_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_magis_pla_fast.inst.cfg index be852a2446..3fc2e53381 100644 --- a/resources/quality/dagoma/dagoma_magis_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_magis_pla_fast.inst.cfg @@ -11,7 +11,6 @@ weight = -2 material = chromatik_pla [values] -layer_height = 0.2 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_magis_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_magis_pla_fine.inst.cfg index cf7f6f6545..ee7fec9712 100644 --- a/resources/quality/dagoma/dagoma_magis_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_magis_pla_fine.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = chromatik_pla [values] -layer_height = 0.1 line_width = =machine_nozzle_size * 0.875 speed_print = 30 diff --git a/resources/quality/dagoma/dagoma_magis_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_magis_pla_standard.inst.cfg index 0ad63679ec..6d5890a74c 100644 --- a/resources/quality/dagoma/dagoma_magis_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_magis_pla_standard.inst.cfg @@ -11,7 +11,6 @@ weight = -1 material = chromatik_pla [values] -layer_height = 0.15 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg index 6d08b2a27e..d1b723fe0a 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg @@ -11,7 +11,6 @@ weight = -2 material = chromatik_pla [values] -layer_height = 0.2 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg index 96d0a51d95..a57a833f5c 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = chromatik_pla [values] -layer_height = 0.1 line_width = =machine_nozzle_size * 0.875 speed_print = 30 diff --git a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg index f24ae61f71..c63ec93a63 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg @@ -11,7 +11,6 @@ weight = -1 material = chromatik_pla [values] -layer_height = 0.15 line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 5 diff --git a/resources/quality/fabtotum/fabtotum_abs_fast.inst.cfg b/resources/quality/fabtotum/fabtotum_abs_fast.inst.cfg index aa36a94cbd..641a52be30 100644 --- a/resources/quality/fabtotum/fabtotum_abs_fast.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_abs_fast.inst.cfg @@ -14,8 +14,6 @@ variant = Lite 0.4 mm [values] adhesion_type = raft speed_print = 80 -layer_height = 0.2 -layer_height_0 = 0.2 cool_fan_enabled = False cool_fan_full_at_height = 0.4 cool_fan_speed = 50 diff --git a/resources/quality/fabtotum/fabtotum_abs_high.inst.cfg b/resources/quality/fabtotum/fabtotum_abs_high.inst.cfg index 8afdd25424..a4e802f37a 100644 --- a/resources/quality/fabtotum/fabtotum_abs_high.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_abs_high.inst.cfg @@ -14,8 +14,6 @@ variant = Lite 0.4 mm [values] adhesion_type = raft speed_print = 45 -layer_height = 0.1 -layer_height_0 = 0.1 cool_fan_enabled = False cool_fan_full_at_height = 0.2 cool_fan_speed = 50 diff --git a/resources/quality/fabtotum/fabtotum_abs_normal.inst.cfg b/resources/quality/fabtotum/fabtotum_abs_normal.inst.cfg index 5b4501657f..99f8ec4e56 100644 --- a/resources/quality/fabtotum/fabtotum_abs_normal.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_abs_normal.inst.cfg @@ -14,8 +14,6 @@ variant = Lite 0.4 mm [values] adhesion_type = raft speed_print = 60 -layer_height = 0.15 -layer_height_0 = 0.15 cool_fan_enabled = False cool_fan_full_at_height = 0.3 cool_fan_speed = 50 diff --git a/resources/quality/fabtotum/fabtotum_nylon_fast.inst.cfg b/resources/quality/fabtotum/fabtotum_nylon_fast.inst.cfg index a2f97e6fdc..9a61677c9d 100644 --- a/resources/quality/fabtotum/fabtotum_nylon_fast.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_nylon_fast.inst.cfg @@ -23,8 +23,6 @@ cool_min_layer_time = 5 cool_min_speed = 0 infill_overlap = 15 infill_sparse_density = 24 -layer_height = 0.20 -layer_height_0 = 0.15 line_width = =machine_nozzle_size material_flow = 100 raft_airgap = 0.22 diff --git a/resources/quality/fabtotum/fabtotum_nylon_high.inst.cfg b/resources/quality/fabtotum/fabtotum_nylon_high.inst.cfg index 6d8ebac406..1d1eedf3f4 100644 --- a/resources/quality/fabtotum/fabtotum_nylon_high.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_nylon_high.inst.cfg @@ -23,8 +23,6 @@ cool_min_layer_time = 5 cool_min_speed = 0 infill_overlap = 15 infill_sparse_density = 24 -layer_height = 0.10 -layer_height_0 = 0.10 line_width = =machine_nozzle_size material_flow = 100 raft_airgap = 0.22 diff --git a/resources/quality/fabtotum/fabtotum_nylon_normal.inst.cfg b/resources/quality/fabtotum/fabtotum_nylon_normal.inst.cfg index b29dd370f5..4920f1750f 100644 --- a/resources/quality/fabtotum/fabtotum_nylon_normal.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_nylon_normal.inst.cfg @@ -23,8 +23,6 @@ cool_min_layer_time = 5 cool_min_speed = 0 infill_overlap = 15 infill_sparse_density = 24 -layer_height = 0.15 -layer_height_0 = 0.10 line_width = =machine_nozzle_size material_flow = 100 raft_airgap = 0.22 diff --git a/resources/quality/fabtotum/fabtotum_pla_fast.inst.cfg b/resources/quality/fabtotum/fabtotum_pla_fast.inst.cfg index 0df61d9b21..5247ca4719 100644 --- a/resources/quality/fabtotum/fabtotum_pla_fast.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_pla_fast.inst.cfg @@ -14,8 +14,6 @@ variant = Lite 0.4 mm [values] adhesion_type = skirt speed_print = 80 -layer_height = 0.2 -layer_height_0 = 0.2 cool_fan_enabled = True cool_fan_full_at_height = 0.4 cool_fan_speed = 100 diff --git a/resources/quality/fabtotum/fabtotum_pla_high.inst.cfg b/resources/quality/fabtotum/fabtotum_pla_high.inst.cfg index e20a86e503..20a2340870 100644 --- a/resources/quality/fabtotum/fabtotum_pla_high.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_pla_high.inst.cfg @@ -14,8 +14,6 @@ variant = Lite 0.4 mm [values] adhesion_type = skirt speed_print = 45 -layer_height = 0.1 -layer_height_0 = 0.1 cool_fan_enabled = True cool_fan_full_at_height = 0.2 cool_fan_speed = 100 diff --git a/resources/quality/fabtotum/fabtotum_pla_normal.inst.cfg b/resources/quality/fabtotum/fabtotum_pla_normal.inst.cfg index 70cb0d7f67..ea267e88ac 100644 --- a/resources/quality/fabtotum/fabtotum_pla_normal.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_pla_normal.inst.cfg @@ -14,8 +14,6 @@ variant = Lite 0.4 mm [values] adhesion_type = skirt speed_print = 60 -layer_height = 0.15 -layer_height_0 = 0.15 cool_fan_enabled = True cool_fan_full_at_height = 0.3 cool_fan_speed = 100 diff --git a/resources/quality/fabtotum/fabtotum_tpu_fast.inst.cfg b/resources/quality/fabtotum/fabtotum_tpu_fast.inst.cfg index cdd814e02d..ddad87e2d1 100644 --- a/resources/quality/fabtotum/fabtotum_tpu_fast.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_tpu_fast.inst.cfg @@ -14,8 +14,6 @@ weight = -1 [values] adhesion_type = skirt speed_print = 80 -layer_height = 0.2 -layer_height_0 = 0.2 cool_fan_enabled = True cool_fan_full_at_height = 0.4 cool_fan_speed = 100 diff --git a/resources/quality/fabtotum/fabtotum_tpu_high.inst.cfg b/resources/quality/fabtotum/fabtotum_tpu_high.inst.cfg index 1f287605ee..5db8f1172e 100644 --- a/resources/quality/fabtotum/fabtotum_tpu_high.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_tpu_high.inst.cfg @@ -13,8 +13,6 @@ weight = 1 [values] adhesion_type = skirt -layer_height = 0.1 -layer_height_0 = 0.1 cool_fan_enabled = True cool_fan_full_at_height = 0.2 cool_fan_speed = 100 diff --git a/resources/quality/fabtotum/fabtotum_tpu_normal.inst.cfg b/resources/quality/fabtotum/fabtotum_tpu_normal.inst.cfg index f146a41ef2..3f09c8ea16 100644 --- a/resources/quality/fabtotum/fabtotum_tpu_normal.inst.cfg +++ b/resources/quality/fabtotum/fabtotum_tpu_normal.inst.cfg @@ -14,8 +14,6 @@ weight = 0 [values] adhesion_type = skirt speed_print = 80 -layer_height = 0.15 -layer_height_0 = 0.15 cool_fan_enabled = True cool_fan_full_at_height = 0.3 cool_fan_speed = 100 diff --git a/resources/quality/fabxpro/fabxpro_abs_draft.inst.cfg b/resources/quality/fabxpro/fabxpro_abs_draft.inst.cfg index b944d37e6d..cf71e68d00 100644 --- a/resources/quality/fabxpro/fabxpro_abs_draft.inst.cfg +++ b/resources/quality/fabxpro/fabxpro_abs_draft.inst.cfg @@ -11,7 +11,6 @@ weight = -2 material = redd_abs global_quality = True - [values] layer_height = 0.3 layer_height_0 = 0.35 From 8f2dc5c6e064a9926d2afca1434e76744930d3b0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 6 Sep 2022 16:31:25 +0200 Subject: [PATCH 31/32] Fix mistake with abax printers They weren't using the machine specific settings. --- resources/definitions/abax_pri3.def.json | 1 + resources/definitions/abax_pri5.def.json | 1 + resources/quality/abax_pri3/apri3_pla_fast.inst.cfg | 1 - resources/quality/abax_pri3/apri3_pla_high.inst.cfg | 1 - resources/quality/abax_pri3/apri3_pla_normal.inst.cfg | 1 - resources/quality/abax_pri5/apri5_pla_fast.inst.cfg | 1 - resources/quality/abax_pri5/apri5_pla_high.inst.cfg | 1 - resources/quality/abax_pri5/apri5_pla_normal.inst.cfg | 1 - 8 files changed, 2 insertions(+), 6 deletions(-) diff --git a/resources/definitions/abax_pri3.def.json b/resources/definitions/abax_pri3.def.json index 914dc4d3e0..7f73bea678 100644 --- a/resources/definitions/abax_pri3.def.json +++ b/resources/definitions/abax_pri3.def.json @@ -7,6 +7,7 @@ "author": "Abax 3D Technologies", "manufacturer": "Abax 3D Technologies", "file_formats": "text/x-gcode", + "has_machine_quality": "true", "machine_extruder_trains": { "0": "abax_pri3_extruder_0" diff --git a/resources/definitions/abax_pri5.def.json b/resources/definitions/abax_pri5.def.json index cb6566e08c..e97994bd61 100644 --- a/resources/definitions/abax_pri5.def.json +++ b/resources/definitions/abax_pri5.def.json @@ -7,6 +7,7 @@ "author": "Abax 3D Technologies", "manufacturer": "Abax 3D Technologies", "file_formats": "text/x-gcode", + "has_machine_quality": "true", "machine_extruder_trains": { "0": "abax_pri5_extruder_0" diff --git a/resources/quality/abax_pri3/apri3_pla_fast.inst.cfg b/resources/quality/abax_pri3/apri3_pla_fast.inst.cfg index 58141d7ac9..3e8e09032d 100644 --- a/resources/quality/abax_pri3/apri3_pla_fast.inst.cfg +++ b/resources/quality/abax_pri3/apri3_pla_fast.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = generic_pla [values] -layer_height = 0.2 wall_thickness = 1.05 top_bottom_thickness = 0.8 infill_sparse_density = 20 diff --git a/resources/quality/abax_pri3/apri3_pla_high.inst.cfg b/resources/quality/abax_pri3/apri3_pla_high.inst.cfg index 4051885819..808ec25a37 100644 --- a/resources/quality/abax_pri3/apri3_pla_high.inst.cfg +++ b/resources/quality/abax_pri3/apri3_pla_high.inst.cfg @@ -11,7 +11,6 @@ weight = 1 material = generic_pla [values] -layer_height = 0.1 wall_thickness = 1.05 top_bottom_thickness = 0.8 infill_sparse_density = 20 diff --git a/resources/quality/abax_pri3/apri3_pla_normal.inst.cfg b/resources/quality/abax_pri3/apri3_pla_normal.inst.cfg index d76eac4014..526493b90b 100644 --- a/resources/quality/abax_pri3/apri3_pla_normal.inst.cfg +++ b/resources/quality/abax_pri3/apri3_pla_normal.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = generic_pla [values] -layer_height = 0.2 wall_thickness = 1.05 top_bottom_thickness = 0.8 infill_sparse_density = 20 diff --git a/resources/quality/abax_pri5/apri5_pla_fast.inst.cfg b/resources/quality/abax_pri5/apri5_pla_fast.inst.cfg index ef6ec00ede..f582449a8e 100644 --- a/resources/quality/abax_pri5/apri5_pla_fast.inst.cfg +++ b/resources/quality/abax_pri5/apri5_pla_fast.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = generic_pla [values] -layer_height = 0.2 wall_thickness = 1.05 top_bottom_thickness = 0.8 infill_sparse_density = 20 diff --git a/resources/quality/abax_pri5/apri5_pla_high.inst.cfg b/resources/quality/abax_pri5/apri5_pla_high.inst.cfg index 00c5a67cf9..08d86375c9 100644 --- a/resources/quality/abax_pri5/apri5_pla_high.inst.cfg +++ b/resources/quality/abax_pri5/apri5_pla_high.inst.cfg @@ -11,7 +11,6 @@ weight = 1 material = generic_pla [values] -layer_height = 0.1 wall_thickness = 1.05 top_bottom_thickness = 0.8 infill_sparse_density = 20 diff --git a/resources/quality/abax_pri5/apri5_pla_normal.inst.cfg b/resources/quality/abax_pri5/apri5_pla_normal.inst.cfg index 1934b4af25..6bb5667a30 100644 --- a/resources/quality/abax_pri5/apri5_pla_normal.inst.cfg +++ b/resources/quality/abax_pri5/apri5_pla_normal.inst.cfg @@ -11,7 +11,6 @@ weight = 0 material = generic_pla [values] -layer_height = 0.2 wall_thickness = 1.05 top_bottom_thickness = 0.8 infill_sparse_density = 20 From 5f2256f2d9ada56c8035684896ed5cdeee10308a Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 6 Sep 2022 17:33:09 +0200 Subject: [PATCH 32/32] allow conan 1.52.0 to be used --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index bd19974dd9..fcc1379cfa 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan!=1.51.0,!=1.51.1,!=1.51.2,!=1.51.3,!=1.52.0 +conan!=1.51.0,!=1.51.1,!=1.51.2,!=1.51.3 sip