How can I use the grid?

Sorry if this is a dumb question, I’m new to Kicad.

I can’t figure out what the grid does/does not/is for.

I’m trying to place keyswitches, which are 19.05mm. So, I set the user grid to 19.05mm and updated the schematic from PCB.

The keyswitches did not arrive as I expected, with the top and left side of each aligned to grid lines. Instead, they arrived aligned according to some other grid which I had not defined, with each switch having its own different pair of offsets from the x/y grid lines. So… the grid is not for controlling how/where parts are imported.

Next I tried to align each keyswitch according to the grid I had defined. It should be simple to ‘snap’ each switch so its upper left corner is on a grid line, right? Well, no. Movement of each switch was only possible in odd fractions that did not line them up with each other nor with the grid. So… the grid is not for aligning parts when laying them out.

I concluded that the grid must be for constraining movements, and that might be why I could only move the keyswitches in odd fractions that did not line up the top or left edges to grid lines. So if the grid means I can’t move things to align them with the grid, then there must be an alignment tool that snaps the top left corner of a footprint to the top left corner of one of the grid squares. So I searched for that functionality, and sure enough I found “align horizontally” and “align vertically” - these must finally get the top side aligned with a grid line and the left edge aligned with a grid line. Okay. That is not what those tools did. Instead the first jammed them all together on the same horizontal line, and the second jammed them all together on the same vertical line. To add insult to injury, after lining them up vertically, the left edges were still not on a grid line, and after lining them up horizontally the top edges were still not on a grid line. So… the grid is not something that there is any tool in Kicad for aligning things with.

Since the above experiment had left all the switches in exactly the same location, I did the obvious thing and moved the grid origin to the top left edge of that location. Finally all my switches are aligned on the grid. All in the exact same square of the grid, which is a little annoying but you can’t have everything. Given my earlier experience trying to line things up using the mouse, and the failure of everything else that other CAD programs use the grid for, the grid MUST be for constraining movement. And that seems at first to be true. It is now simple to grab the top switch and drag it to be aligned with a different grid square. So I start laying things out. Occasionally I happen to grab a silkscreen legend and inadvertently move it away from the component it refers to (why is that possible? I haven’t ungrouped them…) but I guess that’s what “undo” is for. And then I select an area, move it to a new location, and move on with laying things out, then notice… everything in that area moved some distance which was not an integer multiple of the size of the grid squares. I undo the work I’ve done since that fateful move, then undo it, and redo it. So… the grid seems to be for constraining movement, but does not even do that reliably.

After a while I want to move things in increments of one-quarter of the 19.05mm grid I’ve been working with. Okay, that’s 381/20 of a millimeter, so obviously my new grid size will be 381/80 of a millimeter. So I go to reset the user grid size, type 381/80, and Kicad refuses to deal with ratios. What? Every engineer in the world has to deal with ratios. “Divide this length into 21 equal parts” is a completely ordinary thing that we have to do in CAD programs, and we usually do it by typing “/21” after the measurement we’re using now. Just the same way I wanted 19.05/4, which is 381/80. So… the grid is not for making rational divisions.

19.05mm, my brain is thinking. 19.05mm, where have I seen that before?.. OH YEAH! I REMEMBER! That’s what we had in a previous project where something got laid out in imperial units and then had to be exported to someplace that only speaks metric. That’s three-quarters of an inch! That should make things easy! So, obviously, if 1u is 3/4inch, then 1/4u is 3/16 inch. So I go back to the grid and look for the 3/16 inch grid unit … wait. There is no 3/16 inch grid unit. Nor any other inch grid unit. And I can’t use simple math on the denominator of 381/20 to get the units I want. So every last thing I do here is going to have to involve multiplication or division of some obtuse four-decimal number. So … the grid is not for allowing people to use convenient units, nor for converting things into or out of convenient units.

This grid fails to do every last thing that any grid in any CAD software I’ve ever used does. Except constrain movement. Unreliably.

Why is it there?

[Edit: Forgot to mention. I’m talking about the grid in the PCB Layout editor of KiCad 6.0 running on a Linux install. ]

Which Linux? 6.0 is quite old and not recommended anymore. 6.0 may have had some bug pertaining to this we don’t remember anymore. :wink:

I know Debian has the old stuff by default but backports is up to date I think.

It is Debian Linux.

But I have to tell you, the experience of doing layout with Kicad, and the fact that it is this janky even at version 6.0, does not fill me with confidence that later versions are better. This is the kind of basic stuff that should be working by version 2, and if it’s not there at version 6 then I hate to think how many other things must be wrong.

I guess I’ll go look at Github, and make sure these exact things definitely did get reported and fixed. If they have, then maybe other stuff is okay and fixing the grid may just be something they got to late. An upgrade would be worth my time. Otherwise … I am filled with no confidence that learning Kicad is a worthwhile investment of time and effort.

While we’re at it… what is the “make array” tool for in PCB layout? If I can make an array of things that have the same designations, identifiers, and footprints as things on my schematic, but then “update from schematic” does not realize that they are supposed to be the same things, then there is absolutely no use case for “make array.”

Even noticing that it was there was a waste of my time, and it should be removed until it is implemented in a way that has a meaningful use.

I would just like to point out that there are millions of people that use Kicad every day without any of the problems you appear to have. Wouldn’t you think if the Tool was as fundamentally flawed as you suggest that it would be long gone and forgotten ? The reality is you clearly have no understanding of what you are doing. I mean " No use case for make array " demonstrates zero understanding of even the basics, ‘make array’ in its simplest form is used to place LEDs in accurate patterns. Read the manual, someone else can teach you how to find it as this is a waste of my time and effort
:mouse:

1 Like

