From 3e75583f2b37cb08bf7d4c25a144587859ea9865 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 12 Apr 2017 15:09:31 +0200 Subject: [PATCH] Huge models no longer block loading CURA-3676 --- cura/CuraApplication.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f5c469d29d..db25822654 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1283,11 +1283,13 @@ class CuraApplication(QtApplication): child.addDecorator(ConvexHullDecorator()) if node.callDecoration("isSliceable"): - # Find node location - offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset) + # Only check position if it's not already blatantly obvious that it won't fit. + if node.getBoundingBox().width < self._volume.getBoundingBox().width or node.getBoundingBox().depth < self._volume.getBoundingBox().depth: + # 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 - node, _ = arranger.findNodePlacement(node, offset_shape_arr, hull_shape_arr, step = 10) + # Step is for skipping tests to make it a lot faster. it also makes the outcome somewhat rougher + node, _ = arranger.findNodePlacement(node, offset_shape_arr, hull_shape_arr, step = 10) op = AddSceneNodeOperation(node, scene.getRoot()) op.push()