Setting one at a time mode now decreases size of build volume

CURA-1245 CURA-1224
This commit is contained in:
Jaime van Kessel 2016-03-25 10:59:11 +01:00
parent 6c2878221d
commit 99de21fba7
3 changed files with 15 additions and 11 deletions

View file

@ -165,7 +165,10 @@ class BuildVolume(SceneNode):
if self._active_instance:
self._width = self._active_instance.getMachineSettingValue("machine_width")
self._height = self._active_instance.getMachineSettingValue("machine_height")
if Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("print_sequence") == "one_at_a_time":
self._height = Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("gantry_height")
else:
self._height = self._active_instance.getMachineSettingValue("machine_depth")
self._depth = self._active_instance.getMachineSettingValue("machine_depth")
self._updateDisallowedAreas()
@ -182,11 +185,19 @@ class BuildVolume(SceneNode):
self._updateDisallowedAreas()
self.rebuild()
def _onSettingValueChanged(self, setting):
if setting in self._skirt_settings:
def _onSettingValueChanged(self, setting_key):
if setting_key == "print_sequence":
if Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("print_sequence") == "one_at_a_time":
self._height = Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("gantry_height")
else:
self._height = self._active_instance.getMachineSettingValue("machine_depth")
self.rebuild()
if setting_key in self._skirt_settings:
self._updateDisallowedAreas()
self.rebuild()
def _updateDisallowedAreas(self):
if not self._active_instance or not self._active_profile:
return

View file

@ -89,6 +89,4 @@ class ConvexHullNode(SceneNode):
self._color = Color(35, 35, 35, 0.5)
if not node:
return
return

View file

@ -65,11 +65,6 @@ class PlatformPhysics:
# Mark the node as outside the build volume if the bounding box test fails.
if build_volume_bounding_box.intersectsBox(bbox) != AxisAlignedBox.IntersectionResult.FullIntersection:
node._outside_buildarea = True
else:
# When printing one at a time too high objects are not printable.
if Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("print_sequence") == "one_at_a_time":
if node.getBoundingBox().height > Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("gantry_height"):
node._outside_buildarea = True
# Move it downwards if bottom is above platform
move_vector = Vector()