Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
12da0a83
Commit
12da0a83
authored
Aug 01, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve zeroing of Ortho/Perspective modes
parent
6da508a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
gcview.py
printrun/gcview.py
+0
-4
panel.py
printrun/gl/panel.py
+4
-2
No files found.
printrun/gcview.py
View file @
12da0a83
...
...
@@ -88,10 +88,6 @@ class GcodeViewPanel(wxGLPanel):
self
.
create_objects
()
glPushMatrix
()
if
self
.
orthographic
:
glTranslatef
(
0
,
0
,
-
3
*
self
.
dist
)
# Move back
else
:
glTranslatef
(
0
,
0
,
-
self
.
dist
)
# Move back
# Rotate according to trackball
glMultMatrixd
(
build_rotmatrix
(
self
.
basequat
))
# Move origin to bottom left of platform
...
...
printrun/gl/panel.py
View file @
12da0a83
...
...
@@ -23,7 +23,7 @@ pyglet.options['debug_gl'] = True
from
pyglet.gl
import
*
from
pyglet
import
gl
from
.trackball
import
trackball
,
mulquat
from
.trackball
import
trackball
,
mulquat
,
build_rotmatrix
class
wxGLPanel
(
wx
.
Panel
):
'''A simple class for using OpenGL with wxPython.'''
...
...
@@ -119,9 +119,11 @@ class wxGLPanel(wx.Panel):
glMatrixMode
(
GL_PROJECTION
)
glLoadIdentity
()
if
self
.
orthographic
:
glOrtho
(
-
width
/
2
,
width
/
2
,
-
height
/
2
,
height
/
2
,
0.1
,
5
*
self
.
dist
)
glOrtho
(
-
width
/
2
,
width
/
2
,
-
height
/
2
,
height
/
2
,
-
5
*
self
.
dist
,
5
*
self
.
dist
)
else
:
gluPerspective
(
60.
,
float
(
width
)
/
height
,
10.0
,
3
*
self
.
dist
)
glTranslatef
(
0
,
0
,
-
self
.
dist
)
# Move back
glMatrixMode
(
GL_MODELVIEW
)
if
not
self
.
mview_initialized
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment