Browse Source

Huge models no longer block loading

CURA-3676
Jaime van Kessel 8 years ago
parent
commit
3e75583f2b
1 changed files with 6 additions and 4 deletions
  1. 6 4
      cura/CuraApplication.py

+ 6 - 4
cura/CuraApplication.py

@@ -1283,11 +1283,13 @@ class CuraApplication(QtApplication):
                     child.addDecorator(ConvexHullDecorator())
                     child.addDecorator(ConvexHullDecorator())
 
 
             if node.callDecoration("isSliceable"):
             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 = AddSceneNodeOperation(node, scene.getRoot())
             op.push()
             op.push()