Grids, Origins, Offsets, and Pitch

This is the only meaning of “pitch” thoughout the Kicad documentation. Particularly, the spacing between pads. I cannot see any confusion.

1 Like

Pedro:
You wrote…

“This is the only meaning of “pitch” throughout the KiCad documentation. Particularly, the spacing between pads. I cannot see any confusion.”

As a newbie, I am willing to prove myself wrong, and went looking through the KiCad documentation [in English] that I have access to. Here is what I found:

In KiCad Getting Started, page 11:
18. …“a large pitch grid” [this usage is confusing in the context of PCB work]

In KiCad PM Manual
No reference at all is made to Pitch

in KiCad Eeschema manual
No reference at all is made to Pitch

In KiCad PCBNew manual, page 114
…“Grid origin [ can be relocated to first pad and ] after, the grid size can be set to the pad pitch”

You referred to setting the Pitch in the Design Rules. I viewed the Design Rules dialogue box from PCBNew, and there is not a single reference to “Pitch” in either of the tabbed panels.

Investigating further… from the Pad Properties dialog panel, on the General tab, one can set Position X and Position Y, Size X and Size Y as well as Drill Size X and Drill Size Y. From the Local Clearance and Settings tab, one can only set dimensions for clearances. In summary: no mention of Pitch is made in the Pad Properties dialog panel

From the Preferences drop-down menu, the General dialog makes absolutely no reference to Pitch.

From the Dimensions drop-down menu, if one chooses Grid, the user can set the Grid Size X and Grid Size Y, as well as the Grid Origin X and Grid Origin Y.

From the Dimensions >> Grid dialog, my PCBNew “Grid” is currently set to 0.1 inches (X and Y). It is my conclusion that this “Grid” dimension actually seems to be setting the “Pitch” of the board, not setting a drawing (layout) grid.

Now… if I right-click anywhere on the layout screen, and choose “Grid Select”, I see that the (layout) grid is set to 50mil, which makes sense when I display it as dots on the screen: i.e., there’s an extra layout grid line between each of the pins on the footprints of the standard components I am using, so the layout grid is 50mil and the Pitch is 100mil (consistent with the “Grid” set via Dimensions >> Grid dialog). If I change the layout grid dimensions using {right mouse click} / Grid Select, I can confirm that the “Grid” spacing set from the Dimensions drop-down menu remains unchanged when I alter this setting.

So, this is what I meant by “confusion.” There are two entities referred to as “grids” in PCBNew, and their functions are un-related.

Dimensions >> Grid sets PITCH, not a “grid” !!

why would you think that one sets a pitch? It sets the origin and spacing of the grid used for drawing.


Edit: I think i understand the source of the confusion.
The dimensions grid dialog sets up a user grid.
You can activate it in the same dialog you described here: (It is the bottom most entry in that)

I know what “pitch” means in EDA and CAD software.

I did not understand your text meaning that followed after the title of “Grid Dimensions vs. component/board Pitch”.

In Escheema, the grid is needed to ensure net connectivity.

Maybe you did not understand it, but I already gave you the answer in my prior post.

One can not put things closer together then the fab houses minimum tolerances; this sets the minimum.

Double this minimum and Kicad, with filled zones, can route GND easily on a two layer board.

At this time I might also suggest that downloading a nightly build might be worthwhile upgrade (standard warnings apply (but should be significantly reduced with as close as the release appears to be)).

Rene:

What do you mean by “a user grid”?

If the user can edit them at any time, are they not all, in a sense, “user grids”?

I think you will have to start by explaining why PCBNew has two “grids”, both of which are editable, though only one is displayed on the screen (dots at grid-line intersections) while the other one is (always?) invisible. I am beginning to sense that one “grid” is the fundamental Cartesian coordinate / reference system which, of course, features an origin, whilst the other is simply a drawing aid overlaid on / stepping out from that reference system. But why would the Cartesian coordinate system (i.e, Dimensions >> Grid) need to have dimensions associated with it at all, if dimensions are fundamental & intrinsic to the Footprints (which then drives the pad spacing) and dimensions are also set in the the drawing (layout) grid?

Pedro expressed his opinion that “Pitch” is consistently used in the KiCad Documentation but, as I feel I’ve rigorously shown in my long note above, Pitch is not a term explicitly used in any of the GUI dialogue panels and, as far as the Documentation is concerned, Pitch is mentioned only fleetingly in the KiCad PCBNew manual and only once (confusingly!) in the KiCad Getting Started manual.

If you are this “hung up” on the single term “pitch” in KiCad, be forewarned that it was much worse in the past; and you are very likely to find a new term to “irk” your sense of how KiCad uses terms.

Meanwhile, the rest of us just deal with the quirks, and enjoy the really cool things that KiCad does EXTREMELY WELL.

Hello, Sprig:

OK—I can understand that you think I am ‘hung up’ on a single term. I can live with that criticism, though I think it misses the point. And, it is not like I don’t appreciate that KiCad is both very cool and very powerful. I am, in fact, quite impressed by what I have seen. And I think, as a newbie, I have made rapid progress getting to know it---- so, the GUI and documentation is certainly good!

On the other hand, I’m trying to do what I can (as a new member of the KiCad community) to point out some things that (as a newcomer to KiCad), I have found to cause…well…head-scratching and knitted eyebrows. I can imagine that things were worse in the past, but they didn’t get any better by the users not discovering bugs, inconsistencies and so forth, then working with the developers to improve the product. Seems to me that, with V5 about to be released, this is a good time to speak up.

By way of summary,

  • From the workflow, it is clear that Eeschema, Footprint Editor, and PcbNew are modular.

  • Each of these modules has an orthogonal coordinate system, and ‘grid’ dimensions. It is now pretty clear to me that these coordinate systems may, in fact, be largely or wholly independent of those in the other modules that they share data with.

  • It is definitely confusing (to a newcomer) when a single module (PcbNew) has more than one ‘grid’ system associated with it. And, that confusion is compounded when indistinct terminology is used. In this particular instance, long-time users might understand that “grid” means one thing in one context, and something else in a different context — but a newcomer would not. Indistinct language steepens the learning curve!

  • I accept that a degree of contextual understanding will always be required. But my philosophy is, simply, that we have a rich language and a vast vocabulary, so there is no need to make learning more difficult than it has to be by drawing from a shallow pool of words.

1 Like

No it doesn’t. And bold caps does not make something true.

Given that no one else has ever had a problem with this term, I suggest that in this case it is not a problem with KiCad. I hope you are not going to quibble over the use of every term in KiCad, otherwise it is going to be a long and arduous journey.

Bobc:
Thank you for your comments. I really don’t intend to quibble endlessly. Rene Poschl has already pointed out that I reached the wrong conclusion there (which is something I did not dispute!) and Rene admits that there is a source of confusion here. I have already asked Rene to elaborate on what he means by a “user” grid, as there certainly seems to be two distinct and active “grids” in PcbNew, and both would seem to be under the control of the user…

If some consensus is reached that it’s confusing, I can change that, if a good alternative is proposed. However, it’s normal in any technical documentation or any other non-fiction prose, or actually in all produced human language, that you can add additional qualifications to words to disambiguate. There’s not just one word, there are two phrases: “grid pitch” and “pad pitch”. They are clearly two different things, at least for me.

NOTICE: what I say next should be true for KiCad future version 5. I remember seeing situations where mouse movement didn’t snap to the currently selected grid, but I don’t remember if it was in v4 or in some nightly builds.

I don’t understand. There’s only one active grid in pcbnew, the one selected. There are possible preselected values and then the possibility to define the values precisely yourself. Only one of the possible grids are selected at one time. The grid values you defined manually yourself is called “user grid”. The currently selected grid is the grid where the cursor snaps to. I doesn’t affect the items which were positioned or edited before the current grid was selected. It’s effective when you move or edit items with mouse (or with keyboard arrow keys in WYSIWYG manner). Then the movement of the item snaps to the current grid.

But not everything hits the current grid. The internal coordinate system of pcbnew is based on nanometers. That’s the absolute smallest defined distance of two things in KiCad. Anything can be set to that coordinate system e.g. with the Properties dialog of an item, regardless of the current or previous or future grid. Is this the other grid you’re referring to? If something is imported from e.g. other software, it must be fit to this internal coordinate system. If the other software had smaller coordinate system “pitch” (the smallest value between two defined points), the imported coordinates must be rounded to the nearest nanometer value. If the other coordinate system “pitch” was more coarse, the values will fit without conversion.

As far as I know, the pcbnew coordinate system’s smallest possible distance is never referred to as “pitch”, and the absolute fixed coordinate system isn’t reffered to as “grid”, but I may be wrong.

Kicad has some pre defined grids. But in ecad programs it makes sense not to limit the user to some set of pre defined grids.

So has been introduced another user set-able grid. The user grid.

The user grid is extremely useful. As kicad is more or less a direct cad program. Without the console where you can enter relative coordinates.

Weird grid spacing are very useful for footprint creation. Have a look at my new tutorial to see how this can be done: Tutorial: How to make a footprint in KiCad 5.1.x (From scratch)?

I recall on v4 that when in the new canvas (OpenGL/Cairo, now called Toolset in the recent nightlies) when just moving the cursor around (nothing being moved, not traces being routed, etc) the cursor wouldn’t snap to the grid. This was evidenced in the coordinate readout in the bottom, making setting the local coordinated right on a grid point difficult. At some point the new canvas started snapping to the grid even when just mousing around. (I thought there was a setting for that, but I think the setting I was thinking of was me being able to turn the cross hairs to always show.)

This conversation makes me realize that the grid snap can’t be turned off, or at least I couldn’t find how to do that on the recent nightly I’m running on this machine. I always use grid snap so I hadn’t noticed before. I suppose if one really wants to “turn of grid snap” they can set the user grid to 1nm and then use that to emulate that effect.

1 Like

“grid must be >= 0,001mm”

Another one of those arbitrary restrictions in KiCad…

My assumption there would be it related to the maximum zoom level currently implemented, again arbitary, but I can understand a dev one day drawing a line in the sand and saying “you cant even buy this tolerance without a military budget”

Or it might even be related to some gerber format limitations. After all it does not make sense to build kicad to be more “free” than the main output format will be. (this of course might already be an outdated restriction but having such a restriction build in at one point makes it hard to remove it as you will not be sure if there is not some part that heavily relies on that restriction.)

To help clarify what I mean by ‘the existence of two grids’ in PcbNew, this image should help:
image

Here, we see a grid (dots at grid intersection points), with the open dialogue box showing the so-called User Grid setting.
The visible grid is set to 50 mil (0.050 inches).
The “user grid” is set to 1 inch.
Functionally, I can easily understand that the Footprints of the components can be moved (using the Grab command) and that they will snap to a location on the dotted layout grid nearest to where the mouse button is released. That’s all very intuitive.

But that still doesn’t explain the need for the existence of the “user grid”, and why the “user grid” has dimensions associated with it.

As I mused / tried to relate in an earlier posting: if the “user grid” is a mechanism for setting the location of the Origin for a user-based coordinate system (and possibly for defining the Axes [directions] of a User Coordinate System) that would be an understandable function [i.e., understandable in the context that every CAD system defines an untouchable coordinate frame and measuring system, and that the positional values seen by the User are simply the mathematical transformations of that untouchable internal system. So, some users may want or need to redefine ‘which way is up’ and so forth].

But at this time, to me, the underlying purpose and function(s) of the ‘User Grid’ of PcbNew are not clear, whereas the visible (dotted, layout) grid’s purpose is very obvious.

There is only one grid. That grid has a multitude of preset dimensions that can be chosen, or you can select “User Grid” which is nothing more than custom dimensions that are applied to the grid. The user grid, or “custom” grid, allows you set the dimension for each axis independently.

Does that help?

1 Like

I propose an easy to make experiment. Set the custom grid to lets say x=1, y=5
right click -> grid -> user grid. What do you observe?


I see that this has no observable effect whatsoever; the visible grid (dots) are in the same location, and the snap-to functionality is exactly the same.

Did you really do all the steps i described above? Because i use kicad now for a long time and it always worked like i described above.

Make a screenshot of the full window (such that i can see your top toolbar. There is a drop down menu for grid selection there. It must read “user grid” such that changing something in the dialog you show takes any effect.) You also need to know that you need to press ok in the window you currently opened to see the effect of changing something in it.

The zoom level might also play a role. Kicad hides sub-divisions of the grid if it gets too dense.