Macro SuperWire: Difference between revisions
(Marked this version for translation) |
Renatorivo (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
⚫ | |||
<translate> |
<translate> |
||
<!--T:1--> |
<!--T:1--> |
||
Line 33: | Line 34: | ||
}} |
}} |
||
{{clear}} |
{{clear}} |
||
⚫ |
Revision as of 22:32, 5 August 2018
File:Text-x-python SuperWire |
Description |
---|
This macro creates a wire from selected objects (lines and arcs) even where normal wire creation methods (for example the upgrade tool) fail Macro version: 0.1 Last modified: 2012-05-22 Author: Yorik |
Author |
Yorik |
Download |
None |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
0.1 |
Date last modified |
2012-05-22 |
FreeCAD Version(s) |
None |
Default shortcut |
None |
See also |
None |
Description
This macro creates a wire from selected objects (lines and arcs) even where normal wire creation methods (for example the upgrade tool) fail.
Attention, you need a recent version of FreeCAD for this to work
import FreeCAD,FreeCADGui,Part
try:
import DraftGeomUtils as fcgeo
except:
from draftlibs import fcgeo
sel = FreeCADGui.Selection.getSelection()
if not sel:
FreeCAD.Console.PrintWarning("Select something first!")
else:
elist = []
for obj in sel:
if hasattr(obj,"Shape"):
elist.append(obj.Shape.Edges[0])
wire = fcgeo.superWire(elist)
if wire:
Part.show(wire)
else:
FreeCAD.Console.PrintError("SuperWire operation failed!")