How to find and remove duplicate lines in a DXF
Two lines on identical coordinates draw exactly one line. You cannot see the problem, your cutter can, and it will usually reject the file. Here is what actually removes them in each tool — and which tools have no command for it at all.
This is common enough that fabricators write their own guides about it. Ponoko maintains an article titled “How to remove duplicate lines in AutoCAD, Illustrator & Inkscape” in its design help centre, and SendCutSend states that duplicate paths “will be rejected by our automated system since the laser cannot recognize or cut them”. If a shop bothers to document a defect, it is because they see it every week.
Where they come from
- Mirroring. You mirror half a symmetrical part and both halves keep their own copy of the centreline. This is the single most common cause.
- Copy and paste in place. One stray paste and the whole outline exists twice, perfectly aligned.
- Exploding blocks. Exploding twice, or exploding a block that was inserted twice at the same point.
- Importing the same layer twice from a supplier file.
- Tracing over existing geometry instead of editing it.
AutoCAD, BricsCAD, and other DWG-lineage tools
Use OVERKILL. It deletes duplicate objects and combines partially overlapping or contiguous ones, and it reports how many objects it removed when it finishes.
Read that number. It is the only feedback you get that the problem existed. If it deletes 40 objects, you had 40 defects that were invisible in the drawing a moment ago.
Two settings matter. Set the tolerance to something meaningful for your drawing rather than leaving it at zero — geometry that is a ten-thousandth of a millimetre apart is duplicate in every practical sense, but a large tolerance will merge things you meant to keep separate. And decide deliberately whether to ignore object properties: if your cut and engrave geometry sit on different layers, ignoring properties can merge them into one.
Fusion, Onshape, SolidWorks and other parametric CAD
Fix it in the sketch, not in the DXF. If you patch the exported file, the next export recreates the problem, and you will do this forever.
The useful signal in sketch-based CAD is that a properly closed, non-overlapping profile will shade or fill. A region that refuses to shade, or shades strangely, usually has duplicate or open geometry underneath. Fully constraining the sketch also surfaces duplicates, because the second copy will report as redundant or over-constrained.
Illustrator and Inkscape: there is no command
This is the honest part that most guides skip. Neither has a reliable one-click “remove duplicate paths” function the way AutoCAD does.
What people suggest instead usually does something adjacent. In Illustrator, Object → Path → Clean Up removes stray points and empty paths, not stacked duplicates. Pathfinder operations merge shapes but also change your geometry, which is not what you want on a cut file. In Inkscape, Path → Union merges overlapping shapes into one, which fixes some overlap cases and destroys others — it will happily weld two parts you intended to cut separately.
What actually works in a vector editor:
- Check the object count. Select everything and look at how many objects you have against how many you expect. A part with 12 holes and one outline is 13 paths, not 26.
- Select one edge and move it. If a copy stays behind, you found a duplicate. Undo.
- Rebuild rather than hunt. On a simple part it is faster to redraw the outline cleanly than to find stacked strokes by eye.
- Check the exported file, not the canvas. Vector editors are not CAD tools; what they show you and what they write to a DXF are not always the same thing.
The case that is not a defect
Two adjacent parts deliberately sharing one cut edge — common-line cutting — looks identical to a duplicate at file level. It saves time and material, and some services accept it while others refuse it outright. Do not run a blanket dedupe over a nested sheet without checking what you are about to merge.
How to know you actually fixed it
Re-export and check the exported file. Not the sketch, not the canvas — the DXF you are about to send. Export is where geometry gets flattened and re-encoded, so it is entirely possible for your drawing to be clean and the file to not be.
You can drop it into the checker on this site and get the answer in a few seconds without installing anything, or without it leaving your machine.
Free. Reports duplicates, partial overlaps and crossings with the coordinates they sit at.