Macro 3d Printer Slicer Individual Parts/it

Description
This code, when run, will export the visible bodies at the top level (bodies deeper in the tree will be ignored) of the currently open design to individual STL files, and open them it in the slicing software that you use. This macro will look for Cura as the default but you can change it to any other slider by changing the SLICERAPP variable in the source code.

It is best used by creating a link to the macro on the toolbar, and when your ready to slice the object, just click it and your objects, as they appear on the screen in FreeCAD will appear on your slicing software's interface, ready to slice. It will also create several STL files with the same filename as the design file and the part label in the same directory as the design file.



Script
The SLICERAPP variable can be changed to any slicing software of your choosing. If a specific object is not exported you might have to add the respective type to the doexport array.

ToolBar Icon

Macro_3d_Printer_Slicer_Individual_Parts.py

Credits
Thanks to cae2100 for developing the original macro code - also available here.

Thanks to Wmayer for his help in writing this script.

Original forum topic: http://forum.freecadweb.org/viewtopic.php?f=10&t=4686