Skip to content

Instantly share code, notes, and snippets.

@hyOzd hyOzd/export_all_stl.py
Last active Aug 29, 2015

Embed
What would you like to do?
A small FreeCAD script to export all visible parts as STL
#
# Export All STL
#
# This is a small FreeCAD script to export all visible parts in STL
# mesh format. Files will be named as "documentname_partlabel.stl".
#
import FreeCAD
import os.path
doc = FreeCAD.activeDocument()
base_filename = os.path.splitext(doc.FileName)[0]
for obj in doc.Objects:
if obj.ViewObject.Visibility:
filename = base_filename + "_" + obj.Label + ".stl"
obj.Shape.exportStl(filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.