From b69388525f2f6efc8670873c1536463ba642b872 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 20 Jul 2016 11:06:26 +0200 Subject: [PATCH] Fixed uncaught exception on first run --- cura/PlatformPhysics.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 191f7b0e27..23de74b80e 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -48,7 +48,13 @@ class PlatformPhysics: bbox = node.getBoundingBox() # Ignore intersections with the bottom - build_volume_bounding_box = self._build_volume.getBoundingBox().set(bottom=-9001) + build_volume_bounding_box = self._build_volume.getBoundingBox() + if build_volume_bounding_box: + build_volume_bounding_box.set(bottom=-9001) + else: + # No bounding box. This is triggered when running Cura from command line with a model for the first time + # In that situation there is a model, but no machine (and therefore no build volume. + return node._outside_buildarea = False # Mark the node as outside the build volume if the bounding box test fails.