Page 1 of 1

Kicad bottom placement

Posted: Thu Oct 18, 2018 5:47 pm
by caliston
Trying to place a board that was designed in Kicad 5, where most of the parts are on the bottom side of the board.

In Kicad the origin is set to be the bottom left corner of the board when looking from the top down.
In Liteplacer I've ticked 'bottom' and filled in 'job X' to be the width of the board. I then go and load the bottom.pos exported from Kicad.

Having originally taught LP where the bottom left of the board is, it correctly applies the 'job X' correction to find the bottom right. However it doesn't flip the X-coordinate of the placements. So components are placed by moving from the bottom right further right, when they should start at the bottom right and move left.

I could hack the .pos to add a minus sign to the X coords, but I'm worried that parts with rotations or non-centered origins will get messed up. Is there an official way to handle this?

Re: Kicad bottom placement

Posted: Thu Oct 18, 2018 10:09 pm
by JuKu
Maybe KiCad did the coordinate flipping also? LitePlacer software does flip x coordinates, but if they were flipped to start with, it goes wrong. And sounds like you have separate file for bottom? Please try to not check the bottom box, load the file, and look for nominal locations, with or without board offset.

If you can’t figure it out, please send me the pos file and a 1:1 pdf of the board. (If you go for this route, please do this right away; I’m going to be working tomorrow, but I’ll be away for next week and don’t have access to my machine).

Re: Kicad bottom placement

Posted: Fri Oct 19, 2018 4:13 pm
by JuKu
We worked this out: Kicad is able to put out separate files for top and bottom side parts. Kicad knows about top and bottom, and gives negative coordinates for X. In other words, the coordinates are already flipped as we want. LitePlacer also flips the X coordinates when you tell it that you load bottom side data. It also knows about the layer information on the data, and skips the "wrong" side components. These don't match: If you do check the bottom tick box, LitePlacer loads the data, and flips the already flipped X coordinates. If you don't, LitePlacer loads top side components only; you get nothing from the bottom side file.

The solution is to take the bottom side file to a text editor, and do a global search-replace to change all "bottom" words to "top". This tricks LitePlacer to load the components and not to flip the already flipped X coordinates. Physically flipping the PCB takes the origin to the right, so you need to put the board size to X offset.