I want to specify the position of a number of modules on a pcb. It appears that the X and Y coordinates are relative to the zero point of the drawing frame somehow.
How can i define a board origin so that i can refer the modules to it? the grid origin does not seem to work
AFAIK, you cannot set an origin for modules. Not sure why setting grid origin does not do that.
For placing modules, I set the relative origin using space bar, with the caveat that “up” is negative. Or if you have good script-fu, process the pcb file externally.
I find it surprising that you cannot reference the modules from a board origin. this is particularly important if you need to fit them to a case panel, and you cannot trust the doing it with the mouse.
BTW, the layout editor does not do this and it could not - since it depends where the board is on the page
it’s not really surprising… KiCAD has a history and they seem to have started with the layout being based on an origin that refers to the upper left corner of a piece of paper.
I told you in that other thread how you could try to get the origin inside the layout borders…
It’s perfectly possible to place footprints without the mouse to an accuracy of 0.01 mm to any board edge you can think of, it’s just not doable the way you expect it to work.
Try this:
set the grid spacing to what your accuracy should be
select a footprint to be placed, but don’t drop it yet
move the mouse cursor to the board edge/corner you want as origin (zoom in if needed)
let off your mouse, really hands off
use the arrow keys to move the footprint on top of your desired origin
press [SPACE]
use the arrow keys to move the footprint relative to this origin at the accuracy you wanted
when happy with the coords press [ENTER]
It’s not fast, it’s not cool but it get’s the job done if needed for those rare times when you need a component at (x,y).
Personally I place components on a 0.25mm grid and I draw the board edge on a 0.5mm grid most of the time. If anything needs accuracy above method get’s me there any time.
If I need references/helpers I draw vertical/horizontal lines on cmts.user layer for easier/faster placing if needed…
PS: I don’t meant to say it should stay as it is, just that stuff works if one is smart about it.
There is lot to be desired in KiCAD still, the wishlist is long. We all know that.
Mind you that new origin setting (“Set the origin point for the grid”) is actually a grid alignment point rather than a grid origin. Setting it doesn’t change your grid origin but rather sets an alignment point for grids with different, especially not divisible, steps (e.g. 0.1 mm and 1.27 mm). It’s quite a useful feature but its name is misleading.