From d6cd37626b76db0e6e4e2287de4e8fc7f7736de2 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 3 Apr 2017 11:47:04 +0200 Subject: [PATCH] Removed logging, improved spot for left-over object. CURA-3239 --- cura/Arrange.py | 8 +------- cura/CuraApplication.py | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cura/Arrange.py b/cura/Arrange.py index 6437532b21..ed683b3610 100755 --- a/cura/Arrange.py +++ b/cura/Arrange.py @@ -134,13 +134,10 @@ class Arrange: fixed_nodes.append(node_) # place all objects fixed nodes for fixed_node in fixed_nodes: - Logger.log("d", " # Placing [%s]" % str(fixed_node)) - vertices = fixed_node.callDecoration("getConvexHull") points = copy.deepcopy(vertices._points) shape_arr = ShapeArray.fromPolygon(points, scale = scale) arranger.place(0, 0, shape_arr) - Logger.log("d", "Current buildplate: \n%s" % str(arranger._occupied[::10, ::10])) return arranger ## Find placement for a node (using offset shape) and place it (using hull shape) @@ -152,20 +149,17 @@ class Arrange: for i in range(count): new_node = copy.deepcopy(node) - Logger.log("d", " # Finding spot for %s" % new_node) x, y, penalty_points, start_prio = self.bestSpot( offset_shape_arr, start_prio = start_prio, step = step) transformation = new_node._transformation if x is not None: # We could find a place transformation._data[0][3] = x transformation._data[2][3] = y - Logger.log("d", "Best place is: %s %s (points = %s)" % (x, y, penalty_points)) self.place(x, y, hull_shape_arr) # take place before the next one - Logger.log("d", "New buildplate: \n%s" % str(self._occupied[::10, ::10])) else: Logger.log("d", "Could not find spot!") transformation._data[0][3] = 200 - transformation._data[2][3] = -100 + i * 20 + transformation._data[2][3] = 100 + i * 20 nodes.append(new_node) return nodes diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 7610ca5302..e737b488a7 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -856,8 +856,8 @@ class CuraApplication(QtApplication): if not node and object_id != 0: # Workaround for tool handles overlapping the selected object node = Selection.getSelectedObject(0) + # If object is part of a group, multiply group current_node = node - # Find the topmost group while current_node.getParent() and current_node.getParent().callDecoration("isGroup"): current_node = current_node.getParent()