Odd behaviour when making a "large pad / zone" out of traces

Why does it only remove some of the traces?

That tool might be out of its leage with how you use kicad. (It sounds like you have quite a few such connections. It might no longer be able to determine cleanly which trace now replaces what other traces.)

Two things:

  • Stitching vias? That sounds interesting — is that available in 5.0.2?
  • As to why it would be easier: in the particular board I’m working on, the vias are critically close, and I do not want the zone to go even an additional mil closer; the edges of the vias are not grid-aligned (not even with the smallest, 0.01mm grid), and there are several angles. The lack of grid alignment is dictated by the pins of a chip, which due to their dimensions, simply do not fit within a 0.01mm grid, There are also several angles — for that matter, imagine a hexagonal grid of vias (that’s not what I have, but just as an example); matching the edge with a zone seems like a real pain. In the case of a hexagonal grid of vias, and also in the particular case in my board, connecting traces to fill up the grid with copper is absolutely trivial (like, really, it takes me three seconds flat!!).

Drawing a zone that absolutely perfectly matches (like the traces do) the vias’ edges, well, I don’t even see how it would be possible other than editing the file with a text editor, given that you cannot open an editor dialog for the properties of the individual corners (you can only set the corners’ positions by dragging them with the mouse, as far as I know; so, it is not possible to make the zone match a position that is in-between grid points at the finest grid)

The finest possible grid is 0.001x0.001mm (0.03937x0.03937 mils). Do you need finer precision?

Anyway, I do agree dragging the corners with the mouse it is a quite tough task.

Right — I was forgetting about the custom grid! You’re right, I doubt I will ever need a finer grid; but then, I guess we agree that there is no substitute for the exact value, typed in using the keyboard!

Inability to edit the position of zone’s corners is definitely in the upper half of my list of peeves with KiCAD!

1 Like

