From e8d2e070d83194aae1490dee07ed73b6d34fecb8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 15 Apr 2019 17:46:54 +0200 Subject: [PATCH] Dont calculate bounding box for non printing meshes Fixes #5603 --- cura/Settings/SettingOverrideDecorator.py | 3 ++- plugins/SliceInfoPlugin/SliceInfo.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cura/Settings/SettingOverrideDecorator.py b/cura/Settings/SettingOverrideDecorator.py index f82d718398..c2097cf601 100644 --- a/cura/Settings/SettingOverrideDecorator.py +++ b/cura/Settings/SettingOverrideDecorator.py @@ -116,7 +116,8 @@ class SettingOverrideDecorator(SceneNodeDecorator): # Trigger slice/need slicing if the value has changed. self._is_non_printing_mesh = self._evaluateIsNonPrintingMesh() self._is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh() - + # Only calculate the bounding box of the mesh if it's an actual mesh (and not a helper) + self._node.setCalculateBoundingBox(not self._is_non_printing_mesh) Application.getInstance().getBackend().needsSlicing() Application.getInstance().getBackend().tickle() diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 3763db5534..fecf3d16bb 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -181,6 +181,8 @@ class SliceInfo(QObject, Extension): model = dict() model["hash"] = node.getMeshData().getHash() bounding_box = node.getBoundingBox() + if not bounding_box: + continue model["bounding_box"] = {"minimum": {"x": bounding_box.minimum.x, "y": bounding_box.minimum.y, "z": bounding_box.minimum.z},