It seems you and Kicad may be incompatible. You could demand a refund. Have you ever heard the expression “You can catch more flies with honey than with vinegar”? Your first two posts here reek of vinegar.

1 Like

Please then tell me what make-array is for.

Is there some way to use it that’s actually useful, and if so what is it?

Did you try a basic google of “make array kicad”? You’ll find lots of videos if you don’t have the patience to read or experiment yourself.

Reading the manual helps a lot …

Okay, first page I got with basic googling was

I got: This can be used with some kind of scripting or plugin, kicad should really implement this natively.

I think I tend to agree.

Second page I got was

Which goes into cases of using it for things like laying out arrays of pins and vias - ie, things which have nothing to do with the schematic. Okay, I concede that it isn’t quite as completely useless as I thought. It just can’t be used to place actual components.

From there I got referred to

Which does indeed confirm that “align vertically” and “align horizontally” do indeed squash them all together onto the same horizontal or vertical line. But does not claim that line will ever be aligned with a grid line. It goes on to the “distribute horizontally” and “distribute vertically” tools, which space things out at even intervals – which can be useful, but these intervals are an equal division of however many there are, and have nothing to do with the grid. Further the youtube presenter gets caught by a bug where apparently the order things were created in randomizes their vertical positions while distributing them horizontally.

“read the manual” and “you and kicad may be incompatible” are exactly the kind of statements that do not indicate what the grid is for and why it does not do ANY of the things that grids in CAD programs do.

And advice to “google” things just resulted in confirmation that others are dealing with the same problems.

First of all, you aren’t going to get a whole lot of help on version 6, when version 9 has been released for 6 months.

Secondly, your attitude needs adjusting. Ask for help, and people will willingly give their time to help you. Complain that a tool that everyone on this site uses is fundamentally flawed is bound to get you nowhere. Just because you don’t know how to do something, that doesn’t make the tool defective.

2 Likes

I’m trying to be neutral here, but I’ll admit to a degree of frustration.

Is there any simple way to get things imported from the schematic aligned on the grid? Is this just something that Kicad users have decided they don’t need, or does everybody who cares about it just have to use some third-party plugin or script to do it?

Is there any simple way to get movement fully constrained to grid -sized increments, reliably? This is the only “grid” thing that Kicad’s grid seems to try to do. But it doesn’t even do that reliably. Is this also something that the users have just decided they don’t need? If they have decided they don’t need it, then what do they do instead?

If I do read the manual, will it tell me how to do these things, or will it just tell me about things that are actually implemented?

OK.
First of all, you need to realize that the Schematic and Layout are not designed to communicate positional information back and forth.

The Schematic has its own grid, which should be fixed at 50mils. The position of objects in the Schematic is completely unrelated to the position of objects in Layout.

Kicad will let you place footprints that have been assigned in the schematic into Layout, but then it is up to you to move them where you want them.

ETA: There should be a disclaimer somewhere that says “Note: Kicad is NOT Fritzing!"

1 Like

I will re-state what was said above - version 6 is really old, and throwing mud around based on an old version won’t get you very far. I can’t remember at all what the grid behaviour in thar version was. Version 9 is the current version, it is used for plenty of professional (commercial, open hardware, and research - e.g. CERN) production, as well as hobbyists / makers. Kicad moves everything to the grid with no issues.

1 Like

I don’t mean to be slinging mud around. I just want some concrete reassurance that this basic functionality, in some concrete form, actually exists in the current version. That’s what none of these comments have actually said.

You came closest to saying it when you said “Kicad moves everything to the grid with no issues.” Thank you. That’s the best and most helpful thing I’ve heard anyone say. That alone makes it worthwhile to at least go see if I can find videos or something from anyone using version 9 and explaining exactly what it does provide.

There’s a lot of stuff Kicad could be providing which you might consider relevant to the problem but isn’t actually importing things on the user-defined grid, and isn’t actually constraining movement reliably, and isn’t actually accepting ratios or imperial measurements or user-defined units for grid sizes, and isn’t actually providing a “snap component to grid” functionality.

It might be all of those, it might be one or two, it might be something else entirely. I’m glad to hear that something has been done, anyhow.

Kicad has loads of positioning tools.
The Grid is probably the least useful - in my workflow, I only use to to space traces.
If you want to position footprints accurately to each other, either use the Array tool, or the many “position” tools.

When people open a thread with such a statement, my motivaton to continue reading drops to slightly above zero.

Then I see a very long post with seemingly trivial details.

KiCad V6? It’s 2025.

Yes.

  1. Schematic Editor / Preferences / Preferences / Schematic Editor / Grids and set your grid to 50mil. This is the simple solution. Do not use any other grid before you have read all of KiCad’s documentation.
  2. In the schematic editor: Zoom out, select evertying (a box as big as the sheet), then Right Mouse button and Align Elements to Grid.

Euhm, leave the grid on. Don’t turn it off? V6 is too long ago to remember peculiarities, but as long as you always use a 50mil grid you encounter no problems.

Are you asking us whether there is anything in the manual that is worth reading for you? Is that a serious question?

But either way, I verified it for you:

This took me much less time then it took you to write your post.
But I do feel some sympathy for you. I also tend to fall in the trap of procrastinating while I know there are more efficient ways to learn things.

Is there now some way to use the array tool to position the footprints of components on the schematic, so they then get imported to those footprints? That’s important to know, and that’s one of the crucial things I have been trying to do. Thank you.

Get your terminology right. There are no footprints in the schematic. Writing such things is confusing.

Agh. You’re right. Footprints are assigned in the schematic but actually placed on the PCB layout tool.

You’ve wasted way more of your own time on this thread (let alone all the others reading) than it would have taken to download a current version and just try this out. Ask chatGPT next time.