Advertisement
danfalck

parse_sorted_edges.py

Mar 30th, 2015
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. FreeCADGui.doCommand('import Path')
  2. FreeCADGui.doCommand('from PathScripts import PathUtils as pu')
  3. FreeCADGui.doCommand('sel = Gui.Selection.getSelectionEx()[0]')
  4. FreeCADGui.doCommand('subs = sel.SubObjects')
  5. FreeCADGui.doCommand('firstedge = subs[0]')
  6. FreeCADGui.doCommand('w = Part.Wire(subs)')
  7. FreeCADGui.doCommand('Side = "Left"')
  8. FreeCADGui.doCommand('radius = -6.0')
  9. FreeCADGui.doCommand('clockwise = True')
  10. FreeCADGui.doCommand('off = pu.SortPath(w,Side,radius,clockwise,firstedge)')
  11. FreeCADGui.doCommand('Part.show(off)')
  12.  
  13. for o in off.Edges:
  14.     FreeCAD.Console.PrintMessage(str(o.Curve)+"\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement