From 3f9024aeff62a36cf24b2744a1fa9dde7196e1f2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 26 Sep 2016 13:03:45 +0200 Subject: [PATCH] Added selftest for all objects in 3mf file CURA-2460 --- plugins/3MFReader/ThreeMFReader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 032a32c61e..ac3c5f474d 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -106,6 +106,11 @@ class ThreeMFReader(MeshReader): node.setTransformation(temp_mat) + try: + node.getBoundingBox() # Selftest - There might be more functions that should fail + except: + continue + result.addChild(node) Job.yieldThread() @@ -118,7 +123,6 @@ class ThreeMFReader(MeshReader): result = result.getChildren()[0] # Only one object found, return that. except Exception as e: Logger.log("e", "exception occured in 3mf reader: %s", e) - try: # Selftest - There might be more functions that should fail bounding_box = result.getBoundingBox() bounding_box.isValid()