AutoCAD

AutoCAD Gaps That Break CNC Toolpaths

Branislav Milanovic

Branislav Milanovic

Mar 3, 2026 · 10 min read

CNC toolpath breaking at gap points with warning indicators on a metal plate

The toolpath breaks. The laser head lifts, repositions two thousandths of an inch, and resumes cutting. On the finished part, you see a tiny witness mark -- a small divot or discoloration where the beam paused and restarted. The part might still be usable. Or it might not, depending on the customer and the spec.

All because of a gap you cannot see in the AutoCAD drawing.

I spent over ten years on the shop floor before I started building CAD software. I have been the guy standing at the laser cutter looking at a witness mark and wondering where it came from. I have been the guy who traced it back to the DXF file, opened it in AutoCAD, zoomed in to the problem area, and found a 0.0004-unit gap between two line segments. And I have been the guy who then had to explain to the programmer why the toolpath broke.

Gaps in AutoCAD drawings are not just a hatching annoyance. When those drawings drive CNC machines, gaps become physical defects on real parts. Here is how that happens, the six types of gaps that cause the most problems, and how to catch them before the drawing ever reaches the shop floor.

Need to find gaps fast? GapDetector scans your AutoCAD drawings and pinpoints every gap automatically. Learn More About GapDetector

How CAM Software Handles Gaps

To understand why a tiny gap in your CAD file becomes a big problem on the machine, you need to understand what happens when that file hits the CAM software.

Most CAM packages -- whether it is a laser nesting system, a plasma cutting program, or a CNC milling package -- need closed contours to generate toolpaths. The software traces around the profile, calculating the tool's position at every point along the path. Lead-in, cutting speed, lead-out. One continuous motion.

When the CAM software encounters a gap, the contour is no longer continuous. Depending on the software, several things can happen:

The third scenario is the dangerous one because the CAM software does not flag it as an error. It generates a complete toolpath, the operator runs the program, and the defect shows up on the part. By then, you have already wasted material and machine time.

Six Types of Gaps That Cause Toolpath Problems

Not all gaps are created equal. Over the years, I have cataloged the types I see most often in drawings that end up causing CNC issues. Understanding the type of gap helps you understand where to look and how to fix it.

1. True gaps

The simplest type: two entities that should be connected but are not. The endpoint of one line is at (10.5, 20.0) and the start point of the next line is at (10.8, 20.0). There is a visible 0.3-unit gap between them. These are easy to spot and easy to fix -- extend one line or draw a connecting segment.

True gaps usually come from sloppy drafting, incomplete edits, or geometry that was partially deleted and never repaired. They are the easiest to find manually because you can actually see them at a reasonable zoom level.

2. Micro-gaps

Same concept as a true gap, but the distance is below your visual threshold. A gap of 0.001 units on a drawing that spans 500 units is completely invisible at any practical zoom level. You would need to zoom in about 500,000x to see it clearly, and by that point you have no context for where you are in the drawing.

Micro-gaps are the most common gap type in drawings that "look fine" but break toolpaths. They come from floating-point precision errors, file format conversions, OFFSET operations on complex geometry, and copy/paste operations between drawings. The drawing looks perfect. The hatch works (if you have HPGAPTOL set). But the CAM software, which often has tighter tolerances than AutoCAD's hatch command, still treats it as an open contour.

3. Collinear line breaks

Two line segments that are on the exact same line (same slope, same Y-intercept) but do not touch end-to-end. Visually, it looks like one continuous line. There is no angle change, no visible break. But there are actually two separate entities with a gap between them.

These are particularly nasty because even zooming in does not help -- the two segments look like a single line at every zoom level. The only way to spot them manually is to select the "line" and notice that only part of it highlights, or to check the LIST command and see two separate entities where you expected one.

CAM software handles collinear breaks differently than angled gaps. Some software merges them silently. Others generate a rapid-travel move along the same line, which can cause a dwell mark as the tool decelerates and reaccelerates at the break point.

4. Overlapping geometry

Two entities that occupy the same space. A line from (0,0) to (10,0) and another line from (3,0) to (10,0) overlap from X=3 to X=10. The geometry looks correct -- you see a single line -- but the CAM software sees two entities and may trace both of them, leading to a double cut along the overlapping section.

On a laser cutter, a double cut means the beam passes over the same area twice. This over-cuts the material, widens the kerf, and can cause edge quality issues like excessive heat-affected zone, dross, or burn-through on thin material. On a CNC mill, it means extra passes that waste time without removing any additional material.

5. Arc connection misalignment

Arcs are mathematically defined by a center point, radius, and start/end angles. The actual start and end points are calculated from these values. When a line meets an arc, the line's endpoint must exactly match the arc's calculated start or end point.

In practice, these rarely match perfectly. If you drew the line first and then drew the arc to connect to it, the arc's start point is calculated from its center and radius, and it might differ from the line's endpoint by a tiny amount. Even if you snapped to the endpoint, the arc's mathematical definition might place its start point at a slightly different coordinate than the snap target.

This type of gap is especially common in profiles with tangent arcs -- fillets, rounds, and smooth transitions. Each arc-to-line and arc-to-arc junction is a potential micro-gap site.

6. Contour start/end mismatch

The last entity in the contour does not connect back to the first entity. You drew a complete profile going clockwise from the start point, but the last segment's endpoint does not match the first segment's start point. The profile is almost closed -- 359 degrees of a complete loop -- with a gap right at the starting point.

This matters for toolpaths because the CAM software typically needs a closed loop to define the lead-in and lead-out positions. If the contour does not close, the lead-out might not connect back to the lead-in, and you get an incomplete cut at the start/end point of the profile.

The Real Cost Per Gap

It is tempting to think of gaps as a minor nuisance. A small witness mark, who cares? But the costs add up fast when you are running production.

Machine time. Every toolpath break involves a deceleration, a rapid-travel move, and a re-acceleration. On a laser cutter running at 200 inches per minute, a toolpath break might only add a fraction of a second. But if a drawing has 15 gaps across 30 parts on a sheet, and you are running 100 sheets, those fractions of seconds become minutes of lost production.

Quality defects. Witness marks, dwell burns, and restart marks are cosmetic defects at best and structural defects at worst. On a part that gets powder-coated, a dwell burn might show through the coating. On a structural part, a restart mark is a stress concentration point. Whether the defect matters depends on the application, but explaining to a customer why their parts have marks that are not on the drawing is never a fun conversation.

Scrap and rework. When a gap causes a significant quality issue -- a missed cut, a double cut, a profile that does not close -- the part is scrap. Material, machine time, and labor all wasted. If you catch it after a batch is complete, multiply that waste by the batch size.

Troubleshooting time. When the operator sees a defect, they stop the machine and investigate. Is it the machine? The material? The program? Tracing the problem back to a 0.0003-unit gap in the AutoCAD file takes time, and the machine sits idle while someone figures it out.

Pre-CAM Gap Checking Workflow

The most effective way to prevent gap-related CNC problems is to check for gaps before the drawing ever reaches the CAM software. Not during nesting. Not after the first part comes off the machine with a defect. Before.

Here is the workflow I recommend, and it is the workflow we use ourselves:

  1. Finish your drawing in AutoCAD. Complete all geometry, dimensions, and annotations. Save the file.
  2. Select the cutting profiles. Select only the geometry that will drive toolpaths -- the outer profiles, inner cutouts, hole patterns. Not dimensions, not text, not centerlines.
  3. Run a gap check. Use GapDetector to scan all selected entities for gaps, micro-gaps, overlaps, and connection issues. The scan takes seconds, even on drawings with hundreds of entities.
  4. Review and fix. GapDetector reports each gap with its exact location, size, and type. Fix each one using the appropriate method -- extend, trim, move endpoint, or let the tool auto-fix it.
  5. Re-scan to confirm. After fixing, run the scan again to confirm zero gaps. This catches cases where a fix to one gap inadvertently created another.
  6. Export to CAM. Now your DXF/DWG is clean. Every contour is closed. The CAM software will generate continuous toolpaths without breaks.

This adds maybe two to five minutes to the drawing process. Compare that to the 30+ minutes of troubleshooting when a defective part comes off the machine, plus the scrap material and lost machine time.

GapDetector in Practice

Let me walk through what this actually looks like day-to-day. You have a drawing with a flat part -- let us say a bracket with an outer profile, four bolt holes, and a rectangular cutout. Six contours total.

