mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Add rotation lock in arrange and multiply objects
Add rotation lock in - context menu item arrange and - checkbox in multiply objects dialog CURA-7951
This commit is contained in:
parent
6a5a9e70af
commit
4f9d041ae8
7 changed files with 97 additions and 45 deletions
|
@ -14,11 +14,13 @@ i18n_catalog = i18nCatalog("cura")
|
|||
|
||||
|
||||
class ArrangeObjectsJob(Job):
|
||||
def __init__(self, nodes: List[SceneNode], fixed_nodes: List[SceneNode], min_offset = 8) -> None:
|
||||
def __init__(self, nodes: List[SceneNode], fixed_nodes: List[SceneNode], min_offset=8,
|
||||
lock_rotation: bool = False) -> None:
|
||||
super().__init__()
|
||||
self._nodes = nodes
|
||||
self._fixed_nodes = fixed_nodes
|
||||
self._min_offset = min_offset
|
||||
self._lock_rotation = lock_rotation
|
||||
|
||||
def run(self):
|
||||
found_solution_for_all = False
|
||||
|
@ -30,7 +32,8 @@ class ArrangeObjectsJob(Job):
|
|||
status_message.show()
|
||||
|
||||
try:
|
||||
found_solution_for_all = arrange(self._nodes, Application.getInstance().getBuildVolume(), self._fixed_nodes)
|
||||
found_solution_for_all = arrange(self._nodes, Application.getInstance().getBuildVolume(), self._fixed_nodes,
|
||||
lock_rotation=self._lock_rotation)
|
||||
except: # If the thread crashes, the message should still close
|
||||
Logger.logException("e", "Unable to arrange the objects on the buildplate. The arrange algorithm has crashed.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue