TexHouse Plain comparisons of 3D printing and maker tools

How to merge overlapping lines in an exported DXF file

Steps to merge overlapping lines in an exported DXF file, with checks before and after, plus tools that can help with the cleanup.

By TexHouse ยท

TexHouse is published by the makers of LunarWerx 3D Print and VectorMagik, which are compared here alongside other tools.

Merging overlapping lines means cleaning the exported DXF in a CAD program: keep a copy, join or delete the duplicate lines, then export and check a fresh file. VectorMagik is one option in the tools section below, and it traces pictures into vector shapes. [1]

OptionWhat it doesPrice or licence
VectorMagikTraces a picture into vector shapes using its own engine [1]Free for everyone; business use needs a licence (PolyForm Noncommercial 1.0.0) [1]
Your CAD programCheck its own page for merge and trim commandsCheck its own page for the price
A separate DXF toolCheck its own page for what it doesCheck its own page for the price

What you need before you start

Before you merge anything, keep an untouched copy of the exported file. Merging changes the geometry, and a copy lets you compare against the original if a line ends up in the wrong place.

Open the file in the CAD program you plan to use, and confirm that it loads every layer without warnings. Check which layers hold the overlapping lines, because duplicates often sit on separate layers that look the same on screen.

Note the drawing units and scale, so that any tolerance value you enter matches the size of the part. Decide what counts as overlapping, since lines that almost match may need a looser setting than exact duplicates.

Keep a zoom level high enough to see small gaps, and have a second viewer ready to open the cleaned file, so you can check it outside the program that changed it. Finally, write down which lines you intend to join or delete, so the cleanup stays tied to a list you can review. If the drawing is shared, get the owner's permission before changing it.

Step by step

The steps below work with most CAD programs, although menu names differ between them.

  1. Save a copy of the exported DXF under a new name, and leave the original alone.
  1. Open the copy in your CAD program and zoom to fit. Look for areas where lines appear thicker or doubled, because those spots usually hide duplicates.
  1. Select the overlapping entities in one area at a time. Many programs show a count of selected items, which helps you confirm that both copies were picked.
  1. Use the program's join, merge or trim command on the selected lines. Choose the command that keeps one continuous line where the two overlap, and leave lines that only touch at an end alone.
  1. Delete any leftover duplicate that the command did not remove. Check the layer panel to confirm that the duplicates are gone and the kept line sits on the layer you intended.
  1. Run an overlap or duplicate check if your program has one, and review each flagged item by hand rather than accepting all of them at once.
  1. Zoom in on the joined corners and line ends. Look for small gaps, stray points, or lines that extend past their intended end.
  1. Repair any gaps by extending or joining the endpoints, and confirm that closed shapes are actually closed.
  1. Export a fresh DXF from the cleaned drawing, then open that new file in a second viewer to confirm the lines look the same there.
  1. Compare the new file against your original copy at the same zoom level, and keep both files until the part has been checked in real use.

Tools that can do it

VectorMagik is made by the team that publishes this site. It traces a picture into vector shapes using its own engine. [1] You can save the result as SVG, PDF, EPS, AI, DXF, EMF or PNG. [1] A tolerance slider merges neighbouring curve pieces, and Auto picks the largest tolerance that keeps the picture. [1] You can move or delete curve nodes and round individual corners after converting. [1] You can click shapes to delete them, such as a background, or merge two shades into one. [1] You can compare the vector with the bitmap side by side, or flip between them with B and V keys. [1] It is free for everyone, and business use needs a licence. [1]

Two other kinds of option are a CAD program you may already own and a separate DXF tool. The facts for those options are not on this page, so check each product's own page for what it does and what it costs before you choose.

Common mistakes to avoid

Merging the only copy of a file is a common mistake. If a join goes wrong, the original is the only way back, so save it first.

Joining lines that are close but not identical can shift a corner. Check each joined area at high zoom instead of trusting the command's result.

Deleting duplicates by eye can remove the line that was meant to stay. Select with a box or a count, then check which copy remains.

Ignoring layers can leave a duplicate hidden under a layer that is switched off. Turn all layers on before you check the drawing.

Skipping the second check is also risky. A file that looks right in the program that changed it can show gaps in another viewer, so open the export elsewhere before you send it to a cutter or a machine.

Frequently asked questions

How do you merge overlapping lines in an exported DXF file?

Start by keeping an untouched copy of the file. Open the copy in your CAD program and select the overlapping entities, then use its join, merge or trim command so one line remains where the two overlapped. Delete any duplicate that is left, export a fresh DXF, and check the joined areas at high zoom in a second viewer.

Can VectorMagik export a DXF file?

Yes, it can save the result as DXF among other formats. [1] After exporting, open the DXF in the program you plan to use, since the cleanup steps in this guide still apply to the file it writes.

Does VectorMagik simplify curves in a traced file?

It has a tolerance slider that merges neighbouring curve pieces, and an Auto setting that picks the largest tolerance that keeps the picture. [1] Start with a low setting and compare the result with the original, so you can see how much the drawing changed before you rely on it.

Can VectorMagik edit nodes after tracing?

Yes. You can move or delete curve nodes and round individual corners after converting. [1] Hand editing suits a single line that needs adjusting, while the merge steps in this guide suit a file with many duplicates. Check the edited lines in a second viewer before sending the file on.

Is VectorMagik free for everyone?

It is free for everyone, and business use needs a licence. [1] The licence is PolyForm Noncommercial 1.0.0, so read its terms before you use exported files in paid work. [1]

Free for personal and non-commercial use; business use needs a licence (PolyForm Noncommercial 1.0.0). [1]

Try VectorMagik

Sources

  1. VectorMagik's own description of itself (the product of this site's publisher)

Related comparisons