Commit 91f924bf authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

bigfix script to bulk slice (#64)

parent d7309533
......@@ -12,21 +12,24 @@ def slice_stls(filenames, out_address, config=default_config):
"""
gcodes = []
for f in filnames:
for f in filenames:
# 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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment