This topic has been brought up once before as a bug on GitLabs (https://gitlab.com/kicad/code/kicad/-/issues/13101) but the proposed solution (inverting the Y-axis in the settings) did not work for me and I figured I should ask the forums before declaring this a software bug.
Problem: All the Y-axis coordinates in the POS file I am generating are inverted (i.e. all Y-axis coordinates have been multiplied by -1). This remains even when I invert the Y-axis in the settings.
In the image below, the Y-axis has been set to increase when moving down. In the POS file generated using this setting, you can see that C1 is supposed to be located at X: 42.745, Y: 24.265. But checking the position of C1 on the Gerbers you can see that the component is located at roughly X: 42.75 and Y: -24.25.
Preferences / PCB Editor / Origins & Axes is only for the visual canvas in the PCB editor. It does not influence coordinates inside KiCad or output files.
If you want to verify coordinates of the component placement files, then it’s best to use a program that can load both the Gerbers (IPC…) and the POS files. It appears that the .POS file can not be loaded by KiCad’s own Gerber viewer, but many people prefer to use software from another manufacturer anyway, just to exclude the possibility that an error in the Gerber files is interpreted in the same erroneous way by both the “Fabrication Output” function and the gerber viewer.
to find how to promote yourself to be able to attach a file to your post.
Prepare a simple project showing your problem. Pack it (File - ??? (I have no KiCad here and don’t remember the name of function I have never used) and post it here.
I believe someone using V9 (I have not moved to V9 yet) will open your project and check what is going on.
I have never noticed (since V5, through V6 and V7 to V8) any problems with gerber and position files but I have never looked inside them to check coordinates of anything.
IIRC the Gerber files and the CPL file have their own origin points. I forget which one affects the CPL and I don’t have time at the moment to look at a past PCBA project of mine, as I think it was done on v7 and I’d have to migrate it, and I’m not even on v9 yet, waiting to get a round tuit to upgrade my OS and KiCad.
Have a look at the instructions for a fabrication plugin or those of the fabricator. IIRC JLC tells you which origin to set, but they still manage to align it correctly in their preview even if you don’t get it right. Good luck.
@paulvdh - I was poking around the web for a combined Gerber and Pick & Place viewer but was unable to find one. Is there one you could recommen?
@Piotr - Thanks for pointing out the lack of a demo file. I have tried generating a minimalist example but learned that, as a new user, I cannot upload files.
Our CM has since provided us a more detailed report that wasn’t just “your Pick and Place file is broken” and looks like it’s only a subset of components, so it seems the flip in Y-axis wasn’t the issue for them after all. It could be that the mismatch between the Gerber Viewer coordinate system and the Pick & Place file is just a quirk of the tool and not indicative of an actual mismatch.
Thank you so much for suggesting the Ucamco viewer! That’s just the tool I need.
I have managed to get to the bottom of my placement woes in the meantime: My colleague had converted the POS file to a CSV, and that process had moved a bunch of commas.