Welcome! Log In Create A New Profile

Advanced

Question for advanced/Pro slic3r users

Posted by khannon3 
Question for advanced/Pro slic3r users
November 27, 2017 01:40PM
Hi Guys,

I'm looking for resources for batch slicing multiple models into a single .gcode file through the command line.

The Idea would be that files would be placed in folders in groups of 4, they would be automatically imported into slic3r and setup to print sequentially based and finally the .gcode would be exported (all through the command line)

Is this possible? Thanks in advance!

Regards,
Kevin
Re: Question for advanced/Pro slic3r users
November 27, 2017 03:10PM
Sounds to me not so much a Slic3r thing than a shell/batch file programming thing thing.

Worst case, you would write a program in some language or other (C, Java, C#, Python, Perl, whatever) to check the folder for the presence of the 4 files, run Slic3r with the appropriate command line settings, and perhaps post-process the 4 resulting G-code files into a single one.
Re: Question for advanced/Pro slic3r users
November 28, 2017 06:35AM
From the slic3r manual, it says you can slice multiple files into one gcode file with the command -

slic3r -m model1.stl model2.stl model3.stl

or under windows

slic3r-console -m model1.stl model2.stl model3.stl


See [manual.slic3r.org] for more details, like how to export your config first to make the command line simpler.


DC42 Kossel 330mm x 2meters
My Thingiverse Creations
Re: Question for advanced/Pro slic3r users
November 28, 2017 06:52AM
A quick vbs file to merge all files in a folder to get you started -


dim strSTLFolder
dim strGCodeFolder
dim PathtoSlic3r

strSTLFolder  = "c:\test\stl_files\"
strGCodeFolder= "c:\test\gcode_files\"
PathtoSlic3r  = "C:\test\Slic3r\slic3r-console.exe"


Set objFSO = CreateObject("Scripting.FileSystemObject")
objStartFolder = strSTLFolder
Set objFolder = objFSO.GetFolder(objStartFolder)

Set colFiles = objFolder.Files

tempFileNameList = ""

For Each objFile in colFiles
    tempFileNameList = tempFileNameList + strSTLFolder + objFile.Name + " "
Next

'Run Slic3r
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run PathtoSlic3r + " -m " + tempFileNameList + " --output " + strGCodeFolder + "outfilename.g"
Set oShell = Nothing


DC42 Kossel 330mm x 2meters
My Thingiverse Creations
Re: Question for advanced/Pro slic3r users
November 28, 2017 03:54PM
Won't that script just put the individual models in the same XYZ space. Slic3r won't be able to arrange them.
Re: Question for advanced/Pro slic3r users
November 28, 2017 09:49PM
Take a look at Pronterface/printrun one of the often missed tools is platter, can join slt's or gcode into single platter with an auto fit feature also (for stls')

(I haven't played with this for some time, looks like it changed lots)
Re: Question for advanced/Pro slic3r users
November 29, 2017 08:59AM
Quote
etfrench
Won't that script just put the individual models in the same XYZ space. Slic3r won't be able to arrange them.


Slic3r will auto arrange them, if you export your config with the sequential printing set and pass it on the command line it will print sequentially or you can add --complete-objects to the command line and optionally these two extra settings if you need more clearance than the default. Personally, I think it's easier just to export the config as you want it.


--extruder-clearance-radius Radius in mm above which extruder won't collide with anything(default: 20)
--extruder-clearance-height Maximum vertical extruder depth; i.e. vertical distance from extruder tip and carriage bottom (default: 20)


DC42 Kossel 330mm x 2meters
My Thingiverse Creations
Sorry, only registered users may post in this forum.

Click here to login