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
80194da7
Commit
80194da7
authored
May 29, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental' of github.com:kliment/Printrun into experimental
parents
1b8aaff8
91ffeb24
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
198 additions
and
53 deletions
+198
-53
plater.py
plater.py
+4
-1
gcoder.py
printrun/gcoder.py
+9
-9
graph.py
printrun/graph.py
+169
-31
pronsole.py
pronsole.py
+2
-0
pronterface.py
pronterface.py
+14
-12
No files found.
plater.py
View file @
80194da7
...
@@ -244,6 +244,9 @@ class showstl(wx.Window):
...
@@ -244,6 +244,9 @@ class showstl(wx.Window):
class
stlwin
(
wx
.
Frame
):
class
stlwin
(
wx
.
Frame
):
def
__init__
(
self
,
size
=
(
800
,
580
),
callback
=
None
,
parent
=
None
):
def
__init__
(
self
,
size
=
(
800
,
580
),
callback
=
None
,
parent
=
None
):
wx
.
Frame
.
__init__
(
self
,
parent
,
title
=
_
(
"Plate building tool"
),
size
=
size
)
wx
.
Frame
.
__init__
(
self
,
parent
,
title
=
_
(
"Plate building tool"
),
size
=
size
)
if
hasattr
(
sys
,
"frozen"
)
and
sys
.
frozen
==
"windows_exe"
:
self
.
SetIcon
(
wx
.
Icon
(
sys
.
executable
,
wx
.
BITMAP_TYPE_ICO
))
else
:
self
.
SetIcon
(
wx
.
Icon
(
pixmapfile
(
"plater.ico"
),
wx
.
BITMAP_TYPE_ICO
))
self
.
SetIcon
(
wx
.
Icon
(
pixmapfile
(
"plater.ico"
),
wx
.
BITMAP_TYPE_ICO
))
self
.
mainsizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
self
.
mainsizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
self
.
panel
=
wx
.
Panel
(
self
,
-
1
,
size
=
(
150
,
600
),
pos
=
(
0
,
0
))
self
.
panel
=
wx
.
Panel
(
self
,
-
1
,
size
=
(
150
,
600
),
pos
=
(
0
,
0
))
...
...
printrun/gcoder.py
View file @
80194da7
...
@@ -314,15 +314,15 @@ class GCode(object):
...
@@ -314,15 +314,15 @@ class GCode(object):
zmin
=
min
(
zm
,
zmin
)
zmin
=
min
(
zm
,
zmin
)
zmax
=
max
(
zM
,
zmax
)
zmax
=
max
(
zM
,
zmax
)
self
.
xmin
=
xmin
self
.
xmin
=
xmin
if
not
math
.
isinf
(
xmin
)
else
0
self
.
xmax
=
xmax
self
.
xmax
=
xmax
if
not
math
.
isinf
(
xmax
)
else
0
self
.
ymin
=
ymin
self
.
ymin
=
ymin
if
not
math
.
isinf
(
ymin
)
else
0
self
.
ymax
=
ymax
self
.
ymax
=
ymax
if
not
math
.
isinf
(
ymax
)
else
0
self
.
zmin
=
zmin
self
.
zmin
=
zmin
if
not
math
.
isinf
(
zmin
)
else
0
self
.
zmax
=
zmax
self
.
zmax
=
zmax
if
not
math
.
isinf
(
zmax
)
else
0
self
.
width
=
xmax
-
xmin
self
.
width
=
self
.
xmax
-
self
.
xmin
self
.
depth
=
ymax
-
ymin
self
.
depth
=
self
.
ymax
-
self
.
ymin
self
.
height
=
zmax
-
zmin
self
.
height
=
self
.
zmax
-
self
.
zmin
def
estimate_duration
(
self
):
def
estimate_duration
(
self
):
lastx
=
lasty
=
lastz
=
laste
=
lastf
=
0.0
lastx
=
lasty
=
lastz
=
laste
=
lastf
=
0.0
...
...
printrun/graph.py
View file @
80194da7
This diff is collapsed.
Click to expand it.
pronsole.py
View file @
80194da7
...
@@ -608,6 +608,8 @@ class pronsole(cmd.Cmd):
...
@@ -608,6 +608,8 @@ class pronsole(cmd.Cmd):
self
.
processing_rc
=
False
self
.
processing_rc
=
False
def
load_default_rc
(
self
,
rc_filename
=
".pronsolerc"
):
def
load_default_rc
(
self
,
rc_filename
=
".pronsolerc"
):
if
rc_filename
==
".pronsolerc"
and
hasattr
(
sys
,
"frozen"
)
and
sys
.
frozen
in
[
"windows_exe"
,
"console_exe"
]:
rc_filename
=
"printrunconf.ini"
try
:
try
:
try
:
try
:
self
.
load_rc
(
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
rc_filename
))
self
.
load_rc
(
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
rc_filename
))
...
...
pronterface.py
View file @
80194da7
...
@@ -196,6 +196,9 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -196,6 +196,9 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self
.
filename
=
filename
self
.
filename
=
filename
os
.
putenv
(
"UBUNTU_MENUPROXY"
,
"0"
)
os
.
putenv
(
"UBUNTU_MENUPROXY"
,
"0"
)
MainWindow
.
__init__
(
self
,
None
,
title
=
_
(
"Printer Interface"
),
size
=
size
);
MainWindow
.
__init__
(
self
,
None
,
title
=
_
(
"Printer Interface"
),
size
=
size
);
if
hasattr
(
sys
,
"frozen"
)
and
sys
.
frozen
==
"windows_exe"
:
self
.
SetIcon
(
wx
.
Icon
(
sys
.
executable
,
wx
.
BITMAP_TYPE_ICO
))
else
:
self
.
SetIcon
(
wx
.
Icon
(
pixmapfile
(
"P-face.ico"
),
wx
.
BITMAP_TYPE_ICO
))
self
.
SetIcon
(
wx
.
Icon
(
pixmapfile
(
"P-face.ico"
),
wx
.
BITMAP_TYPE_ICO
))
self
.
panel
=
wx
.
Panel
(
self
,
-
1
,
size
=
size
)
self
.
panel
=
wx
.
Panel
(
self
,
-
1
,
size
=
size
)
...
@@ -1367,19 +1370,18 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1367,19 +1370,18 @@ class PronterWindow(MainWindow, pronsole.pronsole):
basedir
=
os
.
path
.
split
(
self
.
filename
)[
0
]
basedir
=
os
.
path
.
split
(
self
.
filename
)[
0
]
except
:
except
:
pass
pass
dlg
=
None
dlg
=
None
if
filename
is
None
:
if
filename
is
None
:
dlg
=
wx
.
FileDialog
(
self
,
_
(
"Open file to print"
),
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
=
wx
.
FileDialog
(
self
,
_
(
"Open file to print"
),
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
.
SetWildcard
(
_
(
"OBJ, STL, and GCODE files (*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ)|*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ|All Files (*.*)|*.*"
))
dlg
.
SetWildcard
(
_
(
"OBJ, STL, and GCODE files (*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ)|*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ|All Files (*.*)|*.*"
))
if
(
filename
is
not
None
or
dlg
.
ShowModal
()
==
wx
.
ID_OK
)
:
if
filename
or
dlg
.
ShowModal
()
==
wx
.
ID_OK
:
if
filename
is
not
None
:
if
filename
:
name
=
filename
name
=
filename
else
:
else
:
name
=
dlg
.
GetPath
()
name
=
dlg
.
GetPath
()
if
not
(
os
.
path
.
exists
(
name
)):
self
.
status
.
SetStatusText
(
_
(
"File not found!"
))
if
dlg
is
not
None
:
dlg
.
Destroy
()
dlg
.
Destroy
()
if
not
os
.
path
.
exists
(
name
):
self
.
status
.
SetStatusText
(
_
(
"File not found!"
))
return
return
path
=
os
.
path
.
split
(
name
)[
0
]
path
=
os
.
path
.
split
(
name
)[
0
]
if
path
!=
self
.
settings
.
last_file_path
:
if
path
!=
self
.
settings
.
last_file_path
:
...
@@ -1400,7 +1402,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1400,7 +1402,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
if
self
.
p
.
online
:
if
self
.
p
.
online
:
wx
.
CallAfter
(
self
.
printbtn
.
Enable
)
wx
.
CallAfter
(
self
.
printbtn
.
Enable
)
threading
.
Thread
(
target
=
self
.
loadviz
)
.
start
()
threading
.
Thread
(
target
=
self
.
loadviz
)
.
start
()
if
dlg
is
not
Non
e
:
els
e
:
dlg
.
Destroy
()
dlg
.
Destroy
()
def
loadviz
(
self
):
def
loadviz
(
self
):
...
...
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