Kicad – fixing invisible gaps in board outlines on the Edge.Cuts layer


Kicad appears to tell us that we have gaps in our board outlines when there aren't any. This can be solved by opening up the segments of the board edge slightly at the error points and bridging the gaps with short lines.

The problem

Kicad printed circuit board (PCB) designer tells you that you have a board edge that is incomplete when you run the design rules check (DRC). You can clearly see that you have a lovely, complete outline with no gaps in it. Involuntary sailor-language syndrome occurs. I encountered this issue with versions 5 and 6 of Kicad.

This occurs for me when I inherit a layout that has curves on the board edge. The board edge is drawn on the Edge.Cuts layer on Kicad. I suspect that the cause may be different grids being used at different times in the project. Grid management is one of the many things that needs attention when laying out a PCB.

See the figure below that shows the red pointy arrow of frustration generated by the DRC.

Kicad Edge.Cuts layer showing an error.

The error message in the DRC is shown below. "Error: Board has malformed outline (not a closed shape)". This is not the only error message that can be generated for this issue and the wording may well change between different versions of Kicad.

Kicad DRC error message.

For the screenshots I use a 0.1mm grid and the line thickness on the Edge.Cuts layer is 0.15mm. Only the Edge.Cuts layer is active.

If we select the top part of the curve and then the bottom part of the curve we can see that the arrow points at the join of two curves. The two curves appear to connect with no gap. Please see the two figures below which demonstrate this.

Kicad Edge.Cuts layer, top segment of board edge curve selected.
Kicad Edge.Cuts layer, bottom segment of board edge curve selected.

Take it from me, you can waste hours of your life that you will never get back trying to shift the two curve segments so that they join up so precisely that the Kicad DRC accepts them as a complete outline.

The solution

Open up the two segments so that there is visible gap between them. Keep this gap as small as practical. To do this, click on the edge of one segment and press G for grab, then keep the mouse button down and drag it. See the figure below

Kicad Edge.Cuts layer showing two segments with a gap between them.

Now we want to join the two segments with a small 'jumper', using the line tool. To get this line to connect at exactly the end of the segment so that Kicad accepts that it is connected to the curve, we look for the cursor to become a cross with a circle around it. Don't forget to select the Edge.Cuts layer first. For some reason, Kicad defaults to selecting any layer except the Edge.Cuts layer. Which also leads to involuntary sailor-language syndrome.

The figures below show the beginning and end of the short 'jumper' line correctly connecting the separate segments.

Selecting the end of a segment on the Edge.Cuts layer.

Drawing the connecting line between two segments on the Edge.Cuts layer.

Again, note that the cursor becomes a cross in a circle. This shows that the cursor is on the end of the segment.

Run DRC again and rejoice that the red arrow has gone. You may find that the jumper you drew has been adsorbed into one of the segments and no longer appears as a separate entity.


Adding this jumper may slightly distort your intended board outline. The router bit used to carve out your PCB is probably around 2mm in diameter. By zooming in on the affected region to add your jumper, any small distortion will be smoothed out by the router. In the example screenshots, the small crosses are 0.1mm apart.

Leave a Reply

Your email address will not be published.