mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 13:35:58 +08:00
Apply suggestions from code review
CURA-7851 Co-authored-by: Konstantinos Karmas <konskarm@gmail.com>
This commit is contained in:
parent
44eb3201a9
commit
96d381a895
@ -114,7 +114,7 @@ def createGroupOperationForArrange(nodes_to_arrange: List["SceneNode"],
|
|||||||
build_volume: "BuildVolume",
|
build_volume: "BuildVolume",
|
||||||
fixed_nodes: Optional[List["SceneNode"]] = None,
|
fixed_nodes: Optional[List["SceneNode"]] = None,
|
||||||
factor = 10000,
|
factor = 10000,
|
||||||
add_new_nodes_in_scene: bool = False):
|
add_new_nodes_in_scene: bool = False) -> Tuple[GroupedOperation, int]:
|
||||||
scene_root = Application.getInstance().getController().getScene().getRoot()
|
scene_root = Application.getInstance().getController().getScene().getRoot()
|
||||||
found_solution_for_all, node_items = findNodePlacement(nodes_to_arrange, build_volume, fixed_nodes, factor)
|
found_solution_for_all, node_items = findNodePlacement(nodes_to_arrange, build_volume, fixed_nodes, factor)
|
||||||
|
|
||||||
@ -134,8 +134,7 @@ def createGroupOperationForArrange(nodes_to_arrange: List["SceneNode"],
|
|||||||
else:
|
else:
|
||||||
# We didn't find a spot
|
# We didn't find a spot
|
||||||
grouped_operation.addOperation(
|
grouped_operation.addOperation(
|
||||||
TranslateOperation(node, Vector(200, node.getWorldPosition().y, -not_fit_count * 20),
|
TranslateOperation(node, Vector(200, node.getWorldPosition().y, -not_fit_count * 20), set_position = True))
|
||||||
set_position=True))
|
|
||||||
not_fit_count += 1
|
not_fit_count += 1
|
||||||
|
|
||||||
return grouped_operation, not_fit_count
|
return grouped_operation, not_fit_count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user