Macro Dxf To Shape

From FreeCAD Documentation
Revision as of 13:53, 4 September 2020 by Mario52 (talk | contribs) (*04/09/2020 ver 00.00 : add duplicate edge button)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Documentation not finished, not translate thanks

Macro Dxf To Shape

Utility to create a unique wire with many wires

Macro version: 00.00
Last modified: 2020-09-04
FreeCAD version: 0.18, 0.19
Download: ToolBar Icon
Author: Mario52
ToolBar Icon
Macro Version
Date last modified
FreeCAD Version(s)
0.18, 0.19
Default shortcut
See also


Macro utility to create a unique wire with many wires. Types of wire available are: MakeWire, Bspline, BsplineCurve, BsplineCurve + Arc, Polygon, and Bezier curve.

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro

# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "This macro must be downloaded from this link\n"
    "" + "\n"
    "Quit this window to access the download page")


import webbrowser"")


  • Downgrade the compound line to work with a single line
  • Discretize the first line
  • The linetest is created by choosing one of the following types: MakeWire, Bspline, BsplineCurve, Polygon, BezCurve (display the orientation Begin - End (Reversed Forward))
  • test is good .. then Save DataT coordinates in file (and Del Test If you want)
  • second line same first line and accord end to begin ....
  • test is good .. then Save DataT coordinates in file (and Del Test If you want)
  • ...... tests finished
  • Read DataT saved in on unique wire with the type line selected

you can also test one sweep, force reverse, close wire, create points, cloud...

you can also Save the file to disk

( Save DataT, Read DataT, Reset DataT Are the Temporary working file)



The icon for you toolBar copy in same directory to the macro

How to Customize Toolbars, How to install macros

The script on github Macro_DXF_to_Shape.FCMacro


Convert Wire (multi lines) in BsplineCurve

Convert wire with selected face


  • More of mario52's macros can be found on Github


  • 04/09/2020 ver 00.00 : add duplicate edge button
  • 13/02/2020 ver 00.00 :
  • 21/11/2016 ver 00.00 :