diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index e700b8d7be..7072533ab9 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -36,6 +36,7 @@ class BuildVolume(SceneNode): self._disallowed_area_mesh = None self.setCalculateBoundingBox(False) + self._volume_aabb = None self._active_profile = None self._active_instance = None @@ -144,7 +145,7 @@ class BuildVolume(SceneNode): else: self._disallowed_area_mesh = None - self._aabb = AxisAlignedBox(minimum = Vector(min_w, min_h - 1.0, min_d), maximum = Vector(max_w, max_h, max_d)) + self._volume_aabb = AxisAlignedBox(minimum = Vector(min_w, min_h - 1.0, min_d), maximum = Vector(max_w, max_h, max_d)) skirt_size = 0.0 @@ -162,6 +163,9 @@ class BuildVolume(SceneNode): Application.getInstance().getController().getScene()._maximum_bounds = scale_to_max_bounds + def getBoundingBox(self): + return self._volume_aabb + def _onActiveInstanceChanged(self): self._active_instance = Application.getInstance().getMachineManager().getActiveMachineInstance() diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index e2bca741a3..7b2a47eef5 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -27,7 +27,6 @@ class PlatformPhysics: self._controller.toolOperationStarted.connect(self._onToolOperationStarted) self._controller.toolOperationStopped.connect(self._onToolOperationStopped) self._build_volume = volume - self._enabled = True self._change_timer = QTimer() @@ -50,9 +49,6 @@ class PlatformPhysics: continue bbox = node.getBoundingBox() - if not bbox or not bbox.isValid(): - self._change_timer.start() - continue build_volume_bounding_box = copy.deepcopy(self._build_volume.getBoundingBox()) build_volume_bounding_box.setBottom(-9001) # Ignore intersections with the bottom