|
Beschreibung |
---|
Sometimes arcs are transformed into BSplines, for example when scale operations have been applied to them. This macro recreates valid arcs from them. Useful before exporting to dxf |
Autor |
Yorik |
Link |
Liste von Macros How to install macros How to customize toolbars |
Version |
0.1 |
Datum zuletzt geƤndert |
2011-09-24 |
Contents |
Sometimes arcs are transformed into BSplines, for example when scale operations have been applied to them. This macro recreates valid arcs from them. Useful before exporting to dxf
try: import DraftGeomUtils as fcgeo except: from draftlibs import fcgeo import FreeCAD,FreeCADGui,Part sel = FreeCADGui.Selection.getSelection() if not sel: FreeCAD.Console.PrintWarning("Select something first!") else: removeList = [] for obj in sel: ed = obj.Shape.Edges[0] arc = fcgeo.arcFromSpline(ed) if arc: Part.show(arc) removeList.append(obj.Name) FreeCAD.ActiveDocument.recompute() print "removing ",removeList for n in removeList: FreeCAD.ActiveDocument.removeObject(n)