Macro FaceToSketch: Difference between revisions
Jreinhardt (talk | contribs) (Created page with "{{Macro|Icon=Text-x-python|Name=FaceToSketch|Description=Converts a face into a sketch without constraints.|Author=Jreinhardt}} import Draft wires,_faces = Draft.downg...") |
(Marked this version for translation) |
||
(21 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
{{Macro|Icon=Text-x-python|Name=FaceToSketch|Description=Converts a face into a sketch without constraints.|Author=Jreinhardt}} |
|||
<translate> |
|||
<!--T:1--> |
|||
{{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== <!--T:2--> |
|||
⚫ | |||
This macro breaks down your form with function {{KEY|[[Image:Draft_Downgrade.svg|16px]] [[Draft Downgrade]]}} and transforms the face selected in a sketch without constraints, and ready to be modified. |
|||
==Script== <!--T:3--> |
|||
<!--T:4--> |
|||
ToolBar Icon [[Image:Macro_FaceToSketch.png]] |
|||
</translate> |
|||
'''Macro_FaceToSketch.FCMacro''' |
|||
{{MacroCode|code= |
|||
⚫ | |||
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) |
|||
}} |
|||
{{clear}} |
Latest revision as of 10:18, 2 July 2021
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. Macro version: 1.0 Last modified: 2013-12-23 FreeCAD version: All Download: ToolBar Icon Author: Jreinhardt |
Author |
Jreinhardt |
Download |
ToolBar Icon |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
1.0 |
Date last modified |
2013-12-23 |
FreeCAD Version(s) |
All |
Default shortcut |
None |
See also |
None |
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
Macro_FaceToSketch.FCMacro
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)