Way to increase width of all traces on a layer to a minimum width


Using KiCad Stable Version 6.0.10

Was looking to see if there was a way to filter track width changes by trace width itself.

Currently when you go to Edit > Edit Track and Via Properties there is filter by: layer, net, net class, or selected items. Where you select a filter then input the track width or via size you want on that given layer, net, net class, or selected item.

With respect to a filter by trace width, you could do the same.

For example,

  1. Perhaps you have an additional filter “Filter items by trace width” in the “Filter Items” section.

  2. Then you would enter a trace width with a comparator before it, say <10 mil.

  3. Then you input the trace width you would want (as it is now with the drop down menu of defined trace widths), lets say 10 mil… (seems to me the threshold would equate to what you want the width brought to) as shown below:

  4. After hitting “OK”, any trace below 10 mil would then be brought up to 10 mil trace width and any trace above 10 mil will remain untouched.

And of course you can combine this with nets or layers as it is already.

Above is an edit cleaning up my OP which was a question that resulted more in a feature suggestion which will be put on GitLab shortly. Link here to the Gitlab post, if you find this feature interesting and useful please go upvote on the issue. Thanks!

This is a weird question and it’s wandering all over the place.
There is probably not an exact answer to your wish, but there are a whole lot of partial answer. An “exact” answer is also not going to be very helpful, because when the track width is increased (and clearance stays the same) you will create a whole lot of DRC errors, which have to be fixed after the fact anyway, and the cleanup to fix those DRC violations will take much more time than even manually fixing those track widths. So no matter from which side you look at it, it’s never going to work with “just a handful of mouse clicks”.

Yeah I suppose I provided too many details and wandered amongst the paragraph with those details. I am asking if there is a way to set a minimum trace width instead of changing all traces to a single width for a given layer.

Say there is a input somewhere in KiCad, for “Minimum trace width” and filter by top layer, I put 10 mil in, so anything on that layer under 10 mil becomes 10 mil and the anything above 10 mil remains as it was, I am asking if there is anything like that in KiCad (using KiCad 6.0.9) . The DRC point is valid.

I’m not aware of any method to make a selection based on track width. (If a selection is made, then changing the properties based on that selection is easy).

There is: PCB Editor / Edit / Edit Track & Via Properties. But this does not have a filter for track width. I do wonder though if a wish for adding track width to the filter section in that dialog would be useful enough to have a chance of being added to KiCad. You can of course always make a feature request for this on gitlab, and then start lobbying for upvotes :slight_smile:

It can probably be done with a python script in KiCad. I guess the script would be half a page or smaller, but you have to dive quite deep to figure out what lines to put in such a script.

1 Like

Yeah my thoughts as well, seems relatively simple enough to potentially implement in a script!

Thanks for the suggestion and sorry for my crappy wording in the OP. Will get on the Gitlab and do that feature request!

And real quick, do you have advice on lobbying for votes? Reddit? Forum? Haven’t done that on a program with as large of a community as KiCad!

For the lobbying…
If you’ve created a gitlab issue, then add the link here, so other forum users who find this topic interesting can find it easily. Maybe also cleanup your first post in this topic and modify the title a bit.

1 Like

Agreed - appreciate your help!

You can Script it…

You can Script it… As you’ve clearly realized…

Thus, to get you started, the following:

Below example of script shows Selecting desired tracks and click to change widths.

This snippet of Python code (for 1mm change) is a starting point but, implementing it/scripts is users homework…

A good starting effort might include using the PCB’s Python Scripting Panel…

def OnClicked_3(self, event):
    board = GetBoard()
    for track in board.GetTracks():
        if track.IsSelected():

1 Like

Will check out the PCB python scripting panel! good suggestion ty

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