How to Fix Open Contours and Double Lines in DXF Files
To fix open contours in a DXF, select open shapes, join end points with an auto-join tolerance of about 0.05 to 0.2 mm, then delete duplicate lines and overlapping segments. Check that every outline is closed and appears once, because double lines make the laser cut the same edge twice.
You line up the sheet, press Start, and the laser draws a perfect heart... except the last 1 mm of the outline, where it just stops. The part stays glued to the board, you pry it out with a knife, and the edge looks like a bite was taken. Behind nearly every case like this is an open contour in a DXF file, a shape whose start and end points do not quite meet.
The twin problem is double lines: the same edge drawn twice, so the beam walks it twice and leaves a wider, darker burn. Both are easy to fix once you know where to look.
Why DXF files get open contours and double lines
DXF stores geometry as separate entities: lines, arcs, polylines, splines. A closed shape is only closed if the ends meet exactly, or if a polyline is flagged closed. Common causes:
| Cause | What it looks like | Typical origin |
|---|---|---|
| Rounding in export | Gap of 0.001–0.05 mm | CAD or CNC export |
| Shape made of loose lines | Looks closed, is 12 separate segments | Traced or exploded drawings |
| Copy-pasted overlap | Two identical outlines on top of each other | Merged files or duplicated layers |
| Shared edges | Two parts both draw the wall between them | Nested or box-style layouts |
| Imported spline errors | Tiny end overshoot | Free-form designs |
A gap of 0.02 mm is invisible on screen but a laser controller treats it as two separate paths. For the cutting, the beam will still follow every path, but the software cannot fill the shape, optimise inside-before-outside order, or lead the cut properly.
Step 1: See the problem
In LightBurn, use Edit > Select Open Shapes. If anything is selected, those paths are open. Then use View > Show Direction and Wireframe/Coarse mode to look at lines. Another quick test: switch to Fill mode and zoom in. Closed shapes show a solid fill; open ones show nothing.
In Inkscape, zoom in on suspicious areas with the Node tool (N). Select a path and look for end nodes which appear as squares with an arrow. Two end nodes sitting side by side with a gap are your culprit.
Pro tip: do the test on the whole file before cleaning. Count how many shapes are open. After you finish, the count should be zero.
Step 2: Join the open paths
Work through the options from simple to manual.
- Auto-join. In LightBurn, select the shapes and run Edit > Auto-Join Selected Shapes. It joins ends that sit within a tolerance. If nothing happens, the gap is bigger than the tolerance; increase it in the settings a little at a time.
- Inkscape join. With the Node tool, rubber-band select the two end nodes and press Shift+J (Join Selected Nodes). If they are far apart, use Join with Segment.
- Combine, then fix. For a shape built from many loose lines, select them all and use Path > Combine, then join the ends one by one.
- Redraw the gap. For stubborn spots, draw a short line across the gap on the same layer and join it.
| Gap size | Best approach | Risk |
|---|---|---|
| Under 0.05 mm | Auto-join with 0.1 mm tolerance | None, invisible |
| 0.05 to 0.5 mm | Auto-join with larger tolerance, check shape | Tiny shape change |
| Over 0.5 mm | Manual join or a connecting segment | Check the design intent |
Common mistake: setting the auto-join tolerance very high, like 2 mm, to "make it work". Distant ends of different shapes get joined and the outline of your part is rerouted into a bow tie. Raise the tolerance in small steps and look at the result each time.
Step 3: Remove double lines
Select everything and run Edit > Delete Duplicates in LightBurn. It removes identical overlapping lines. If two lines overlap only partly, for example a shared wall between two boxes, nothing but manual cleanup will do: delete one of the two lines, or merge both shapes with Path > Union in Inkscape so one wall remains.
How to check afterwards: set the line width in the preview to thin, then move one shape aside. If a ghost line stays behind, there is another copy under it. Another test is to simulate the job and watch the time estimate. Cutting a duplicated outline roughly doubles the cut portion, so the estimate for the reindeer ornament, a cut length of 0.47 m, would be nearer 0.94 m of travel.
Step 4: Convert tricky entities
Some DXF entities cause trouble in laser software. Splines and ellipses are usually handled but can break on import in older programs. Text, hatches, dimensions and 3D solids are often ignored or imported as junk. If your CAD tool allows it, export as a simple version such as R12 or 2000 ASCII DXF, with 2D geometry only. Explode text to outlines and delete dimension layers before export. Then check which units the DXF uses, because a wrongly scaled import is a different but equally frustrating problem.
Step 5: Test before cutting
- Import into the laser software and read the size of a known feature.
- Run Select Open Shapes again; it should select nothing.
- Open the preview and look at the order and time.
- Cut a single part from scrap and check that it drops out cleanly.
Fast diagnostic table
| Symptom | Likely cause | Fix |
|---|---|---|
| Part will not drop out at one spot | Gap in contour | Auto-join or connect |
| Darker, wider burn on edges | Double lines | Delete Duplicates |
| Fill engraving fails on a shape | Shape open | Close it, then fill |
| Cut order is chaotic | Many tiny segments | Combine into polylines |
| Software crashes on import | Exotic entities | Re-export simple DXF |
Prevent the problem at the source
If you draw your own files, finish every outline with a closing command (Close in your CAD tool). Avoid stacking identical layers. If you are cutting a box with finger joints, use a generator that outputs clean closed outlines, such as our box generator, which exports both SVG and DXF.
Real-world example: a ring of tiny gaps
Imagine a wedding heart traced from a logo and exported by a CAD program. It looks perfect, but the cut stops three times around the outline, always at the same spots. Select Open Shapes shows 11 open paths. The cause is the original curve being split into segments at each corner, with tiny rounding gaps. Auto-join with a 0.1 mm tolerance closes all eleven in one click, and Delete Duplicates then removes a second outline hiding under the first. The test cut drops out cleanly and the time estimate halves.
| Step | Count before | Count after |
|---|---|---|
| Open shapes | 11 | 0 |
| Duplicate lines | 1 full outline | 0 |
| Estimated cut length | about double | back to expected |
Pro tip: keep a cleaned master copy of every file that gave you trouble. Next time you need it, start from the clean master, not from the original export.
Next step
Open the DXF you are worried about, run Select Open Shapes, and fix one problem at a time. Then do one test cut on scrap. For the whole picture of file readiness, work through how to prepare an SVG as well; the same logic applies.
Questions and answers
What is an open contour in a DXF?
A path whose start and end points do not meet, so the shape is not closed. It may look closed on screen when the gap is very small.
How do I find open shapes in LightBurn?
Use Edit > Select Open Shapes. Anything selected is an open path. Fix them with Auto-Join Selected Shapes or by connecting the end points manually.
What auto-join tolerance should I use?
Start around 0.1 mm and raise it in small steps. Values above about 0.5 mm risk joining ends that belong to different shapes.
Why does my laser cut the same line twice?
Because the file contains duplicate overlapping lines. Use Delete Duplicates, or merge shapes so each shared edge exists once.
Do open contours stop a laser from cutting?
The beam still follows the path, but the part may stay attached at the gap, fills may fail, and the order of cuts can become unpredictable.