From 6a3d8504a1f9fd644e560eb999bf74e43661832c Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 5 Apr 2017 14:27:04 +0200 Subject: [PATCH] Fix g-code reader after adding arranger. CURA-3239 --- cura/CuraApplication.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 3c9ebdcdf1..8bfa5627f7 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1330,13 +1330,17 @@ class CuraApplication(QtApplication): if not node.getDecorator(ConvexHullDecorator): node.addDecorator(ConvexHullDecorator()) - # find node location - offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset) - # 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) + if node.callDecoration("isSliceable"): + # find node location + offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset) + # 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: - op = AddSceneNodeOperation(new_node, scene.getRoot()) + for new_node in nodes: + op = AddSceneNodeOperation(new_node, scene.getRoot()) + op.push() + else: + op = AddSceneNodeOperation(node, scene.getRoot()) op.push() scene.sceneChanged.emit(node)