Slic3r Workbench

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
User avatar
limikael
Posts: 16
Joined: Sat Aug 26, 2017 6:30 am

Slic3r Workbench

Postby limikael » Mon May 13, 2019 6:41 am

Hi,

I would like to announce my little Slic3r Workbench, it helps you to work use FreeCAD and Slic3r for 3D printing, without having to manually go through the many clicks of exporting and running Slic3r manually. It is here:

https://github.com/limikael/freecad-slic3r-tools

I created it to have a more convenient workflow when using FreeCAD to design things for 3D printing. It's features are somewhat opinionated, so would love some feedback! It basically has four functions:

* Export current document as .STL file. This function works with visible objects, rather than selected objects. I like it better that way. Doing a quick search for freecad export visible objects seems to suggest that there are also other people who like this, but it might not be what everyone likes. What do you think? Also, there is no prompt for a filename but instead it chooses the directory and filename based on the FreeCAD document. I.e., if your document is called part.FCStd, the stl file will automatically be called part.stl and will be saved in the same directory. This is also by design, because I think it keeps things organised. It is analogous to how a compiler works, if there is a C file called function.c, then it will be compiled to function.o. But maybe this is not how everyone likes it either? Please let me know!

* Open Slic3r. This function builds on the previous one. It exports the current document and then opens the resulting .stl file in Slic3r.

* Get slic3r info. This function runs Slic3r in non-interactive mode to get information about used filament and estimated printing time, etc. It uses a predefined .ini config file for Slic3r which can be set in the preferences. Such an .ini file can be generated from Slic3r and exported.

* Run slic3r. Run Slic3r with the same profile as above, and save the resulting .gcode file. Same philosophy here as with the .stl file, there is no prompt for a file name.

What do you think about this behavior?

Would also like some help with testing! It was a bit twiddly to determine what objects are actually visible. I want the algorithm to work in the same way as the main FreeCAD gui, also with App::Part and PartDesign::Body. I think I got it to work, but not 100% sure, so would also like some feedback on that.

Thanks for a great project!

Edit: For reference I should mention that Slic3r is an open source program for slicing 3D objects so they can be printed using a 3D printer. Here is a link: https://slic3r.org/
User avatar
DeepSOIC
Posts: 6518
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Slic3r Workbench

Postby DeepSOIC » Mon May 13, 2019 1:15 pm

Interesting.

As for me, I am interested in a more advanced cooperation. So just in case you want to supercharge your workbench, here it goes...

Particularly, being able to set print-setting-override for multi-object/multimaterial print job, and for modifier meshes. That implies I have multiple solids in my design that I want all to use for one printout.

Also, more often than not, my projects contain multiple parts that have to be printed separately (can be a one part split into pieces to be printable, several parts that form an assembly, or several variants of the same part).

And I'd like to have the same for Cura as well!

Right now, I manage it all with Part-o-magic Exporter object. Then comes the boring part of setting it all up in slic3r's plater, observe slicing result, go back to FC to tweak geometry, reload meshes in slic3r, re-define per-solid settings... till I'm happy with g-code. That re-define per-solid setting part is sometimes very annoying and slow.
chrisb
Posts: 15164
Joined: Tue Mar 17, 2015 9:14 am

Re: Slic3r Workbench

Postby chrisb » Mon May 13, 2019 3:11 pm

Mikael, thanks for sharing this workbench.
As for the file selection:
It would be perfect, if you can set the derived filename as a proposal in the file selection dialog. If that's not possible I would prefer your solution over allways typing the name again and again.

If you want to go even further, have a look at Path workbench: There it is possible to define a pattern with placeholders, which makes it possible to have all print stuff in one directory, and it has an option for not showing any selection dialog at all, which speeds up things even further.

There is another parameter which I would like to set in your workbench: The tesselelation of the STL.
User avatar
limikael
Posts: 16
Joined: Sat Aug 26, 2017 6:30 am

Re: Slic3r Workbench

Postby limikael » Wed May 15, 2019 3:47 am

chrisb wrote:
Mon May 13, 2019 3:11 pm
Mikael, thanks for sharing this workbench.
As for the file selection:
It would be perfect, if you can set the derived filename as a proposal in the file selection dialog. If that's not possible I would prefer your solution over allways typing the name again and again.

If you want to go even further, have a look at Path workbench: There it is possible to define a pattern with placeholders, which makes it possible to have all print stuff in one directory, and it has an option for not showing any selection dialog at all, which speeds up things even further.

There is another parameter which I would like to set in your workbench: The tesselelation of the STL.
Very good suggestions! I think I will work on adding them all actually, but slowly by slowly. I'm not able to focus on this development full time, so please be patient...
User avatar
limikael
Posts: 16
Joined: Sat Aug 26, 2017 6:30 am

Re: Slic3r Workbench

Postby limikael » Wed May 15, 2019 3:53 am

DeepSOIC wrote:
Mon May 13, 2019 1:15 pm
Interesting.

Also, more often than not, my projects contain multiple parts that have to be printed separately (can be a one part split into pieces to be printable, several parts that form an assembly, or several variants of the same part).

And I'd like to have the same for Cura as well!

Right now, I manage it all with Part-o-magic Exporter object. Then comes the boring part of setting it all up in slic3r's plater, observe slicing result, go back to FC to tweak geometry, reload meshes in slic3r, re-define per-solid settings... till I'm happy with g-code. That re-define per-solid setting part is sometimes very annoying and slow.
The export of individual parts is very interesting! What do you think about a function that integrates with the A2p Workbench, so all the individual parts of an assemble would be exported and opened in Slic3r? I haven't looked at Part-o-magic yet, but will do as time permits.