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
e933369d
Commit
e933369d
authored
Nov 05, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass home position go gcoder.GCode instances
parent
12d32a2b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
gcview.py
printrun/gcview.py
+2
-2
gviz.py
printrun/gviz.py
+3
-3
pronsole.py
printrun/pronsole.py
+2
-1
pronterface.py
printrun/pronterface.py
+4
-2
No files found.
printrun/gcview.py
View file @
e933369d
...
...
@@ -30,7 +30,7 @@ from pyglet.gl import *
from
.gviz
import
GvizBaseFrame
from
printrun_utils
import
imagefile
,
install_locale
from
printrun_utils
import
imagefile
,
install_locale
,
get_home_pos
install_locale
(
'pronterface'
)
def
create_model
(
light
):
...
...
@@ -381,7 +381,7 @@ if __name__ == "__main__":
title
=
'Gcode view, shift to move view, mousewheel to set layer'
frame
=
GcodeViewFrame
(
None
,
wx
.
ID_ANY
,
title
,
size
=
(
400
,
400
),
build_dimensions
=
build_dimensions
)
gcode
=
gcoder
.
GCode
(
open
(
sys
.
argv
[
1
]))
gcode
=
gcoder
.
GCode
(
open
(
sys
.
argv
[
1
])
,
get_home_pos
(
build_dimensions
)
)
frame
.
addfile
(
gcode
)
first_move
=
None
...
...
printrun/gviz.py
View file @
e933369d
...
...
@@ -19,7 +19,7 @@ import wx
import
time
from
printrun
import
gcoder
from
printrun_utils
import
imagefile
,
install_locale
from
printrun_utils
import
imagefile
,
install_locale
,
get_home_pos
install_locale
(
'pronterface'
)
class
GvizBaseFrame
(
wx
.
Frame
):
...
...
@@ -93,7 +93,7 @@ class GvizWindow(GvizBaseFrame):
self
.
Bind
(
wx
.
EVT_MOUSE_EVENTS
,
self
.
mouse
)
if
f
:
gcode
=
gcoder
.
GCode
(
f
)
gcode
=
gcoder
.
GCode
(
f
,
get_home_pos
(
self
.
p
.
build_dimensions
)
)
self
.
p
.
addfile
(
gcode
)
def
set_current_gline
(
self
,
gline
):
...
...
@@ -217,7 +217,7 @@ class Gviz(wx.Panel):
def
clear
(
self
):
self
.
lastpos
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
self
.
hilightpos
=
self
.
lastpos
[:]
self
.
gcoder
=
gcoder
.
GCode
([])
self
.
gcoder
=
gcoder
.
GCode
([]
,
get_home_pos
(
self
.
build_dimensions
)
)
self
.
lines
=
{}
self
.
pens
=
{}
self
.
arcs
=
{}
...
...
printrun/pronsole.py
View file @
e933369d
...
...
@@ -894,7 +894,8 @@ class pronsole(cmd.Cmd):
if
not
os
.
path
.
exists
(
filename
):
self
.
logError
(
"File not found!"
)
return
self
.
fgcode
=
gcoder
.
GCode
(
open
(
filename
,
"rU"
))
self
.
fgcode
=
gcoder
.
GCode
(
open
(
filename
,
"rU"
),
get_home_pos
(
self
.
build_dimensions_list
))
self
.
filename
=
filename
self
.
log
(
"Loaded
%
s,
%
d lines."
%
(
filename
,
len
(
self
.
fgcode
)))
...
...
printrun/pronterface.py
View file @
e933369d
...
...
@@ -1525,7 +1525,8 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
fn
=
self
.
filename
try
:
self
.
filename
=
self
.
model_to_gcode_filename
(
self
.
filename
)
self
.
fgcode
=
gcoder
.
GCode
(
open
(
self
.
filename
,
"rU"
))
self
.
fgcode
=
gcoder
.
GCode
(
open
(
self
.
filename
,
"rU"
),
get_home_pos
(
self
.
build_dimensions_list
))
if
self
.
p
.
online
:
wx
.
CallAfter
(
self
.
printbtn
.
Enable
)
...
...
@@ -1595,7 +1596,8 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
self
.
skein
(
name
)
else
:
self
.
filename
=
name
self
.
fgcode
=
gcoder
.
GCode
(
open
(
self
.
filename
,
"rU"
))
self
.
fgcode
=
gcoder
.
GCode
(
open
(
self
.
filename
,
"rU"
),
get_home_pos
(
self
.
build_dimensions_list
))
self
.
statusbar
.
SetStatusText
(
_
(
"Loaded
%
s,
%
d lines"
)
%
(
name
,
len
(
self
.
fgcode
)))
print
_
(
"Loaded
%
s,
%
d lines"
)
%
(
name
,
len
(
self
.
fgcode
))
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
_
(
"Print"
))
...
...
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