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
260d6564
Commit
260d6564
authored
May 16, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gviz.py __main__
parent
9dec5488
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
gviz.py
printrun/gviz.py
+7
-2
No files found.
printrun/gviz.py
View file @
260d6564
...
...
@@ -13,6 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
import
wx
,
time
from
printrun
import
gcoder
from
printrun_utils
import
imagefile
...
...
@@ -23,6 +24,10 @@ class window(wx.Frame):
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Gcode view, shift to move view, mousewheel to set layer"
,
size
=
(
size
[
0
],
size
[
1
]))
self
.
p
=
gviz
(
self
,
size
=
size
,
build_dimensions
=
build_dimensions
,
grid
=
grid
,
extrusion_width
=
extrusion_width
)
if
f
:
gcode
=
gcoder
.
GCode
(
f
)
self
.
p
.
addfile
(
gcode
)
vbox
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
toolbar
=
wx
.
ToolBar
(
self
,
-
1
,
style
=
wx
.
TB_HORIZONTAL
|
wx
.
NO_BORDER
)
toolbar
.
AddSimpleTool
(
1
,
wx
.
Image
(
imagefile
(
'zoom_in.png'
),
wx
.
BITMAP_TYPE_PNG
)
.
ConvertToBitmap
(),
'Zoom In [+]'
,
''
)
...
...
@@ -443,8 +448,8 @@ class gviz(wx.Panel):
self
.
dirty
=
1
if
__name__
==
'__main__'
:
import
sys
app
=
wx
.
App
(
False
)
#main = window(open("/home/kliment/designs/spinner/arm_export.gcode"))
main
=
window
(
open
(
"jam.gcode"
))
main
=
window
(
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