LibreCAD DXF to FreeCAD sketches

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

LibreCAD DXF to FreeCAD sketches

Hi there,

I had plenty of LibreCad DXFs to import in FreeCAD so I made a little python script to convert them to FreeCAD sketches. It uses the ezdxf library and as of today, it can process the following elements:

    Circles Arcs
    Ellipses Arcs
    LW Polylines (exploded to lines or arcs)

Unlike FreeCAD's embedded importing tool, the process creates a sketch for each layer present in the DXF and attempts to create basic constraints between the entities in order to directly obtain closed shapes, such as:

    Lines lengths
    Lines Horizontality/Verticality
    Coincidence between end points of lines, circles arcs, and ellipses arcs
    Tangentiality of lines, circles arcs, and ellipses arcs
    Circles and Circles Arcs radiuses
    Circles and Arcs centers fixed distance from origin

Read more and download:
git clone

Feel free to use it and share your thoughts.

Enjoy !