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!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
limikael
Posts: 17
Joined: Sat Aug 26, 2017 6:30 am

Slic3r Workbench

Post by limikael »

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
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Slic3r Workbench

Post by DeepSOIC »

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
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Slic3r Workbench

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
limikael
Posts: 17
Joined: Sat Aug 26, 2017 6:30 am

Re: Slic3r Workbench

Post by limikael »

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: 17
Joined: Sat Aug 26, 2017 6:30 am

Re: Slic3r Workbench

Post by limikael »

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.
baschdl-ka
Posts: 5
Joined: Fri Nov 30, 2018 10:58 am

Re: Slic3r Workbench

Post by baschdl-ka »

Hello,

i like the idea of starting slic3r direct out of freecad and prepare the visible parts for printing.
For me,( Manjaro Linux "stable" FreeCAD 0.18 AppImage & slic3r 1.31dev the "run slic3r button does not what i expected to. "Run slic3r" only runs slic3r in "invisible" CLI mode and generates the *.gcode-file without the option to change any settings in the gui. This seems to be the same as the "export to gcode" button does.
Can i change any settings to run the gui? Adding the --gui option to the "path to the slic3r" executable does not work.

Thanks for your work!

Sebastian
steve123
Posts: 149
Joined: Fri Sep 04, 2015 8:58 pm

Re: Slic3r Workbench

Post by steve123 »

limikael wrote: Wed May 15, 2019 3:53 am 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.
I've been experimenting with Assembly4 and the workflow is:

open the Mesh Design workbench,
select the individual part,
select "create mesh from shape" from the Mesh menu (no button for this for some reason?),
select the meshing options (only "standard" option works),
click ok,
select the mesh in the model tree,
click "Export mesh to file".

A lot of clicks and I have to do this for every part.
mea08kw
Posts: 82
Joined: Sun Oct 09, 2022 6:22 am

Re: Slic3r Workbench

Post by mea08kw »

Hi, I'm wondering if this workbench could preview the slicing process.

Normally gcode can be generated for sure, from the customer's point of perspective, they want to visualize the slicing process before sending gcode to a real 3d printer.

Looking forward to hearing from you.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Slic3r Workbench

Post by onekk »

mea08kw wrote: Thu Nov 10, 2022 6:54 am Hi, I'm wondering if this workbench could preview the slicing process.

Normally gcode can be generated for sure, from the customer's point of perspective, they want to visualize the slicing process before sending gcode to a real 3d printer.

Looking forward to hearing from you.
You are continuing to necrobump topics in other word resurrecting them after they are inactive for some time.

Many of these WB are not maintained anymore, I think for some good reasons, like the hard work necessary to make things and the little gain as in general Slicers have improved a lot and usually could show directly what you are asking.

Side note, FreeCAD could not know what are your slicer settings, so how it could guess what are you values and setting for filling and "fill pattern", as example of first thing that could come on my mind.

Plus gcode is very different across different printers, and CNC and 3D printing have different requirement. (I once was involved in developing a new firmware, so I know what I'm speaking about).

If you see around the 3d printer world is very changed in latest years as example RepRap forum is almost silent and most of the development has stalled, due to the invasion of chinese clones, many valuable people have gave up to compete with the "mass production" and have stopped even some help on the forum that has became a "help desk for chinese made mass produce printers" where the "assistance was near to nothing". In another life I was present on the Italian Forum almost daily, so as above, I know what I'm speaking about.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply