/dxf_merger

Python DFX Merger, just a function wrap based on ezdxf to merge n dxf files into a unique new dxf file.

Primary LanguagePythonThe UnlicenseUnlicense

DXF merger

CI Badge

DXF Merger

Python DXF merger solution. Just a function wrap based on ezdxf to merge n dxf files into a unique new dxf file. This solution merge each content from source dxf into a new layer on target dxf.

Requirements

Code formatter used: black (https://github.com/psf/black)

How it works

Basically it uses ezdxf's add-on Importer to merge any dxf into an empty shell.

You can edit data.json file to change input folder+files, output folder+file:

{
    "desc": "files for a demo dxf merger based on ezdxf",
    "pathin": "in/",
    "pathout": "out/",
    "targetfile": "merge.dxf",
    "use_filelist": true,
    "filelist": ["manzana.dxf", "parcela.dxf", "tejido.dxf"],
}

More info

You can get more info at https://ezdxf.readthedocs.io/en/stable/addons/importer.html

TO-DO & Notes

  • unit test transformation.

  • maybe transform script into Class so i think ll be easier to reuse / include into a data pipeline.

  • Added layers, each new dxf data is imported into a new independent layer.