sytchenko

FreeCAD. Covert file on server

Aug 15th, 2020 (edited)
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. import FreeCAD
  4. import Mesh
  5. import Import
  6.  
  7. App.newDocument("Unnamed")
  8. #App.setActiveDocument("Unnamed")
  9. #App.ActiveDocument=App.getDocument("Unnamed")
  10. #Gui.ActiveDocument=Gui.getDocument("Unnamed")
  11. #Gui.activeDocument().activeView().viewDefaultOrientation()
  12. Import.insert(u"/home/user/Projects/FreeCAD/file.stp","Unnamed")
  13. #Gui.SendMsgToActiveView("ViewFit")
  14. __objs__=[]
  15. __objs__.append(FreeCAD.getDocument("Unnamed").getObject("Part__Feature"))
  16. Mesh.export(__objs__,u"/home/user/Projects/FreeCAD/file.stl")
  17.  
  18. del __objs__
  19.  
  20.  
Add Comment
Please, Sign In to add comment