Macro HealArcs/it: Difference between revisions
Renatorivo (talk | contribs) (heading) |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
{{Macro|Icon=Text-x-python|Name=HealArcs|Description=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|Author=Yorik}} |
|||
==Ripristina gli Archi== |
|||
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 |
|||
{{Macro/it|Icon=Text-x-python|Name=HealArcs|Name/it=HealArcs|Description=Talvolta gli archi vengono trasformati in BSpline, per esempio quando si applicano ad essi delle operazioni di scala. Questa macro ricrea gli archi dalle BSpline. È utile prima di esportare in dxf|Author=Yorik}} |
|||
<syntaxhighlight> |
|||
try: |
try: |
||
import DraftGeomUtils as fcgeo |
import DraftGeomUtils as fcgeo |
||
Line 25: | Line 27: | ||
FreeCAD.ActiveDocument.removeObject(n) |
FreeCAD.ActiveDocument.removeObject(n) |
||
</syntaxhighlight> |
|||
{{languages/it | {{en|Macro_HealArcs}} {{es|Macro_HealArcs/es}} {{fr|Macro_HealArcs/fr}} }} |
|||
{{clear}} |
|||
<languages/> |
Revision as of 18:18, 24 December 2013
File:Text-x-python HealArcs |
Description |
---|
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 Author: Yorik |
Author |
Yorik |
Download |
None |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
1.0 |
Date last modified |
None |
FreeCAD Version(s) |
None |
Default shortcut |
None |
See also |
None |
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)