Advertisement
danfalck

dxfout.py

Feb 9th, 2012
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import Part,Drawing,FreeCADGui,FreeCAD
  2. from FreeCAD import Base
  3. filename = "/home/danfalck/Documents/freecad/test20120209-1.dxf"
  4. FILE = open(filename,"w")
  5. sel = FreeCADGui.Selection.getSelection()
  6. sel = sel[0]
  7. shape = sel.Shape
  8. dxf_output = Drawing.projectToDXF(shape,Base.Vector(0,0,1))
  9. FILE.write(dxf_output)
  10. FILE.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement