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
681768dd
Commit
681768dd
authored
Jun 10, 2012
by
Gary Hodgson
Committed by
Guillaume Seguin
May 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed Abort button to Pause/Continue. Closing control window also closes present window.
parent
9ae3f33d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
projectlayer.py
projectlayer.py
+14
-8
No files found.
projectlayer.py
View file @
681768dd
...
...
@@ -99,19 +99,16 @@ class dispframe(wx.Frame):
def
showimgdelay
(
self
,
image
):
self
.
drawlayer
(
image
,
self
.
slicer
)
print
"showing"
self
.
pic
.
Show
()
self
.
Refresh
()
def
rise
(
self
):
print
"raising"
if
self
.
p
!=
None
and
self
.
p
.
online
:
self
.
p
.
send_now
(
"G91"
)
self
.
p
.
send_now
(
"G1 Z
%
f F250"
%
(
self
.
thickness
,))
self
.
p
.
send_now
(
"G90"
)
def
hidePic
(
self
):
print
"hiding"
self
.
pic
.
Hide
()
self
.
rise
()
...
...
@@ -204,14 +201,16 @@ class setframe(wx.Frame):
self
.
projectedXmm
=
floatspin
.
FloatSpin
(
self
.
panel
,
-
1
,
pos
=
(
rightValueXPos
+
40
,
210
),
value
=
150.0
,
increment
=
1
,
digits
=
1
)
self
.
projectedXmm
.
Bind
(
floatspin
.
EVT_FLOATSPIN
,
self
.
updateprojectedXmm
)
self
.
abort
=
wx
.
Button
(
self
.
panel
,
-
1
,
"Abort!
"
,
pos
=
(
leftlabelXPos
,
180
))
self
.
abort
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
abort
Present
)
self
.
pause
=
wx
.
Button
(
self
.
panel
,
-
1
,
"Pause
"
,
pos
=
(
leftlabelXPos
,
180
))
self
.
pause
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
pause
Present
)
self
.
Show
()
def
__del__
(
self
):
if
hasattr
(
self
,
'image_dir'
)
and
self
.
image_dir
!=
''
:
shutil
.
rmtree
(
self
.
image_dir
)
if
self
.
f
:
self
.
f
.
Destroy
()
def
parsesvg
(
self
,
name
):
et
=
xml
.
etree
.
ElementTree
.
ElementTree
(
file
=
name
)
...
...
@@ -359,9 +358,16 @@ class setframe(wx.Frame):
size
=
(
float
(
self
.
X
.
GetValue
()),
float
(
self
.
Y
.
GetValue
())),
offset
=
(
float
(
self
.
offsetX
.
GetValue
()),
float
(
self
.
offsetY
.
GetValue
())))
def
abortPresent
(
self
,
event
):
print
"Abort"
self
.
f
.
timer
.
Stop
()
def
pausePresent
(
self
,
event
):
if
self
.
f
.
timer
.
IsRunning
():
print
"Pause"
self
.
pause
.
SetLabel
(
"Continue"
)
self
.
f
.
timer
.
Stop
()
else
:
print
"Continue"
self
.
pause
.
SetLabel
(
"Pause"
)
self
.
f
.
timer
.
Start
()
if
__name__
==
"__main__"
:
#a = wx.App(redirect=True,filename="mylogfile.txt")
...
...
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