Commit 5301e434 authored by Guillaume Seguin's avatar Guillaume Seguin

Change Z offsets in gcview to reduce clipping artifacts

parent 6f49adca
...@@ -67,6 +67,9 @@ class GcodeViewPanel(wxGLPanel): ...@@ -67,6 +67,9 @@ class GcodeViewPanel(wxGLPanel):
self.create_objects() self.create_objects()
glPushMatrix() glPushMatrix()
if self.orthographic:
glTranslatef(0, 0, -3 * self.dist) # Move back
else:
glTranslatef(0, 0, -self.dist) # Move back glTranslatef(0, 0, -self.dist) # Move back
glMultMatrixd(build_rotmatrix(self.basequat)) # Rotate according to trackball glMultMatrixd(build_rotmatrix(self.basequat)) # Rotate according to trackball
glTranslatef(- self.build_dimensions[3] - self.parent.platform.width/2, glTranslatef(- self.build_dimensions[3] - self.parent.platform.width/2,
......
...@@ -116,7 +116,7 @@ class wxGLPanel(wx.Panel): ...@@ -116,7 +116,7 @@ class wxGLPanel(wx.Panel):
glMatrixMode(GL_PROJECTION) glMatrixMode(GL_PROJECTION)
glLoadIdentity() glLoadIdentity()
if self.orthographic: if self.orthographic:
glOrtho(-width / 2, width / 2, -height / 2, height / 2, 0.1, 3 * self.dist) glOrtho(-width / 2, width / 2, -height / 2, height / 2, 0.1, 5 * self.dist)
else: else:
gluPerspective(60., float(width) / height, 10.0, 3 * self.dist) gluPerspective(60., float(width) / height, 10.0, 3 * self.dist)
glMatrixMode(GL_MODELVIEW) glMatrixMode(GL_MODELVIEW)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment