Auto switching to rounded rectangle pads

Does Kicad PCB layout come with, or has anyone created a plug-in or something like that, for finding all footprints’ rectangular solder pads and converting them to rounded corner rectangular pads for all footprints of a particular PCB design? I have old designs that I’d like to update but it would be tedious to manually update everything on each design if there are tools out there to automate some of these tasks. Most of my old footprints are not the same names as those currently available for similar parts and so even swapping out footprints would be a manual tedious task even if that would work.

I am not aware of a script that does this, but I guess it should not be too difficult to write such a script.

But first, What is the approximate size of the number of projects and footprint libraries? My first guess (without knowing those sizes) is that it may be a better approach to do it manually anyway. The advantage is that while you are doing it, you’re looking at the footprints, to verify what you are doing. Batch processing may have some unexpected or undesired results.

Doing it manually would be:

For each library footprint:

  1. Open it in the footprint editor.
  2. Change one pad.
  3. Copy the pad properties of that pad to the “Default pad properties”.
  4. Copy those default pad properties to all the other pads.
  5. Save the footprint back in it’s library.

After you’ve gone though your libraries in this way, updating the projects with the library footprints should do the rest. But the result will depend a lot on how well organized your own footprints and library structure is. If you have many projects with project specific libraries, or even when the footprint library links are broken, then this approach does not work very well.


For the scripted approach, this could also be done in different ways. It could be written as a plugin in the PCB editor, so you have the script ready to work on footprints that are inside the PCB editor, but I am not sure if this works, The PCB editor itself does not have GUI functions to modify pads and I’m not sure what happens if you attempt this with a script.

The other approach is to write a script that works directly on the files. Either on PCB files or footprint files (directories). These files are all based on S-Expressions and relatively easy to modify with scripts.

It is also quite possible that scripts for this already exist (or at least some scripts for batch processing footprints). I do not do anything with scripting in KiCad myself, but there are lots of others who do and quite a lot of people put their own scripts on github / gitlab or similar sites. Because of both the Open Source nature of KiCad, and the documentation of file formats etc, available there are relatively many people who are tinkering with it in all sorts of ways.

If I knew what footprint I want to replace with what my first attempt is to use Notepad++ and make replacement in all files in directory with all its subdirectories. But in my case I would do it only in my symbol libraries. Then for project I need I would update at schematic all symbols from directory and then update PCB from schematic.
But it is not automated way, but manual.

Many of these rounded pad footprints have smaller gaps between them than old rectangular pad ones. This can be awkward when you used a SMD part as a track hop over

12

I will try the 5 steps manually, thanks

I will try rounding corners of existing very old footprints rather than selecting new footprints with wider pads.

Consider:

  1. Different ways to make Rounded Corners - thus, you might have Pad’s created from ‘Mixed’ methods.

  2. The Different ways result in different Textual content thus, can have identical graphic/appearance but, will impact ‘How’ you Bulk-Edit. Some will have the ‘roundrect rratio’ some will result from Line-Stroke-Thickness, some will not present any indication but, rather by default and can be impacted by the ‘Fill’ and Line-Fillet’s.

Screenshots show:
#1 Left to Right: THT, SMD, and SolderPad
(SolderPad, Before and After Changing the ‘Shape’ type from Rectangle to Rounded-Rectangle). I used the Panel on left to select the Type.

#2 Before and After Changing the Value using Text-Editor
(After ‘Edit’, Must Save the Edited File and Close/Re-Open the PCB-Editor - can keep Kicad Open)

#3 Can Edit the Footprint:
• Can do Bulk-Footprint-Edits using a Script that changes All Footprints - see Note below)
• Can do Individual Footprints using a Script
• Can Update PCB individually or All

Mixed way’s depending on what you want to do and Pad’s creation method.

Note: Can Right-Click the PCB in Kicad Main Panel, a Pop-up with the linked Text-Editor makes it easy to March-down the page and Change/Edit the Pads you want/don’t-want…
Script: You can look around for some of my posts that contain Scripts to do this… Here’s one and have posted other’s with different Script’s

Of course, can simply Open the PCB-File in any Editor and do Search/Replace by marching through the file…

Now my head hurts. I’ll have to re-read your post each night for a week so I can absorb it in my sleep

Well, this will add to your Nightmare’s

You can do various things to achieve various goals…

Some further Examples… Now, you’ve got 75% of the story. Sweet Dreams!
( I didn’t delete the Silk, I just Moved it (the Action’s, create the Track behind the Silk)

And, notice the Inner Corner’s - they’re different (sharp or radius’d depending on the way it was done… see what I mean… :wink:

Maybe you’ll sleep better and without nightmares if you just do this all with KiCad’s GUI. You can just experiment a bit with the hints already given, and you don’t need to now anything about the file format or other KiCad internals.

If this was for a big amount of large libraries, then sure, a scripted approach is a good idea. But for just a few projects, doing it all with KiCad’s footprint editor is easier and quicker. Also, getting to know how KiCad’s footprint editor works is some valuable knowledge you can reuse when creating new footprints or modifying other footprints later. For example sites like SnapEDA, PCB-Libraries and Samacsys are able to create footprints for KiCad, but usually they have some small issues left that are easy to fix once you know how to work with KiCad’s footprint editor.