Fix up BuildVolume's override of the AABB.

Contributes to CURA-1504
This commit is contained in:
Simon Edwards 2016-05-12 13:12:44 +02:00
parent 7aefb67172
commit 43747f3f57
2 changed files with 5 additions and 5 deletions

View File

@ -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()

View File

@ -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