dxf-diff

dxf-diff

Compare two DXF files and see what changed. dxf-diff is a free, open source command line tool and Python library (built on ezdxf) for CAD drawing revision comparison. It lists every added, removed and modified entity, reports layer and block definition changes, and writes a self-contained HTML report with a zoomable overlay of both drawings.

dxf-diff HTML report with an SVG overlay of two drawing revisions

Features

Install

pip install git+https://github.com/Shahnawaz75/dxf-diff

Python 3.9 or newer. For PNG output: pip install "dxf-diff[png] @ git+https://github.com/Shahnawaz75/dxf-diff". A PyPI release (pip install dxf-diff) is coming soon.

Quick start

dxf-diff old.dxf new.dxf                     # what changed, in the terminal
dxf-diff old.dxf new.dxf --html report.html  # visual report with SVG overlay
dxf-diff old.dxf new.dxf --json report.json  # machine-readable diff
from dxf_diff import compare

for change in compare("old.dxf", "new.dxf"):
    print(change.kind, change.dxftype, change.layer, change.description)

Documentation

dxf-diff does not read DWG files; convert DWG to DXF first, for example with the free ODA File Converter.

Source code and issues: github.com/Shahnawaz75/dxf-diff (MIT license).