From 3f83799229f2fab5167c9331ac44d12c4eb7f9f0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 8 May 2023 11:04:27 +0200 Subject: [PATCH 1/2] Only show build volume height message if it was changed Fixes #15373 && CURA-10580 --- cura/BuildVolume.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 1536d541c7..0d6ecf5810 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -648,11 +648,13 @@ class BuildVolume(SceneNode): self._width = self._global_container_stack.getProperty("machine_width", "value") machine_height = self._global_container_stack.getProperty("machine_height", "value") if self._global_container_stack.getProperty("print_sequence", "value") == "one_at_a_time" and len(self._scene_objects) > 1: - self._height = min(self._global_container_stack.getProperty("gantry_height", "value") * self._scale_vector.z, machine_height) - if self._height < (machine_height * self._scale_vector.z): + new_height = min(self._global_container_stack.getProperty("gantry_height", "value") * self._scale_vector.z, machine_height) + + if self._height > new_height: self._build_volume_message.show() - else: + elif self._height < new_height: self._build_volume_message.hide() + self._height = new_height else: self._height = self._global_container_stack.getProperty("machine_height", "value") self._build_volume_message.hide() @@ -690,11 +692,15 @@ class BuildVolume(SceneNode): if setting_key == "print_sequence": machine_height = self._global_container_stack.getProperty("machine_height", "value") if self._application.getGlobalContainerStack().getProperty("print_sequence", "value") == "one_at_a_time" and len(self._scene_objects) > 1: - self._height = min(self._global_container_stack.getProperty("gantry_height", "value") * self._scale_vector.z, machine_height) - if self._height < (machine_height * self._scale_vector.z): + new_height = min( + self._global_container_stack.getProperty("gantry_height", "value") * self._scale_vector.z, + machine_height) + + if self._height > new_height: self._build_volume_message.show() - else: + elif self._height < new_height: self._build_volume_message.hide() + self._height = new_height else: self._height = self._global_container_stack.getProperty("machine_height", "value") * self._scale_vector.z self._build_volume_message.hide() From 6a5a9e70afbca9aad3310852ef6e7f3e79ee4f38 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 9 May 2023 15:44:59 +0200 Subject: [PATCH 2/2] Fix whole output of nest2d was translated. By default, the alignment would cause the entire mass of objects to have its center of gravity to be at the origin, including any fixed object. So there was an unwanted 'whole space' translation that we didn't take into account could occur beforehand. Fortunately, there's an option to just set it not to re-translate the whole space. It's unlcear to me how this would've worked in 5.2.2 and prior (and it did ... somehow), since we didn't change anything, including that default, as far as I can see. Anyway, the arrange function can handle 'fixed' objects again (as in loading them in one by one, or loading in a whole bunch of files instead of just 'arrange all'). CURA-10476 -- should fix #14838 --- cura/Arranging/Nest2DArrange.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/Arranging/Nest2DArrange.py b/cura/Arranging/Nest2DArrange.py index 43d4d7f8a8..21427f1194 100644 --- a/cura/Arranging/Nest2DArrange.py +++ b/cura/Arranging/Nest2DArrange.py @@ -99,6 +99,7 @@ def findNodePlacement(nodes_to_arrange: List["SceneNode"], build_volume: "BuildV config = NfpConfig() config.accuracy = 1.0 + config.alignment = NfpConfig.Alignment.DONT_ALIGN num_bins = nest(node_items, build_plate_bounding_box, spacing, config)