Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bigprint
twins-planner
Commits
91f924bf
Commit
91f924bf
authored
Feb 04, 2021
by
Jayant Khatkar
Browse files
bigfix script to bulk slice (
#64
)
parent
d7309533
Changes
1
Hide whitespace changes
Inline
Side-by-side
stls/bulk_slice.py
View file @
91f924bf
...
...
@@ -12,21 +12,24 @@ def slice_stls(filenames, out_address, config=default_config):
"""
gcodes
=
[]
for
f
in
filnames
:
for
f
in
fil
e
names
:
# create gcode file
object_name
=
f
.
split
(
'/'
)[
-
1
].
split
(
'.'
)[
0
]
out_fname
=
out_address
+
object_name
+
'.gcode'
command
=
'slic3r '
+
f
+
\
' --load '
+
config
+
\
' -o '
+
out_fname
sp
.
run
(
command
)
gcode
.
append
(
out_fname
)
sp
.
run
(
command
.
split
())
gcodes
.
append
(
out_fname
)
return
gcodes
if
__name__
==
'__main__'
:
# read stl files to slice
filenames
=
[
'cylinder.stl'
,
'flexirex.stl'
]
out
=
'./'
out
=
'.
./src/gcode/bulk
/'
# slice
slice_stls
(
filenames
,
out
)
gcode_files
=
slice_stls
(
filenames
,
out
)
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