From 2561b3e4e8600ac6aaa9f5a7ac592b0be8c5bfaf Mon Sep 17 00:00:00 2001 From: daid303 Date: Fri, 15 Feb 2013 11:32:25 +0100 Subject: [PATCH] Small fix for the object cutoff function. --- Cura/gui/preview3d.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cura/gui/preview3d.py b/Cura/gui/preview3d.py index 9c63fa7e..eaf8fd5a 100644 --- a/Cura/gui/preview3d.py +++ b/Cura/gui/preview3d.py @@ -634,7 +634,7 @@ class PreviewGLCanvas(openglGui.glGuiPanel): return self.parent.matrix def getObjectCenterPos(self): - return [self.parent.machineCenter.x, self.parent.machineCenter.y, self.parent.objectsSize[2] / 2] + return [self.parent.machineCenter.x, self.parent.machineCenter.y, self.parent.objectsSize[2] / 2 - profile.getProfileSettingFloat('object_sink')] def OnMouseWheel(self,e): self.zoom *= 1.0 - float(e.GetWheelRotation() / e.GetWheelDelta()) / 10.0 @@ -852,7 +852,8 @@ class PreviewGLCanvas(openglGui.glGuiPanel): #Draw the current selected tool if self.parent.objectsMaxV is not None and self.viewMode != 'GCode' and self.viewMode != 'Mixed': glPushMatrix() - glTranslate(self.parent.machineCenter.x, self.parent.machineCenter.y, self.parent.objectsSize[2]/2) + pos = self.getObjectCenterPos() + glTranslate(pos[0], pos[1], pos[2]) self.parent.tool.OnDraw() glPopMatrix() -- 2.30.2