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
accdf5e8
Commit
accdf5e8
authored
Jun 15, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve naming of gviz members: gviz->Gviz, window->GvizWindow
parent
2bbc80ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
gui.py
printrun/gui.py
+2
-2
gviz.py
printrun/gviz.py
+4
-4
No files found.
printrun/gui.py
View file @
accdf5e8
...
...
@@ -266,7 +266,7 @@ class VizPane(wx.BoxSizer):
print
"Falling back to 2D view, and here is the backtrace:"
traceback
.
print_exc
()
if
use2dview
:
root
.
gviz
=
gviz
.
g
viz
(
parentpanel
,
(
300
,
300
),
root
.
gviz
=
gviz
.
G
viz
(
parentpanel
,
(
300
,
300
),
build_dimensions
=
root
.
build_dimensions_list
,
grid
=
(
root
.
settings
.
preview_grid_step1
,
root
.
settings
.
preview_grid_step2
),
extrusion_width
=
root
.
settings
.
preview_extrusion_width
,
...
...
@@ -288,7 +288,7 @@ class VizPane(wx.BoxSizer):
print
"Falling back to 2D view, and here is the backtrace:"
traceback
.
print_exc
()
if
not
use3dview
:
root
.
gwindow
=
gviz
.
w
indow
([],
root
.
gwindow
=
gviz
.
GvizW
indow
([],
build_dimensions
=
root
.
build_dimensions_list
,
grid
=
(
root
.
settings
.
preview_grid_step1
,
root
.
settings
.
preview_grid_step2
),
extrusion_width
=
root
.
settings
.
preview_extrusion_width
,
...
...
printrun/gviz.py
View file @
accdf5e8
...
...
@@ -22,7 +22,7 @@ from printrun_utils import imagefile
ID_ABOUT
=
101
ID_EXIT
=
110
class
w
indow
(
wx
.
Frame
):
class
GvizW
indow
(
wx
.
Frame
):
def
__init__
(
self
,
f
,
size
=
(
600
,
600
),
build_dimensions
=
[
200
,
200
,
100
,
0
,
0
,
0
],
grid
=
(
10
,
50
),
extrusion_width
=
0.5
,
bgcolor
=
"#000000"
):
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Gcode view, shift to move view, mousewheel to set layer"
,
size
=
size
)
...
...
@@ -30,7 +30,7 @@ class window(wx.Frame):
self
.
SetStatusText
(
"Layer number and Z position show here when you scroll"
);
panel
=
wx
.
Panel
(
self
,
-
1
)
self
.
p
=
g
viz
(
panel
,
size
=
size
,
build_dimensions
=
build_dimensions
,
grid
=
grid
,
extrusion_width
=
extrusion_width
,
bgcolor
=
bgcolor
,
realparent
=
self
)
self
.
p
=
G
viz
(
panel
,
size
=
size
,
build_dimensions
=
build_dimensions
,
grid
=
grid
,
extrusion_width
=
extrusion_width
,
bgcolor
=
bgcolor
,
realparent
=
self
)
vbox
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
toolbar
=
wx
.
ToolBar
(
panel
,
-
1
,
style
=
wx
.
TB_HORIZONTAL
|
wx
.
NO_BORDER
)
...
...
@@ -116,7 +116,7 @@ class window(wx.Frame):
if
z
>
0
:
self
.
p
.
zoom
(
event
.
GetX
(),
event
.
GetY
(),
1.2
)
elif
z
<
0
:
self
.
p
.
zoom
(
event
.
GetX
(),
event
.
GetY
(),
1
/
1.2
)
class
g
viz
(
wx
.
Panel
):
class
G
viz
(
wx
.
Panel
):
# Mark canvas as dirty when setting showall
_showall
=
0
...
...
@@ -474,6 +474,6 @@ class gviz(wx.Panel):
if
__name__
==
'__main__'
:
import
sys
app
=
wx
.
App
(
False
)
main
=
w
indow
(
open
(
sys
.
argv
[
1
]))
main
=
GvizW
indow
(
open
(
sys
.
argv
[
1
]))
main
.
Show
()
app
.
MainLoop
()
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