From e19f5ee330d31abe9d7246ed9c109d4bb54e520c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 6 Mar 2025 10:58:54 +0100 Subject: [PATCH 01/16] Do not move objects if auto-arrange fails CURA-12169 When doing an explicit auto-arrange that can not find a complete solution, it is better not to move the objects because they will probably end up in a weird position --- cura/Arranging/ArrangeObjectsJob.py | 2 +- cura/Arranging/Arranger.py | 10 +++++++--- cura/MultiplyObjectsJob.py | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cura/Arranging/ArrangeObjectsJob.py b/cura/Arranging/ArrangeObjectsJob.py index 48d2436482..d494a79327 100644 --- a/cura/Arranging/ArrangeObjectsJob.py +++ b/cura/Arranging/ArrangeObjectsJob.py @@ -40,7 +40,7 @@ class ArrangeObjectsJob(Job): found_solution_for_all = False try: - found_solution_for_all = arranger.arrange() + found_solution_for_all = arranger.arrange(only_if_full_success = True) except: # If the thread crashes, the message should still close Logger.logException("e", "Unable to arrange the objects on the buildplate. The arrange algorithm has crashed.") diff --git a/cura/Arranging/Arranger.py b/cura/Arranging/Arranger.py index fd93ab1846..d0a78431f6 100644 --- a/cura/Arranging/Arranger.py +++ b/cura/Arranging/Arranger.py @@ -16,12 +16,16 @@ class Arranger: """ raise NotImplementedError - def arrange(self, add_new_nodes_in_scene: bool = False) -> bool: + def arrange(self, add_new_nodes_in_scene: bool = False, only_if_full_success: bool = False) -> bool: """ Find placement for a set of scene nodes, and move them by using a single grouped operation. :param add_new_nodes_in_scene: Whether to create new scene nodes before applying the transformations and rotations :return: found_solution_for_all: Whether the algorithm found a place on the buildplate for all the objects """ grouped_operation, not_fit_count = self.createGroupOperationForArrange(add_new_nodes_in_scene) - grouped_operation.push() - return not_fit_count == 0 + full_success = not_fit_count == 0 + + if full_success or not only_if_full_success: + grouped_operation.push() + + return full_success diff --git a/cura/MultiplyObjectsJob.py b/cura/MultiplyObjectsJob.py index 889b6f5d1a..024baa50f5 100644 --- a/cura/MultiplyObjectsJob.py +++ b/cura/MultiplyObjectsJob.py @@ -84,6 +84,7 @@ class MultiplyObjectsJob(Job): arranger = Nest2DArrange(nodes, Application.getInstance().getBuildVolume(), fixed_nodes, factor=1000) group_operation, not_fit_count = arranger.createGroupOperationForArrange(add_new_nodes_in_scene=True) + found_solution_for_all = not_fit_count == 0 if nodes_to_add_without_arrange: for nested_node in nodes_to_add_without_arrange: From 01d03f7e21d7f98935904b85f39f32632cb0de28 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 6 Mar 2025 10:59:55 +0100 Subject: [PATCH 02/16] Fix testing multiple arrange strategies CURA-12169 Some items were still set from previous tryes, giving a final result that could have inconsistencies (e.g. objects over disallowed ares) --- cura/Arranging/Nest2DArrange.py | 103 ++++++++++++++++---------------- 1 file changed, 52 insertions(+), 51 deletions(-) diff --git a/cura/Arranging/Nest2DArrange.py b/cura/Arranging/Nest2DArrange.py index 968522d5a3..3f9a12757f 100644 --- a/cura/Arranging/Nest2DArrange.py +++ b/cura/Arranging/Nest2DArrange.py @@ -57,60 +57,61 @@ class Nest2DArrange(Arranger): if self._fixed_nodes is None: self._fixed_nodes = [] - # Add all the items we want to arrange - node_items = [] - for node in self._nodes_to_arrange: - hull_polygon = node.callDecoration("getConvexHull") - if not hull_polygon or hull_polygon.getPoints is None: - Logger.log("w", "Object {} cannot be arranged because it has no convex hull.".format(node.getName())) - continue - converted_points = [] - for point in hull_polygon.getPoints(): - converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) - item = Item(converted_points) - node_items.append(item) - - # Use a tiny margin for the build_plate_polygon (the nesting doesn't like overlapping disallowed areas) - half_machine_width = 0.5 * machine_width - 1 - half_machine_depth = 0.5 * machine_depth - 1 - build_plate_polygon = Polygon(numpy.array([ - [half_machine_width, -half_machine_depth], - [-half_machine_width, -half_machine_depth], - [-half_machine_width, half_machine_depth], - [half_machine_width, half_machine_depth] - ], numpy.float32)) - - disallowed_areas = self._build_volume.getDisallowedAreas() - for area in disallowed_areas: - converted_points = [] - - # Clip the disallowed areas so that they don't overlap the bounding box (The arranger chokes otherwise) - clipped_area = area.intersectionConvexHulls(build_plate_polygon) - - if clipped_area.getPoints() is not None and len( - clipped_area.getPoints()) > 2: # numpy array has to be explicitly checked against None - for point in clipped_area.getPoints(): - converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) - - disallowed_area = Item(converted_points) - disallowed_area.markAsDisallowedAreaInBin(0) - node_items.append(disallowed_area) - - for node in self._fixed_nodes: - converted_points = [] - hull_polygon = node.callDecoration("getConvexHull") - - if hull_polygon is not None and hull_polygon.getPoints() is not None and len( - hull_polygon.getPoints()) > 2: # numpy array has to be explicitly checked against None - for point in hull_polygon.getPoints(): - converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) - item = Item(converted_points) - item.markAsFixedInBin(0) - node_items.append(item) - strategies = [NfpConfig.Alignment.CENTER] * 3 + [NfpConfig.Alignment.BOTTOM_LEFT] * 3 found_solution_for_all = False while not found_solution_for_all and len(strategies) > 0: + + # Add all the items we want to arrange + node_items = [] + for node in self._nodes_to_arrange: + hull_polygon = node.callDecoration("getConvexHull") + if not hull_polygon or hull_polygon.getPoints is None: + Logger.log("w", "Object {} cannot be arranged because it has no convex hull.".format(node.getName())) + continue + converted_points = [] + for point in hull_polygon.getPoints(): + converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) + item = Item(converted_points) + node_items.append(item) + + # Use a tiny margin for the build_plate_polygon (the nesting doesn't like overlapping disallowed areas) + half_machine_width = 0.5 * machine_width - 1 + half_machine_depth = 0.5 * machine_depth - 1 + build_plate_polygon = Polygon(numpy.array([ + [half_machine_width, -half_machine_depth], + [-half_machine_width, -half_machine_depth], + [-half_machine_width, half_machine_depth], + [half_machine_width, half_machine_depth] + ], numpy.float32)) + + disallowed_areas = self._build_volume.getDisallowedAreas() + for area in disallowed_areas: + converted_points = [] + + # Clip the disallowed areas so that they don't overlap the bounding box (The arranger chokes otherwise) + clipped_area = area.intersectionConvexHulls(build_plate_polygon) + + if clipped_area.getPoints() is not None and len( + clipped_area.getPoints()) > 2: # numpy array has to be explicitly checked against None + for point in clipped_area.getPoints(): + converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) + + disallowed_area = Item(converted_points) + disallowed_area.markAsDisallowedAreaInBin(0) + node_items.append(disallowed_area) + + for node in self._fixed_nodes: + converted_points = [] + hull_polygon = node.callDecoration("getConvexHull") + + if hull_polygon is not None and hull_polygon.getPoints() is not None and len( + hull_polygon.getPoints()) > 2: # numpy array has to be explicitly checked against None + for point in hull_polygon.getPoints(): + converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) + item = Item(converted_points) + item.markAsFixedInBin(0) + node_items.append(item) + config = NfpConfig() config.accuracy = 1.0 config.alignment = NfpConfig.Alignment.CENTER From 22d1d170dc22d5f35122f197ad86645f353fcacb Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 6 Mar 2025 12:54:39 +0100 Subject: [PATCH 03/16] Improve arrangement calculation CURA-12169 1. Do not recalculate transformed polygons for each strategy. 2. Try all possible strategies, but only once. This seems to give the best results. --- cura/Arranging/Nest2DArrange.py | 106 +++++++++++++++++--------------- 1 file changed, 58 insertions(+), 48 deletions(-) diff --git a/cura/Arranging/Nest2DArrange.py b/cura/Arranging/Nest2DArrange.py index 3f9a12757f..7e024f565f 100644 --- a/cura/Arranging/Nest2DArrange.py +++ b/cura/Arranging/Nest2DArrange.py @@ -54,64 +54,74 @@ class Nest2DArrange(Arranger): machine_depth = self._build_volume.getDepth() - (edge_disallowed_size * 2) build_plate_bounding_box = Box(int(machine_width * self._factor), int(machine_depth * self._factor)) + # Use a tiny margin for the build_plate_polygon (the nesting doesn't like overlapping disallowed areas) + half_machine_width = 0.5 * machine_width - 1 + half_machine_depth = 0.5 * machine_depth - 1 + build_plate_polygon = Polygon(numpy.array([ + [half_machine_width, -half_machine_depth], + [-half_machine_width, -half_machine_depth], + [-half_machine_width, half_machine_depth], + [half_machine_width, half_machine_depth] + ], numpy.float32)) + + def _convert_points(points): + if points is not None and len(points) > 2: # numpy array has to be explicitly checked against None + converted_points = [] + for point in points: + converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) + return [converted_points] + else: + return [] + + polygons_nodes_to_arrange = [] + for node in self._nodes_to_arrange: + hull_polygon = node.callDecoration("getConvexHull") + if not hull_polygon or hull_polygon.getPoints is None: + Logger.log("w", "Object {} cannot be arranged because it has no convex hull.".format(node.getName())) + continue + + polygons_nodes_to_arrange += _convert_points(hull_polygon.getPoints()) + + polygons_disallowed_areas = [] + for area in self._build_volume.getDisallowedAreas(): + # Clip the disallowed areas so that they don't overlap the bounding box (The arranger chokes otherwise) + clipped_area = area.intersectionConvexHulls(build_plate_polygon) + + polygons_disallowed_areas += _convert_points(clipped_area.getPoints()) + + polygons_fixed_nodes = [] if self._fixed_nodes is None: self._fixed_nodes = [] + for node in self._fixed_nodes: + hull_polygon = node.callDecoration("getConvexHull") - strategies = [NfpConfig.Alignment.CENTER] * 3 + [NfpConfig.Alignment.BOTTOM_LEFT] * 3 + if hull_polygon is not None: + polygons_fixed_nodes += _convert_points(hull_polygon.getPoints()) + + strategies = [NfpConfig.Alignment.CENTER, + NfpConfig.Alignment.BOTTOM_LEFT, + NfpConfig.Alignment.BOTTOM_RIGHT, + NfpConfig.Alignment.TOP_LEFT, + NfpConfig.Alignment.TOP_RIGHT, + NfpConfig.Alignment.DONT_ALIGN] found_solution_for_all = False while not found_solution_for_all and len(strategies) > 0: # Add all the items we want to arrange node_items = [] - for node in self._nodes_to_arrange: - hull_polygon = node.callDecoration("getConvexHull") - if not hull_polygon or hull_polygon.getPoints is None: - Logger.log("w", "Object {} cannot be arranged because it has no convex hull.".format(node.getName())) - continue - converted_points = [] - for point in hull_polygon.getPoints(): - converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) - item = Item(converted_points) + for polygon in polygons_nodes_to_arrange: + node_items.append(Item(polygon)) + + for polygon in polygons_disallowed_areas: + disallowed_area = Item(polygon) + disallowed_area.markAsDisallowedAreaInBin(0) + node_items.append(disallowed_area) + + for polygon in polygons_fixed_nodes: + item = Item(polygon) + item.markAsFixedInBin(0) node_items.append(item) - # Use a tiny margin for the build_plate_polygon (the nesting doesn't like overlapping disallowed areas) - half_machine_width = 0.5 * machine_width - 1 - half_machine_depth = 0.5 * machine_depth - 1 - build_plate_polygon = Polygon(numpy.array([ - [half_machine_width, -half_machine_depth], - [-half_machine_width, -half_machine_depth], - [-half_machine_width, half_machine_depth], - [half_machine_width, half_machine_depth] - ], numpy.float32)) - - disallowed_areas = self._build_volume.getDisallowedAreas() - for area in disallowed_areas: - converted_points = [] - - # Clip the disallowed areas so that they don't overlap the bounding box (The arranger chokes otherwise) - clipped_area = area.intersectionConvexHulls(build_plate_polygon) - - if clipped_area.getPoints() is not None and len( - clipped_area.getPoints()) > 2: # numpy array has to be explicitly checked against None - for point in clipped_area.getPoints(): - converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) - - disallowed_area = Item(converted_points) - disallowed_area.markAsDisallowedAreaInBin(0) - node_items.append(disallowed_area) - - for node in self._fixed_nodes: - converted_points = [] - hull_polygon = node.callDecoration("getConvexHull") - - if hull_polygon is not None and hull_polygon.getPoints() is not None and len( - hull_polygon.getPoints()) > 2: # numpy array has to be explicitly checked against None - for point in hull_polygon.getPoints(): - converted_points.append(Point(int(point[0] * self._factor), int(point[1] * self._factor))) - item = Item(converted_points) - item.markAsFixedInBin(0) - node_items.append(item) - config = NfpConfig() config.accuracy = 1.0 config.alignment = NfpConfig.Alignment.CENTER From 78e62635dda43e9f9d6c45d1384f602762fb9c25 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Fri, 7 Mar 2025 16:03:07 +0100 Subject: [PATCH 04/16] Remove redundant overrides This will unlock the z seam x and z seam y, otherwise the z seam would not update from x 150 and y 180 position --- resources/definitions/ultimaker_sketch_sprint.def.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/resources/definitions/ultimaker_sketch_sprint.def.json b/resources/definitions/ultimaker_sketch_sprint.def.json index d0991231bc..25477c062c 100644 --- a/resources/definitions/ultimaker_sketch_sprint.def.json +++ b/resources/definitions/ultimaker_sketch_sprint.def.json @@ -395,10 +395,7 @@ "xy_offset": { "value": 0 }, "xy_offset_layer_0": { "value": -0.1 }, "z_seam_corner": { "value": "'z_seam_corner_inner'" }, - "z_seam_position": { "value": "'backleft'" }, "z_seam_type": { "value": "'sharpest_corner'" }, - "z_seam_x": { "value": 150 }, - "z_seam_y": { "value": 180 }, "zig_zaggify_infill": { "value": true } } } \ No newline at end of file From 5d2856c195345a44fabd1f49d2c0d665b148915b Mon Sep 17 00:00:00 2001 From: HellAholic Date: Fri, 7 Mar 2025 16:32:15 +0100 Subject: [PATCH 05/16] backleft can stay --- resources/definitions/ultimaker_sketch_sprint.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/ultimaker_sketch_sprint.def.json b/resources/definitions/ultimaker_sketch_sprint.def.json index 25477c062c..529abc0940 100644 --- a/resources/definitions/ultimaker_sketch_sprint.def.json +++ b/resources/definitions/ultimaker_sketch_sprint.def.json @@ -395,6 +395,7 @@ "xy_offset": { "value": 0 }, "xy_offset_layer_0": { "value": -0.1 }, "z_seam_corner": { "value": "'z_seam_corner_inner'" }, + "z_seam_position": { "value": "'backleft'" }, "z_seam_type": { "value": "'sharpest_corner'" }, "zig_zaggify_infill": { "value": true } } From 41cd893e09cb9c14c1234112ecaffdd303b8bf90 Mon Sep 17 00:00:00 2001 From: Frederic98 <13856291+Frederic98@users.noreply.github.com> Date: Fri, 7 Mar 2025 16:51:52 +0100 Subject: [PATCH 06/16] PP-592 --- resources/definitions/ultimaker_s8.def.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/definitions/ultimaker_s8.def.json b/resources/definitions/ultimaker_s8.def.json index cc9c97aebd..fd758f6e2a 100644 --- a/resources/definitions/ultimaker_s8.def.json +++ b/resources/definitions/ultimaker_s8.def.json @@ -92,10 +92,10 @@ "cool_min_temperature": { "value": "material_print_temperature-15" }, "default_material_print_temperature": { "maximum_value_warning": 320 }, "extra_infill_lines_to_support_skins": { "value": "'walls_and_lines'" }, - "flooring_layer_count": { "value": "1" }, + "flooring_layer_count": { "value": 0 }, "gradual_flow_enabled": { "value": false }, "hole_xy_offset": { "value": 0.075 }, - "infill_material_flow": { "value": "1.1*material_flow" }, + "infill_material_flow": { "value": "material_flow" }, "infill_overlap": { "value": 10 }, "infill_pattern": { "value": "'zigzag' if infill_sparse_density > 80 else 'grid'" }, "infill_sparse_density": { "value": 15 }, @@ -374,7 +374,7 @@ "speed_travel": { "maximum_value": 500, - "value": 500 + "value": 400 }, "speed_travel_layer_0": { @@ -427,7 +427,6 @@ "support_tree_bp_diameter": { "value": 15 }, "support_tree_tip_diameter": { "value": 1.0 }, "support_tree_top_rate": { "value": 20 }, - "support_wall_count": { "value": 2 }, "support_xy_distance_overhang": { "value": "machine_nozzle_size" }, "support_z_distance": { "value": "0.4*material_shrinkage_percentage_z/100.0" }, "top_bottom_thickness": { "value": "round(4*layer_height, 2)" }, From 9c18763f697523d593e178cc0e98c597f464ccda Mon Sep 17 00:00:00 2001 From: MariMakes <40423138+MariMakes@users.noreply.github.com> Date: Mon, 10 Mar 2025 13:46:27 +0100 Subject: [PATCH 07/16] Update Changelog for Cura 5.10 Beta Update Changelog for Cura 5.10 Beta Contributes to CURA-12428 --- resources/texts/change_log.txt | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 97c2da39b0..87095eaaeb 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -1,3 +1,60 @@ +[5.10] + +* New features and improvements: +- UltiMaker S8 Support: Added compatibility for the UltiMaker S8 printer. +- Cheetah Gcode Flavor: Introduced a new Marlin-like Gcode flavor called Cheetah. +- SpaceMouse support: Interact with your object in 3D thanks to a collaboration with 3Dconnexion +- Cloud Printing for Sketch Sprint: Enabled printing over cloud with Digital Factory for Sketch Sprint users. +- Interlocking Settings: Moved Interlocking settings out of experimental into expert +- Build System Upgrade: Upgraded the build system from Conan 1 to Conan 2. Updated documentation is available. +- Preview Looping: When the last layer is played in the preview, the first layer will now play again instead of stopping. +- Updated About Page: The About Page now shows the used sources, their licenses, and their versions in a clearer way +- Flip Y-axis Translate Tool Handle: Added an option to flip the Y-axis translate tool handle in preferences contributed by @GregValiant. +- Rotation by Input & Snap Angle Input: Introduced rotation by input & snap angle input contributed by @HellAholic and @GregValiant. +- Purge Lines And Unload Filament Post Processing Script: Added a Purge Lines and Unload Filament Post Processing Script contributed by @GregValiant and @HellAholic +- Thingiverse "Open in Cura" Button Linux Support: Enabled the "Open in Cura" button from Thingiverse to open files in Linux contributed by @hadess. +- Multitool Printer Configuration Options: Introduced 3 new configuration options in machine settings for multitool printers contributed by @TheSin-. +- Search and Replace Post-Processing Plug-In: Significantly improved the Search and Replace post-processing plug-in with features like replacing only the first instance, limiting search to a layer range, and ignoring start-up or ending G-code contributed by @GregValiant +- Enabled Relative extrusion (M82 and M83 commands) for Marlin-flavored GCode, contributed by @EmJay276 + + +* New settings: +- Overhanging Wall Speeds, now gives you the ability to tune multiple values. Don’t forget to adjust the Overhanging Wall Angle to start using the setting. +- Minimum Layer Time with Overhang and Minimum Overhang Segment Length: Fine-tune the minimum layer time for overhangs. +- Distance to Walls: Finetune combing movements. +- Overhanging Wall Speeds: Fine-tune speeds based on different overhang percentages. +- Pressure Advance Factor Setting: New setting for machine definitions. +- You can now tune the Bottom Surface Skin, like you can tune the Top Surface Skin! You can now tune Extruder, Layers, Line Width, Pattern, Line Directions, Outer Wall Flow, Inner Wall(s) Flow, Flow, Outer Wall Speed, Inner Wall Speed, Skin Speed, Inner Wall Acceleration, Skin Acceleration, Outer Wall Jerk, Inner Wall Jerk, Skin Jerk, and Monotonic Bottom Surface Order +- Enable/Disable USB Printing: A preference setting to indicate that you are using the printer over USB functionality. This setting lays the groundwork for automatically disabling USB printing in the next release when it’s not being used. + +* Bug fixes: +- Resolved a crash that occurred when switching materials on Sovol printers. +- Random Seam no longer favors one side and not is truly random again +- Reduced the slicing time when no support needs to be generated +- Fixed a bug where Seam on Vertex with a User Defined seam position was not working correctly. +- Gcode replacement with a single line of code no longer produces values in separate lines +- Setting names that become too long after translation are now truncated. +- Updated UltiMaker printer logos to align with the current style. +- The number of decimal places displayed for layer height in the top bar has been reduced. +- Fixed a bug that caused incorrect retracting and hopping on printers with more than 2 extruders. +- Improved how fast the settings are loaded in the Settings Visibility window +- Improved how disallowed areas are taken into account when arranging models on the buildplate + + +* Printer definitions, profiles, and materials: +- Introduced Visual Intents for the Sketch Sprint +- Introduced new Extra Fast and Draft profiles for the Sketch Sprint +- Introduced profiles for Sketch printers for Metallic PLA with improved surface quality (matte vs shiny) +- Introduce High Speed and High Speed Solid intents for Method, Method X, and Method XL +- Introduced PC ABS and PC ABS FR materials for Method X and Method XL +- Introduced Nylon Slide for UltiMaker S Series Printers +- Updated the Breakaway Build Volume Temperature for UltiMaker Factor 4 +- Introduced Makerbot Replicator + +- Updated Voron2 printers to include TPU ASA and PVA, contributed by @WCEngineer +- Enabled Relative extrusion (M82 and M83 commands) for Marlin-flavored GCode, contributed by @EmJay276 + +Cura 5.10 supports Mac OSX 12 Monterey or higher. This is because the tools that we use to create Cura builds no longer support these versions of Mac OSX. + [5.9] * New features and improvements: From a4a35ba485aaf33e2e90431f179ae7b792850d54 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 10 Mar 2025 13:46:31 +0100 Subject: [PATCH 08/16] Fix overlapping objects after auto-arrange CURA-12453 * Use DONT_ALIGN alignment, otherwise all the transforms get re-centered, including the ones of the fixed objects * Remove DONT_ALIGN strategy for starting point, which is a non-handled case in the inner library --- cura/Arranging/Nest2DArrange.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/Arranging/Nest2DArrange.py b/cura/Arranging/Nest2DArrange.py index 7e024f565f..5f34cb21a0 100644 --- a/cura/Arranging/Nest2DArrange.py +++ b/cura/Arranging/Nest2DArrange.py @@ -102,8 +102,7 @@ class Nest2DArrange(Arranger): NfpConfig.Alignment.BOTTOM_LEFT, NfpConfig.Alignment.BOTTOM_RIGHT, NfpConfig.Alignment.TOP_LEFT, - NfpConfig.Alignment.TOP_RIGHT, - NfpConfig.Alignment.DONT_ALIGN] + NfpConfig.Alignment.TOP_RIGHT] found_solution_for_all = False while not found_solution_for_all and len(strategies) > 0: @@ -124,7 +123,7 @@ class Nest2DArrange(Arranger): config = NfpConfig() config.accuracy = 1.0 - config.alignment = NfpConfig.Alignment.CENTER + config.alignment = NfpConfig.Alignment.DONT_ALIGN config.starting_point = strategies[0] strategies = strategies[1:] From a6ee53c944969ae72e6f441b5932bf33c729541a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 10 Mar 2025 14:55:46 +0100 Subject: [PATCH 09/16] Fix visibility settings not being applied for lower layers CURA-12272 --- plugins/SimulationView/SimulationPass.py | 67 ++++++++++++------------ 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/plugins/SimulationView/SimulationPass.py b/plugins/SimulationView/SimulationPass.py index 080b02bd9e..436d5b8723 100644 --- a/plugins/SimulationView/SimulationPass.py +++ b/plugins/SimulationView/SimulationPass.py @@ -67,39 +67,40 @@ class SimulationPass(RenderPass): if not self._compatibility_mode: self._layer_shader.setUniformValue("u_starts_color", Color(*Application.getInstance().getTheme().getColor("layerview_starts").getRgb())) - if self._layer_view: - self._layer_shader.setUniformValue("u_max_feedrate", self._layer_view.getMaxFeedrate()) - self._layer_shader.setUniformValue("u_min_feedrate", self._layer_view.getMinFeedrate()) - self._layer_shader.setUniformValue("u_max_thickness", self._layer_view.getMaxThickness()) - self._layer_shader.setUniformValue("u_min_thickness", self._layer_view.getMinThickness()) - self._layer_shader.setUniformValue("u_max_line_width", self._layer_view.getMaxLineWidth()) - self._layer_shader.setUniformValue("u_min_line_width", self._layer_view.getMinLineWidth()) - self._layer_shader.setUniformValue("u_max_flow_rate", self._layer_view.getMaxFlowRate()) - self._layer_shader.setUniformValue("u_min_flow_rate", self._layer_view.getMinFlowRate()) - self._layer_shader.setUniformValue("u_layer_view_type", self._layer_view.getSimulationViewType()) - self._layer_shader.setUniformValue("u_extruder_opacity", self._layer_view.getExtruderOpacities()) - self._layer_shader.setUniformValue("u_show_travel_moves", self._layer_view.getShowTravelMoves()) - self._layer_shader.setUniformValue("u_show_helpers", self._layer_view.getShowHelpers()) - self._layer_shader.setUniformValue("u_show_skin", self._layer_view.getShowSkin()) - self._layer_shader.setUniformValue("u_show_infill", self._layer_view.getShowInfill()) - self._layer_shader.setUniformValue("u_show_starts", self._layer_view.getShowStarts()) - else: - #defaults - self._layer_shader.setUniformValue("u_max_feedrate", 1) - self._layer_shader.setUniformValue("u_min_feedrate", 0) - self._layer_shader.setUniformValue("u_max_thickness", 1) - self._layer_shader.setUniformValue("u_min_thickness", 0) - self._layer_shader.setUniformValue("u_max_flow_rate", 1) - self._layer_shader.setUniformValue("u_min_flow_rate", 0) - self._layer_shader.setUniformValue("u_max_line_width", 1) - self._layer_shader.setUniformValue("u_min_line_width", 0) - self._layer_shader.setUniformValue("u_layer_view_type", 1) - self._layer_shader.setUniformValue("u_extruder_opacity", [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]) - self._layer_shader.setUniformValue("u_show_travel_moves", 0) - self._layer_shader.setUniformValue("u_show_helpers", 1) - self._layer_shader.setUniformValue("u_show_skin", 1) - self._layer_shader.setUniformValue("u_show_infill", 1) - self._layer_shader.setUniformValue("u_show_starts", 1) + for shader in [self._layer_shader, self._layer_shadow_shader]: + if self._layer_view: + shader.setUniformValue("u_max_feedrate", self._layer_view.getMaxFeedrate()) + shader.setUniformValue("u_min_feedrate", self._layer_view.getMinFeedrate()) + shader.setUniformValue("u_max_thickness", self._layer_view.getMaxThickness()) + shader.setUniformValue("u_min_thickness", self._layer_view.getMinThickness()) + shader.setUniformValue("u_max_line_width", self._layer_view.getMaxLineWidth()) + shader.setUniformValue("u_min_line_width", self._layer_view.getMinLineWidth()) + shader.setUniformValue("u_max_flow_rate", self._layer_view.getMaxFlowRate()) + shader.setUniformValue("u_min_flow_rate", self._layer_view.getMinFlowRate()) + shader.setUniformValue("u_layer_view_type", self._layer_view.getSimulationViewType()) + shader.setUniformValue("u_extruder_opacity", self._layer_view.getExtruderOpacities()) + shader.setUniformValue("u_show_travel_moves", self._layer_view.getShowTravelMoves()) + shader.setUniformValue("u_show_helpers", self._layer_view.getShowHelpers()) + shader.setUniformValue("u_show_skin", self._layer_view.getShowSkin()) + shader.setUniformValue("u_show_infill", self._layer_view.getShowInfill()) + shader.setUniformValue("u_show_starts", self._layer_view.getShowStarts()) + else: + #defaults + shader.setUniformValue("u_max_feedrate", 1) + shader.setUniformValue("u_min_feedrate", 0) + shader.setUniformValue("u_max_thickness", 1) + shader.setUniformValue("u_min_thickness", 0) + shader.setUniformValue("u_max_flow_rate", 1) + shader.setUniformValue("u_min_flow_rate", 0) + shader.setUniformValue("u_max_line_width", 1) + shader.setUniformValue("u_min_line_width", 0) + shader.setUniformValue("u_layer_view_type", 1) + shader.setUniformValue("u_extruder_opacity", [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]) + shader.setUniformValue("u_show_travel_moves", 0) + shader.setUniformValue("u_show_helpers", 1) + shader.setUniformValue("u_show_skin", 1) + shader.setUniformValue("u_show_infill", 1) + shader.setUniformValue("u_show_starts", 1) if not self._tool_handle_shader: self._tool_handle_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "toolhandle.shader")) From 397fc2b1611be287851e556668469ad94c3f4c0f Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 10 Mar 2025 15:23:14 +0100 Subject: [PATCH 10/16] Add missing 5.9.1. changelog --- resources/texts/change_log.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 87095eaaeb..da33504591 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -55,6 +55,11 @@ Cura 5.10 supports Mac OSX 12 Monterey or higher. This is because the tools that we use to create Cura builds no longer support these versions of Mac OSX. +[5.9.1] + +* New features and improvements: +The About Page now shows some of the used sources, their licenses, and their versions in a clearer way. This will be even more complete in Cura 5.10. + [5.9] * New features and improvements: From 69eb50eb6ae4daa3a66e7c2cb1ade0ff2974363b Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 10 Mar 2025 15:58:33 +0100 Subject: [PATCH 11/16] Minor adjustments --- resources/texts/change_log.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index da33504591..1830a0fcec 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -3,7 +3,7 @@ * New features and improvements: - UltiMaker S8 Support: Added compatibility for the UltiMaker S8 printer. - Cheetah Gcode Flavor: Introduced a new Marlin-like Gcode flavor called Cheetah. -- SpaceMouse support: Interact with your object in 3D thanks to a collaboration with 3Dconnexion +- SpaceMouse support: Navigate the view seamlessly with a 3D mouse, thanks to a collaboration with 3Dconnexion. - Cloud Printing for Sketch Sprint: Enabled printing over cloud with Digital Factory for Sketch Sprint users. - Interlocking Settings: Moved Interlocking settings out of experimental into expert - Build System Upgrade: Upgraded the build system from Conan 1 to Conan 2. Updated documentation is available. @@ -22,10 +22,9 @@ - Overhanging Wall Speeds, now gives you the ability to tune multiple values. Don’t forget to adjust the Overhanging Wall Angle to start using the setting. - Minimum Layer Time with Overhang and Minimum Overhang Segment Length: Fine-tune the minimum layer time for overhangs. - Distance to Walls: Finetune combing movements. -- Overhanging Wall Speeds: Fine-tune speeds based on different overhang percentages. - Pressure Advance Factor Setting: New setting for machine definitions. - You can now tune the Bottom Surface Skin, like you can tune the Top Surface Skin! You can now tune Extruder, Layers, Line Width, Pattern, Line Directions, Outer Wall Flow, Inner Wall(s) Flow, Flow, Outer Wall Speed, Inner Wall Speed, Skin Speed, Inner Wall Acceleration, Skin Acceleration, Outer Wall Jerk, Inner Wall Jerk, Skin Jerk, and Monotonic Bottom Surface Order -- Enable/Disable USB Printing: A preference setting to indicate that you are using the printer over USB functionality. This setting lays the groundwork for automatically disabling USB printing in the next release when it’s not being used. +- Enable/Disable USB Printing: A hidden preference setting to indicate that you are using the printer over USB functionality. This setting lays the groundwork for automatically disabling USB printing in the next release when it’s not being used. * Bug fixes: - Resolved a crash that occurred when switching materials on Sovol printers. @@ -53,7 +52,7 @@ - Updated Voron2 printers to include TPU ASA and PVA, contributed by @WCEngineer - Enabled Relative extrusion (M82 and M83 commands) for Marlin-flavored GCode, contributed by @EmJay276 -Cura 5.10 supports Mac OSX 12 Monterey or higher. This is because the tools that we use to create Cura builds no longer support these versions of Mac OSX. +Cura 5.10 supports Mac OSX 12 Monterey or higher. This is because the tools that we use to create Cura builds no longer support previous versions of Mac OSX. [5.9.1] From 7440af206e5c31b47a54c1baeb54fc19363c62e1 Mon Sep 17 00:00:00 2001 From: Mariska <40423138+MariMakes@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:58:11 +0100 Subject: [PATCH 12/16] Apply suggestions from code review Minor clarifications Co-authored-by: HellAholic --- resources/texts/change_log.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 1830a0fcec..4003cfd314 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -21,7 +21,7 @@ * New settings: - Overhanging Wall Speeds, now gives you the ability to tune multiple values. Don’t forget to adjust the Overhanging Wall Angle to start using the setting. - Minimum Layer Time with Overhang and Minimum Overhang Segment Length: Fine-tune the minimum layer time for overhangs. -- Distance to Walls: Finetune combing movements. +- Inside Travel Avoid Distance: Finetune combing movements. - Pressure Advance Factor Setting: New setting for machine definitions. - You can now tune the Bottom Surface Skin, like you can tune the Top Surface Skin! You can now tune Extruder, Layers, Line Width, Pattern, Line Directions, Outer Wall Flow, Inner Wall(s) Flow, Flow, Outer Wall Speed, Inner Wall Speed, Skin Speed, Inner Wall Acceleration, Skin Acceleration, Outer Wall Jerk, Inner Wall Jerk, Skin Jerk, and Monotonic Bottom Surface Order - Enable/Disable USB Printing: A hidden preference setting to indicate that you are using the printer over USB functionality. This setting lays the groundwork for automatically disabling USB printing in the next release when it’s not being used. @@ -36,7 +36,7 @@ - Updated UltiMaker printer logos to align with the current style. - The number of decimal places displayed for layer height in the top bar has been reduced. - Fixed a bug that caused incorrect retracting and hopping on printers with more than 2 extruders. -- Improved how fast the settings are loaded in the Settings Visibility window +- Improved how fast the settings are loaded in the Settings Visibility window when scrolling - Improved how disallowed areas are taken into account when arranging models on the buildplate From 782bfd01c5cda9693ce1861bf052f6f516eb7e91 Mon Sep 17 00:00:00 2001 From: Mariska <40423138+MariMakes@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:59:03 +0100 Subject: [PATCH 13/16] Update MacOSx to MaxOS Update MacOSx to MaxOS Co-authored-by: HellAholic --- resources/texts/change_log.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 4003cfd314..f24716761a 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -52,7 +52,7 @@ - Updated Voron2 printers to include TPU ASA and PVA, contributed by @WCEngineer - Enabled Relative extrusion (M82 and M83 commands) for Marlin-flavored GCode, contributed by @EmJay276 -Cura 5.10 supports Mac OSX 12 Monterey or higher. This is because the tools that we use to create Cura builds no longer support previous versions of Mac OSX. +Cura 5.10 supports macOS 12 Monterey or higher. This is because the tools that we use to create Cura builds no longer support previous versions of macOS. [5.9.1] From 9be6cee8cd82cce8129710bbbf0b6c4f91612f90 Mon Sep 17 00:00:00 2001 From: MariMakes <40423138+MariMakes@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:04:25 +0100 Subject: [PATCH 14/16] Mention last minute bug fixes Mention last minute bug fixes --- resources/texts/change_log.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index f24716761a..d73bdd01df 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -37,8 +37,8 @@ - The number of decimal places displayed for layer height in the top bar has been reduced. - Fixed a bug that caused incorrect retracting and hopping on printers with more than 2 extruders. - Improved how fast the settings are loaded in the Settings Visibility window when scrolling -- Improved how disallowed areas are taken into account when arranging models on the buildplate - +- Improved how disallowed areas and other models are taken into account when arranging models on the buildplate +- Infill lines are now always hidden in the preview if they are disabled * Printer definitions, profiles, and materials: - Introduced Visual Intents for the Sketch Sprint From 7b23511e325e311fd1497e9d639d671bc2cf6989 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Mon, 10 Mar 2025 17:23:59 +0100 Subject: [PATCH 15/16] update preview change Not limited to infill, also includes helpers and shell --- resources/texts/change_log.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index d73bdd01df..9f0a2c563a 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -38,7 +38,7 @@ - Fixed a bug that caused incorrect retracting and hopping on printers with more than 2 extruders. - Improved how fast the settings are loaded in the Settings Visibility window when scrolling - Improved how disallowed areas and other models are taken into account when arranging models on the buildplate -- Infill lines are now always hidden in the preview if they are disabled +- Preview playback now only shows visible parts. Infill lines, shell, and helpers are always hidden if disabled in preview's color scheme * Printer definitions, profiles, and materials: - Introduced Visual Intents for the Sketch Sprint From c4dd7b304ba9ee22ae82d3c875b34024aed0b1f3 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 12 Mar 2025 12:03:20 +0100 Subject: [PATCH 16/16] Fix wrongly switching project name CURA-12403 --- cura/UI/PrintInformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/UI/PrintInformation.py b/cura/UI/PrintInformation.py index 936e646946..6826c34e43 100644 --- a/cura/UI/PrintInformation.py +++ b/cura/UI/PrintInformation.py @@ -449,6 +449,6 @@ class PrintInformation(QObject): """If this is a sort of output 'device' (like local or online file storage, rather than a printer), the user could have altered the file-name, and thus the project name should be altered as well.""" if isinstance(output_device, ProjectOutputDevice): - new_name = output_device.getLastOutputName() + new_name = output_device.popLastOutputName() if new_name is not None: self.setJobName(os.path.splitext(os.path.basename(new_name))[0])