Is there an easy way to switch from round pads to rectangular pads?

In the latest library, most surface mount pads are now rounded. Is there a quick way to swap them for rectangular pads? I’m laser cutting some mylar stencils and am having trouble with getting the rounded pads to cut nicely. The rectangular pads are really clean in comparison.

Open your Python Shell console. Then type:

from pcbnew import *
brd = GetBoard()
for mod in brd.GetModules():
    for pad in mod.Pads():
        if pad.GetShape() == PAD_SHAPE_ROUNDRECT:
            pad.SetShape(PAD_SHAPE_RECT)

Refresh()
3 Likes

Then after changing all of the rounded rectangles to squared rectangles, don’t forget to do another round of DRC. The rounded rectangles allow cutting the corner with traces that might now show as clearance violations.

1 Like

For right now the answers given will bring your project back up and running with your workflow.


If you can not fix your workflow to work with rounded rectangle then you might need to switch to a personal lib in the long term as current industry standards suggest rounded rectangle pads. This means the official lib will slowly switch over to exclusively using rounded rectangle for standard package footprints. Reasoning: better solder joint control when using stencils as there is better paste separation and also better flow behavior.

Most of these footprints are script generated and the scripts generally offer a fallback mode that of course avoids among other things the use of rounded rectangle pads. This will make generating a personal lib easier. The scripts are found in https://github.com/pointhi/kicad-footprint-generator

3 Likes

Do you mean rounded, as in semi-circles on the ends aka a dragged circle ? Or do you mean the pad is rectangular, with rounded corners ?

An alternate approach to #2 above, that avoids issue in #3, would be to add a Mask layer, that is a copy of the original pad, but has the shape changed on only Mask layer.
I’m not sure if a script can add a Mask layer pad ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.