This article describes version 6.0, however, many details are applicable to v5.1.
KiCad is a CAD system with 2D data which needs coordinates to mark locations of items. In theory it’s possible to have a CAD system which relies completely on constraints, not coordinates, but KiCad can’t be like that. There must be an internal coordinate system and all explicitly defined locations must fit to that system.
The layout editor has a resolution of 1 nanometer; this is the smallest difference in X or Y direction which two locations can have. It also has an internal 0,0 origin for the coordinate system which is the “Page origin” – the upper left corner of the page area which you see when you open Pcbnew.
In the internal coordinate system X increases from left to right, which is normal, but Y increases from top to bottom. The reason is historical. The Y axis direction has been very annoying for some users, it was not possible to change previously, so the user has always seen and used the internal coordinate system.
Configurable origin and axis direction
From version 6 onwards it’s possible to configure both the visible origin point and the axis directions.
It is important to know that these alter only the visible coordinates in the graphical user interface. The internal coordinate system and the board file aren’t affected. However, the drill/place file origin may change the footprint position file and the drill file outputs.
These can’t be configured in version 5.
Page origin and internal origin
This is the same as the internal origin of Pcbnew’s coordinate system. Pcbnew has a concept of “page” even though the layout isn’t primarily for printing to paper.
(Screenshot from v5.99.)
By default the page origin is used as the visible coordinates origin. Internal X-coordinate value increases from left to right and Y-coordinate value increases from top to bottom. Page origin cannot be changed.
Drill/Place file origin
This has also been called “Auxiliary axis origin” or “Aux origin”.
This is a point which users can set. Earlier (in v5 and before) it has been possible to use it as an origin point when exporting certain files, but now it’s possible to use it as the origin point for the visual coordinates, too. Select Place -> Drill/Place File Origin. Alternatively use the right hand toolbar tool. In v6 long click on the origins tool or click and drag left to reveal and select the Drill/Place origin tool if it’s not already selected.
KiCad uses a concept of Grid to overcome the difficult to use internal resolution of 1nm. One user defined grid is active at any given time. When items are placed or moved, the cursor usually snaps to grid points but not outside them. Convenient grid resolutions may be 0.1mm or 10mil, for example.
If the user keeps the same fine pitch grid all the time the concept of independent grid origin isn’t necessarily needed. However, supposing a 10x10mm grid is used and an item is placed at each grid point. By default the grid starts from the internal 0,0 origin, so there are grid points at: e.g. 100,100 110,100 120,100 etc.
If starting from 101,101 but still using a required 10x10mm grid, the movable grid origin becomes useful. By opening: View -> Grid Properties, the point from which the grid is defined can be set. It’s the one point of the coordinate system which is always on the grid by definition. It’s not any coordinate origin, relative or non-relative by nature, but it can be used as such.
There’s one danger when changing the grid origin. As can be seen in the illustrations above, the items which were positioned using the old grid origin are out of grid after changing the origin, and vice versa. If the board has been designed with a certain grid and the origin is then changed for some need, it should be returned to the original origin, otherwise difficulties, because most items are now off grid, will occur.
Use Place -> Grid Origin or alternatively the right hand toolbar tool to change the grid origin visually. In v6 long click on the origins tool or click and drag left to reveal and select the Drill/Place origin tool if it’s not already selected.
Local or User origin and coordinates
KiCad has a handy way to make measurements and see positions of items relative to some coordinate point without changing the coordinate system. Just press the spacebar on the keyboard. It sets the “Local origin” (sometimes called “User origin”). It’s a temporary point and meant to be used as a quick helper, not as a permanent reference point. It can be very useful when measuring distances and placing items.
Local origin and Grid origin can also be used as reference points in context menu -> Special Tools -> Position Relative To dialog.