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
4c33a905
Commit
4c33a905
authored
Jun 01, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'kliment/master'
parents
19ec2502
41c4f604
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
pronsole.py
pronsole.py
+45
-0
No files found.
pronsole.py
View file @
4c33a905
...
@@ -610,6 +610,51 @@ class pronsole(cmd.Cmd):
...
@@ -610,6 +610,51 @@ class pronsole(cmd.Cmd):
print
"monitor - Reports temperature and SD print status (if SD printing) every 5 seconds"
print
"monitor - Reports temperature and SD print status (if SD printing) every 5 seconds"
print
"monitor 2 - Reports temperature and SD print status (if SD printing) every 2 seconds"
print
"monitor 2 - Reports temperature and SD print status (if SD printing) every 2 seconds"
def
do_skein
(
self
,
l
):
l
=
l
.
split
()
if
len
(
l
)
==
0
:
print
"No file name given."
return
print
"Skeining file:"
+
l
[
0
]
if
not
(
os
.
path
.
exists
(
l
[
0
])):
print
"File not found!"
return
if
not
os
.
path
.
exists
(
"skeinforge"
):
print
"Skeinforge not found.
\n
Please copy Skeinforge into a directory named
\"
skeinforge
\"
in the same directory as this file."
return
if
not
os
.
path
.
exists
(
"skeinforge/__init__.py"
):
with
open
(
"skeinforge/__init__.py"
,
"w"
):
pass
try
:
from
skeinforge.skeinforge_application.skeinforge_utilities
import
skeinforge_craft
if
(
len
(
l
)
>
1
):
if
(
l
[
1
]
==
"view"
):
skeinforge_craft
.
writeOutput
(
l
[
0
],
True
)
else
:
skeinforge_craft
.
writeOutput
(
l
[
0
],
False
)
else
:
skeinforge_craft
.
writeOutput
(
l
[
0
],
False
)
print
"Loading skeined file."
self
.
do_load
(
l
[
0
]
.
replace
(
".stl"
,
"_export.gcode"
))
except
:
print
"Skeinforge execution failed."
raise
def
complete_skein
(
self
,
text
,
line
,
begidx
,
endidx
):
s
=
line
.
split
()
if
len
(
s
)
>
2
:
return
[]
if
(
len
(
s
)
==
1
and
line
[
-
1
]
==
" "
)
or
(
len
(
s
)
==
2
and
line
[
-
1
]
!=
" "
):
if
len
(
s
)
>
1
:
return
[
i
[
len
(
s
[
1
])
-
len
(
text
):]
for
i
in
glob
.
glob
(
s
[
1
]
+
"*/"
)
+
glob
.
glob
(
s
[
1
]
+
"*.stl"
)]
else
:
return
glob
.
glob
(
"*/"
)
+
glob
.
glob
(
"*.stl"
)
def
help_skein
(
self
):
print
"Creates a gcode file from an stl model using skeinforge (with tab-completion)"
print
"skein filename.stl - create gcode file"
print
"skein filename.stl view - create gcode file and view using skeiniso"
interp
=
pronsole
()
interp
=
pronsole
()
try
:
try
:
...
...
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