(I’ve been experimenting with grid etc, for some time, and

Your “minimum test case” seems to be so minimal as to hide your intention.

From what I can see your post is full of misplaced perfectionism, but even so, it is not very difficult to achieve in KiCad.

0.01mm is not the smallest default grid in KiCad. The top half of the grid selection is in mils, and they go down to 0.1mil.

If you want to be perfect, then don’t define a via diameter and track width as 0.8mm and then talk about alignment in mil. Pcbnew works internally with nm and that should be close enough to “perfect” for any pcb.

You can also define a user grid:

Pcbnew / View / Grid Settings / User Definded Grid:

and then of course select your user defined grid as active.
I’ve just set the grid to a 1um resolution and it simply works.
If you drag zone boundaries by the round dots in the middle, then horizontal lines stay horizontal, and vertical lines stay vertical.
Zone boundaries are drawn on the current grid and has enough practical resolution for any PCB. For “weird” zone boundaries you can use a combination of a relatively coarse grid and the grid offset, by changing it’s origin.

I was a bit surprised by Pedro’s remark of minimal grid of 1um, but it seems he’s correct:

You can draw 12 unconnected trace segments in 3 seconds? I’m impressed.

To me it looks like you are exagerating your own capabilities and diminishing the capabilities of KiCad (Such as forgetting user grid) I’m not blaming you for that, it is a very common human psychological thing.

Zones do take a bit of time to draw if you need weird grid that does not even fit on the user grid, but modifications after the fist draw are easy.
With a mess of overlappig traces you have to redo them all.
Zones can also be easily copied to other layers.

I’ve modified you mini example a bit.
I drew a zone (not too carefully) and then copied it to another layer.
I also drew 2 arrays of 1000 GND pads.
One row with 1mm offset, and the other with 1.0005mm offset.

2019-03-01_test-xx.zip (16.7 KB)

Yes it is a new feature of version 5. Vias can now be placed directly in a zone without the need for a trace to be attached. (There is however no automatic stitching or guarding implemented. But it will still be a lot easier than your traces trick. If you however have a nice grid for your vias then you can use the array tool.)

The vias for stitching are added using a button in the right toolbar. (Should also be available as an option in the menus and as a hotkey.)

Set the zone clearance to exactly the value you need. Then you can draw it “close enough” and kicad should do the rest. Maybe also play with the minimum width settings.

What’s impressive about it? The mouse snaps to the center of the via/pad; click, move quickly, click again…

Now, wait, ok, I’m (mostly) kidding — I had in mind the 4 tracks in my minimal example; and now, I’m a bit disappointed in myself; I clocked myself, and it actually takes me a bit above 4 seconds… (the horror!! :laughing: )

But really, and I don’t think I’m exaggerating when I say that drawing the same zone would take me between 50 and 100 times that amount of time (again, really, I am not kidding and I am pretty sure I am not exaggerating)

My bottom line with this is: the traces (mostly due to the fact that the mouse “snaps” to the center of the via/pad) give you a very good and fast solution compared to adding zones; for cases where you want to create a pad that should be close to aligned to a grid of vias, then the option of perfectly aligned to the grid of vias is absolutely a valid option.

So are traces … Hmmm, although I will agree with you that selecting the zone to be copied is much faster than having to select the mesh of traces; so there’s an advantage for the zone.

I also have to agree in general that zones do provide more flexibility — yes, if the grid was large (say, 10 x 10 or 20 x 20 vias), then filling with traces is a nightmare; although, a trick I have done at least once (when I had a similar concern with the edge of the zone matching the edges of the vias) is that I did a zone inside the grid, close (“coarsely close”, no precision needed) to the edge, and then drew the outer perimeter with traces.

Ok, granted here too — I was overlooking that aspect. Then again, at the risk of sounding a bit stubborn, I come back to the issue of: why go over all this trouble of: playing with the grid (go to the menu, set custom grid, re-position the grid origin), set different properties in the zone, etc., when the traces provide (in some situations) a faster and easier and cleaner (arguably unnecessarily cleaner, but still cleaner) way — again, mostly related to the issue that for traces, the cursor snaps to the center of the vias.

Go count again, I count:
6 horizontal traces between the GND pads. (See screenshot below).
3 Vertical traces (left & right with the GND path and a thicker in the middle.
6 Traces to connect to D1 and R3.

The point is though that if yo use traces instead of a zone then it becomes hard to edit, but for very small area’s it seems reasonable to indeed draw the outline with a few traces and fill the interior with a (roughly placed) zone.
A possible problem here is that you can easily overlook it if one of those traces gets deleted later in the design process. And because KiCad sees these traces as redundant, they can easily get deleted without you noticing.

Autmatic deletion of redundant Traces is a usefull feature. Take for example a long trace of many segments diagonally zigzagging over the board, just like an old river. Then you see a way of improving the design and you draw a shortcut. When you draw the shortcut, the big loop gets auto deleted.
Try it yourself by first making the obviously weird connection in:
and then drawing the direct connection between R1 and R2.

Setting up zonde boundaries is usually easy and trivial because they can be easily aligned on a grid, but for your … unusual requirements it is indeed a bit cumbersome. For your manually with traces filled “zones” to stay as you want them you have to disable the “remove redundant traces” feature.

Pcbnew / Route / Interactive Router Settings… / Options: / [ ] Remove redundant tracks.

I’ve also been experimenting a bit with “locking”.
I “locked” all the traces in the above example, and then drew the connection between R1 & R2. The tracks I had locked still got removed. Is this a bug, or do I not understand what “lock” means?

Your definition of cleaner is strange. Mine requires a clean gerber generation and ease of maintainance. Yours seem to focus on having pretty numbers in some clearance that i doubt will really matter as much as you think it does.

I actually had tried this as well. My initial reaction was similar to yours (I was like, “huh? is this a bug?”). But after thinking about it for a while, I think it is reasonable — I find it reasonable that “lock” mean “this object’s characteristics are fixed/non-mutable”; that has nothing to do with whether or not the object ceases to exist at the user’s request, so no contradiction there.

No wait:

  • I was referring to the zone only (drawing the zone vs. using traces to create a pad covering the grid of vias)
  • Why do you have 6 horizontal traces connecting vias sideways? (I’m pretty sure it was not like that in the file that I sent — it was the four lines of the “perimeter rectangle” and one line going vertically through the middle, just to complete the area).

It was only the four lines of the perimeter the ones that disappear, so I was referring to drawing those four when I talked about “3 seconds flat” … Anyway, I’m guessing we’re digressing to deeply off-topic here :slight_smile:

Download your own file and check it. You’ll see.
And this is exactly to the point. Making zones with traces is a bigger nuisance than working with zones.

Wait. Are you creating a pad or a zone here? Is it possible that you try to make a thermal pad with zones instead of making it in the footprint editor out of a smd pad plus tht pads?

Look at any qfn footprint that includes -1EP in the name for inspiration on how this could be done or follow Tutorial: How to make a footprint in KiCad 5.1.x (From scratch)? (Link points directly to the section that creates a qfp with an exposed pad plus thermal vias)

I had actually considered this route (I am familiar with it, and yes, I have created my own “thermal grid” footprints). At the time I thought that route was overkill, but in hindsight I think that maybe that’s what I should have done (at least that would have taken care of part of the problem — for the inner layers, I would have had to handle it manually, but those would not have been a big issue, as I don’t have as many nearby traces in the inner layers).

Maybe in the end the bottom line is that I was trapped in my own (misguided) perfectionism, as pointed out earlier in the thread!


I’m utterly puzzled by this. I can assure you (like, 150% absolute certainty) that I did not draw those traces like that; I just drew one from top-left to bottom-left, then one from bottom-left to bottom-right, then one from bottom-right to top-right, and last one from top-right to top-left. (and then one from bottom-right to the center point between the four top-most vias)

In fact, when I did the same four on the opposite layer, those four disappeared, and only the one at the center remained. I never drew and never saw the six horizontal lines (I see them now, after downloading the file I posted — so, it must have been at the moment of saving the file … huh, unless, as a prank, someone edited my post and reuploaded the file? hehehe, that would actually be a clever prank! :laughing: not sure whether it’s even possible, and I’m just joking, I’m sure no-one here would do that, even if it is possible! :slight_smile: )

I had forgotten to comment on this — thanks for the tip; good to know.

I had actually worked around the issue by copy-n-pasting the set of traces from one layer to the other (i.e., select traces, copy, then paste, then edit and change the layer, then move to position — not an issue since both the copy and the paste operations are done with the cursor at a grid point). Of course, much easier to temporarily disable the “Delete redundant traces” setting.

Thanks again!

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