Apply suggestions from code review

CURA-7440

Co-authored-by: Konstantinos Karmas <konskarm@gmail.com>
This commit is contained in:
Jaime van Kessel 2020-10-08 09:43:22 +02:00 committed by GitHub
parent d801f9838a
commit a46bf8d6fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -36,3 +36,4 @@ class ArrangeObjectsJob(Job):
title = i18n_catalog.i18nc("@info:title", "Can't Find Location")) title = i18n_catalog.i18nc("@info:title", "Can't Find Location"))
no_full_solution_message.show() no_full_solution_message.show()
self.finished.emit(self) self.finished.emit(self)

View file

@ -23,7 +23,7 @@ def findNodePlacement(nodes_to_arrange: List["SceneNode"], build_volume: "BuildV
:param build_volume: The build volume that we want to place the nodes in. It gets size & disallowed areas from this. :param build_volume: The build volume that we want to place the nodes in. It gets size & disallowed areas from this.
:param fixed_nodes: List of nods that should not be moved, but should be used when deciding where the others nodes :param fixed_nodes: List of nods that should not be moved, but should be used when deciding where the others nodes
are placed. are placed.
:param factor: The library that we use is int based. This factor defines how accuracte we want it to be. :param factor: The library that we use is int based. This factor defines how accurate we want it to be.
:return: :return:
""" """

View file

@ -74,7 +74,7 @@ class MultiplyObjectsJob(Job):
nodes.append(new_node) nodes.append(new_node)
factor = 10000 factor = 10000
found_solution_for_all, node_items = findNodePlacement(nodes, Application.getInstance().getBuildVolume(), fixed_nodes, factor = 10000) found_solution_for_all, node_items = findNodePlacement(nodes, Application.getInstance().getBuildVolume(), fixed_nodes, factor = factor)
not_fit_count = 0 not_fit_count = 0
if nodes: if nodes:
operation = GroupedOperation() operation = GroupedOperation()