mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-21 20:19:32 +08:00
Fix g-code reader after adding arranger. CURA-3239
This commit is contained in:
parent
30484461cf
commit
6a3d8504a1
@ -1330,13 +1330,17 @@ class CuraApplication(QtApplication):
|
|||||||
if not node.getDecorator(ConvexHullDecorator):
|
if not node.getDecorator(ConvexHullDecorator):
|
||||||
node.addDecorator(ConvexHullDecorator())
|
node.addDecorator(ConvexHullDecorator())
|
||||||
|
|
||||||
# find node location
|
if node.callDecoration("isSliceable"):
|
||||||
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset)
|
# find node location
|
||||||
# step is for skipping tests to make it a lot faster. it also makes the outcome somewhat rougher
|
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset)
|
||||||
nodes = arranger.findNodePlacements(node, offset_shape_arr, hull_shape_arr, count = 1, step = 10)
|
# step is for skipping tests to make it a lot faster. it also makes the outcome somewhat rougher
|
||||||
|
nodes = arranger.findNodePlacements(node, offset_shape_arr, hull_shape_arr, count = 1, step = 10)
|
||||||
|
|
||||||
for new_node in nodes:
|
for new_node in nodes:
|
||||||
op = AddSceneNodeOperation(new_node, scene.getRoot())
|
op = AddSceneNodeOperation(new_node, scene.getRoot())
|
||||||
|
op.push()
|
||||||
|
else:
|
||||||
|
op = AddSceneNodeOperation(node, scene.getRoot())
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
scene.sceneChanged.emit(node)
|
scene.sceneChanged.emit(node)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user