You run the CHECKGAPS command from GapDetector. You select all the cutting geometry. The plugin scans every entity, computes the distance between every pair of adjacent endpoints, and presents the results.

Suppose it finds two issues: a micro-gap of 0.0006 units at the junction between a fillet arc and a straight line on the outer profile, and an overlapping line segment on one side of the rectangular cutout where somebody trimmed past the intersection and re-drew a segment that partially overlaps the original.

For each gap, you see the exact coordinates, the entities involved, and the gap size. Markers appear directly on the drawing at the gap locations, so you can zoom right to them. No guessing. No methodical scanning around the entire profile.

The action menu gives you options for each gap. For the micro-gap, you can close it by moving one endpoint to match the other -- a sub-thousandth-of-a-unit move that corrects the connection without visually altering the geometry. For the overlap, you can trim the excess segment. Two clicks, both gaps fixed.

Re-scan: zero gaps. Export the DXF. The nesting software generates clean toolpaths with continuous lead-ins, cutting paths, and lead-outs. No breaks. No witness marks. The parts come off the machine clean.

When Manual Checking Falls Short

I want to be fair -- on simple parts with straight lines and few segments, you can absolutely check for gaps manually. Select the profile, try PEDIT JOIN, and if it joins into a closed polyline, you are good. Takes ten seconds.

Where manual checking falls apart is on complex profiles. A part with 60+ segments, multiple fillet radii, tangent arcs, and tight internal features has dozens of potential gap locations. Each arc-to-line junction, each fillet transition, each intersection is a place where a micro-gap can hide.

It also falls apart with volume. If you are programming 20 unique parts per day, spending 5-10 minutes manually checking each one is 100-200 minutes per day -- nearly two to three hours. An automated check takes the same information and delivers it in seconds per part.

And it falls apart completely with micro-gaps. You cannot see a 0.0003-unit gap. Period. No amount of zooming helps. You either accept that micro-gaps might exist and hope the CAM software handles them, or you use a tool that actually measures the distances between endpoints and reports the ones that do not match.

Other Gap-Related CNC Issues

Beyond the direct toolpath break problem, gaps cause several secondary issues in CNC workflows that are worth mentioning:

Nesting failures. Nesting software needs closed contours to calculate part boundaries for optimal sheet utilization. Open contours can prevent a part from being nested, or worse, cause the nesting algorithm to use an incorrect bounding box, wasting material.

Incorrect kerf compensation. Kerf compensation offsets the toolpath to account for the width of the cut. If the contour is open, the offset calculation may produce incorrect results at the gap location, leading to dimensional errors on the finished part.

Lead-in/lead-out problems. The lead-in and lead-out positions are calculated based on the contour geometry. An open contour may not have a valid lead-in or lead-out position, causing the CAM software to place them in suboptimal locations or skip them entirely.

Torch height control errors. On plasma and oxyfuel machines, the torch height controller uses the cutting contour to predict position. A toolpath break can cause a momentary height correction error as the controller adjusts to the rapid-travel move.

Check for Gaps Before the Laser Does

Here is the bottom line: every gap in your AutoCAD drawing is a potential defect on a physical part. Some gaps the CAM software catches. Some it bridges automatically. Some it turns into toolpath breaks that become witness marks, dwell burns, or incomplete cuts.

You can find out about the gaps when the part comes off the machine, or you can find out about them in AutoCAD before the file ever leaves your desk. The first option costs material, machine time, and your credibility with the shop floor. The second option costs a few minutes.

I have been on both sides of this. I have been the machinist wondering why the program has random toolpath breaks, and I have been the programmer wondering why the drawing looks fine but the CAM software is complaining. The answer was always the same: there is a gap. There is always a gap.

Check for gaps before the laser does. Your shop floor will thank you.

Catch Gaps Before They Hit the Machine

GapDetector finds all six gap types in seconds -- so your toolpaths stay clean and your parts come out right.

See How GapDetector Works
Branislav Milanovic

Branislav Milanovic

CAD / Desktop Developer

10+ years machining experience. Builds AutoCAD/Inventor plugins with C# & .NET, bringing real-world expertise as a Machine Programmer.

Related Articles