Any way to set a different clearance for a track segment?


I’ve created a net class for a kind of track and set a clearance of 0,5mm for it.
As the board has only one face, now I need to route that track inside a pin header and pcbnew is not allowing that because the clearance + width is too big, so I would like to change the clearance just for those segments the same way we can change its width.

anyway to do that ?


I don’t think this is possible. You can set the clearance value alternately to both values and run DRC to make sure the whole net conforms to the minimum, then run again with the larger value to make sure that is the only location(s) that are flagged.

“Necking” is a headache in KiCAD. I created a dummy component called a “narrower”, which is two pads of different sizes connected with a trace and with no exposed copper. These have to be placed in the schematic and on the board.

Narrower footprint

This is an unusual footprint, because you can’t usually tie two different pads together in a footprint. The interconnection is a graphic line drawn on the front copper plane, which produces a warning message from the footprint editor. It’s safe here because it’s entirely within the keep-out area around one pad or the other, so there’s no way something could be routed through the gap between the pads.

Narrower on a board

The narrower connects Vcc, which is a wide trace, to Net-(M4-Pad2), which connects to a pin with 0.5mm pin spacing.

The “narrowers” have to appear in the schematic.

Narrowers M1, M4, M5 on schematic

This is a clunky way to do necking, but it does work.

1 Like

My approach is to break the track, to create a short segment in the area where width must be reduced. Then use the manual track-editing feature (that good old “E” key) to set the narrower width, place the start and end points where you want them, etc. It’s still a major headache!


Will that still pass DRC?

With the “narrowers”, auto-routing will still work.

DRC is very content with joining track segments with different widths. Assuming, of course, that the segment ends are coincident. And, you have worked out the geometry to keep all portions of all segments out of the “clearance” zones. And, the necked-down segment satisfies the design rules for its net.

Here’s an example of one I did, in the classic situation where you may want such a feature: passing a track between pins on a device. Here, a 20-mil trace is necked down to 10 mils to pass between the pins of a pin-header.

I have never tried the auto-routing in Kicad. I’m sure that if the auto-router decided to rip-up this necked-down track and route a 20-mil track between these pads, it would fail.


1 Like