Advertisement
sytchenko

FreeCAD. Make cylinder and save STL using Python

Aug 15th, 2020
2,077
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. import FreeCAD
  4. import Part
  5. import Mesh
  6.  
  7. App.newDocument("Unnamed")
  8. App.ActiveDocument.addObject("Part::Cylinder","Cylinder")
  9. App.ActiveDocument.ActiveObject.Label = "Cylinder"
  10. App.ActiveDocument.recompute()
  11.  
  12. __objs__=[]
  13. __objs__.append(FreeCAD.getDocument("Unnamed").getObject("Cylinder"))
  14. Mesh.export(__objs__,u"/home/brad/pillar_2.stl")
  15.  
  16. del __objs__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement