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
5301e434
Commit
5301e434
authored
Jul 09, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change Z offsets in gcview to reduce clipping artifacts
parent
6f49adca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
gcview.py
printrun/gcview.py
+4
-1
panel.py
printrun/gl/panel.py
+1
-1
No files found.
printrun/gcview.py
View file @
5301e434
...
@@ -67,7 +67,10 @@ class GcodeViewPanel(wxGLPanel):
...
@@ -67,7 +67,10 @@ class GcodeViewPanel(wxGLPanel):
self
.
create_objects
()
self
.
create_objects
()
glPushMatrix
()
glPushMatrix
()
glTranslatef
(
0
,
0
,
-
self
.
dist
)
# Move back
if
self
.
orthographic
:
glTranslatef
(
0
,
0
,
-
3
*
self
.
dist
)
# Move back
else
:
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
,
-
self
.
build_dimensions
[
4
]
-
self
.
parent
.
platform
.
depth
/
2
,
0
)
# Move origin to bottom left of platform
-
self
.
build_dimensions
[
4
]
-
self
.
parent
.
platform
.
depth
/
2
,
0
)
# Move origin to bottom left of platform
...
...
printrun/gl/panel.py
View file @
5301e434
...
@@ -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
)
...
...
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