FindNodePlacement should find a placement for the node, but not creating

a new node.
This commit is contained in:
Diego Prado Gesto 2018-06-13 11:28:20 +02:00
parent b0b4f78cf2
commit 981eed313c
3 changed files with 14 additions and 12 deletions

View file

@ -64,10 +64,11 @@ class MultiplyObjectsJob(Job):
arranger.resetLastPriority()
for i in range(self._count):
# We do place the nodes one by one, as we want to yield in between.
new_node = copy.deepcopy(node)
solution_found = False
if not node_too_big:
new_node, solution_found = arranger.findNodePlacement(current_node, offset_shape_arr, hull_shape_arr)
else:
new_node = copy.deepcopy(node)
solution_found = arranger.findNodePlacement(new_node, offset_shape_arr, hull_shape_arr)
if node_too_big or not solution_found:
found_solution_for_all = False
new_location = new_node.getPosition()