mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fixed multiplyObject group. CURA-3239
This commit is contained in:
parent
bd874a62ac
commit
e866c03b50
2 changed files with 8 additions and 8 deletions
|
@ -143,7 +143,7 @@ class Arrange:
|
|||
Logger.log("d", "Current buildplate: \n%s" % str(arranger._occupied[::10, ::10]))
|
||||
return arranger
|
||||
|
||||
## Find placement for a node and place it
|
||||
## Find placement for a node (using offset shape) and place it (using hull shape)
|
||||
#
|
||||
def findNodePlacements(self, node, offset_shape_arr, hull_shape_arr, count = 1, step = 1):
|
||||
# offset_shape_arr, hull_shape_arr, arranger -> nodes, arranger
|
||||
|
|
|
@ -856,17 +856,17 @@ class CuraApplication(QtApplication):
|
|||
if not node and object_id != 0: # Workaround for tool handles overlapping the selected object
|
||||
node = Selection.getSelectedObject(0)
|
||||
|
||||
root = self.getController().getScene().getRoot()
|
||||
arranger = Arrange.create(scene_root = root)
|
||||
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset)
|
||||
nodes = arranger.findNodePlacements(node, offset_shape_arr, hull_shape_arr, count = count)
|
||||
|
||||
if nodes:
|
||||
current_node = node
|
||||
# Find the topmost group
|
||||
while current_node.getParent() and current_node.getParent().callDecoration("isGroup"):
|
||||
current_node = current_node.getParent()
|
||||
|
||||
root = self.getController().getScene().getRoot()
|
||||
arranger = Arrange.create(scene_root = root)
|
||||
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(current_node, min_offset = min_offset)
|
||||
nodes = arranger.findNodePlacements(current_node, offset_shape_arr, hull_shape_arr, count = count)
|
||||
|
||||
if nodes:
|
||||
op = GroupedOperation()
|
||||
for new_node in nodes:
|
||||
op.addOperation(AddSceneNodeOperation(new_node, current_node.getParent()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue