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
ca5a690c
Commit
ca5a690c
authored
Oct 20, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP #580: fix Done button in gcodeplater
Also cleanup a minor detail in stl plater
parent
db06b987
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
gcodeplater.py
printrun/gcodeplater.py
+11
-0
stlplater.py
printrun/stlplater.py
+1
-3
No files found.
printrun/gcodeplater.py
View file @
ca5a690c
...
...
@@ -22,6 +22,8 @@ install_locale('pronterface')
import
wx
import
sys
import
os
import
time
import
types
import
re
import
math
...
...
@@ -108,6 +110,15 @@ class GcodePlater(Plater):
self
.
add_model
(
filename
,
obj
)
wx
.
CallAfter
(
self
.
Refresh
)
def
done
(
self
,
event
,
cb
):
if
not
os
.
path
.
exists
(
"tempgcode"
):
os
.
mkdir
(
"tempgcode"
)
name
=
"tempgcode/"
+
str
(
int
(
time
.
time
())
%
10000
)
+
".gcode"
self
.
export_to
(
name
)
if
cb
is
not
None
:
cb
(
name
)
self
.
Destroy
()
# What's hard in there ?
# 1) [x] finding the order in which the objects are printed
# 2) [x] handling layers correctly
...
...
printrun/stlplater.py
View file @
ca5a690c
...
...
@@ -362,10 +362,8 @@ class StlPlater(Plater):
wx
.
CallAfter
(
self
.
Refresh
)
def
done
(
self
,
event
,
cb
):
try
:
if
not
os
.
path
.
exists
(
"tempstl"
)
:
os
.
mkdir
(
"tempstl"
)
except
:
pass
name
=
"tempstl/"
+
str
(
int
(
time
.
time
())
%
10000
)
+
".stl"
self
.
export_to
(
name
)
if
cb
is
not
None
:
...
...
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