From: daid303 Date: Fri, 15 Feb 2013 10:32:25 +0000 (+0100) Subject: Small fix for the object cutoff function. X-Git-Tag: 13.03~45 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2561b3e4e8600ac6aaa9f5a7ac592b0be8c5bfaf;p=cura.git Small fix for the object cutoff function. --- 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()