Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.06 KB

Macro_FaceToSketch.md

File metadata and controls

39 lines (27 loc) · 1.06 KB

Macro FaceToSketch

{{Macro |Name=FaceToSketch |Icon=Macro_FaceToSketch.png |Description=This macro breaks down your form with function Draft Downgrade and transforms the face selected in a sketch without constraints, and ready to be modified. |Author=Jreinhardt |Version=1.0 |Date=2013-12-23 |FCVersion=All |Download=[https://www.freecadweb.org/wiki/images/6/6e/Macro_FaceToSketch.png ToolBar Icon] }}

Description

This macro breaks down your form with function [[Draft Downgrade]] and transforms the face selected in a sketch without constraints, and ready to be modified.

Script

ToolBar Icon

Macro_FaceToSketch.FCMacro

{{MacroCode|code=

import Draft

wires,_faces = Draft.downgrade(FreeCADGui.Selection.getSelection(),delete=True)

sketch = Draft.makeSketch(wires[0:1]) for wire in wires[1:]: Draft.makeSketch([wire],addTo=sketch)

for wire in wires: FreeCAD.ActiveDocument.removeObject(wire.Name) }}


documentation index > Macro FaceToSketch