Position/placement file not lining up with Gerbers in JLCPCB "Review Parts Placement"

I don’t understand your problem at all. Gerbers and the position file correlate, both have the same coordinates. So what’s the problem?

I stoped replying cause it was 4:00 in the morning and I eventually waved the white flag and went to bed. I am comfortable with 0,0 being top left, e.g. the web works like that.

However 0,0 bottom left is how gerbers are defined (correct me if I am wrong, but I have been reading https://www.bosco.co.za/DownloadDocs/The_Gerber_Format_Specification.pdf to try understand it). Since one is creating gerber artwork, why not follow the axis one is going to output to?

However my issue is not were co-ordinate is, but that it is applied consistently. I am starting to thing the issue lies in the Gerber Viewer of KiCAD that is inversing the Y cordinate, without telling one, to make it match the PCB editor. Unfortunately this obfuscation confuses the issue. When I open the gerbers in another gerber viewer, the Y-axis is flipped compared to KiCADs Gerber viewer. Which one is correct? I am guessing not the KiCAD one because of its history with the Y-Axis

Sure, however its the position file aligning with the gerbers (not the gerbers themselves), that is the issue.

Yes the centers to not correlate. They are all positioned correctly relative to each other, but not relative to the board. The offsets depends on the check “Use drill/place file origin”, and where I place the drill/file origin, and whether to use positive Y-Axis. Sometimes they are close, sometimes far, but never aligned.

This is the closest I have manage to get. It looks like an issue of component center vs component top left. But I confirmed with JLCPCB that the position of the component must be center, center, as are my footprints (centered on the origin).

PS the big white block is some IC’s which have the incorrect rotation, I will fix the rotation after getting the placement right, but didnt want to open another can of worms.

I have never looked into that files.
From your picture it looks for me like they are not ‘positioned correctly relative to each other’.
C11 has different offset than C9.
That suggests that there is scale problem to be solved. Then see if 0,0 problem still exists.

Correct me if I’m wrong, but the view in the screenshot seems to be something else than KiCad. Maybe JLCPCB preview? It’s not guaranteed at all that their view is correct even when the files are and their manufacturing process is. Their web view is independent from their other software.

Like Piotr said, there seems to be a scaling problem.

Have you followed the instructions in https://support.jlcpcb.com/article/84-how-to-generate-the-bom-and-centroid-file-from-kicad?

Well spotted! I did not pick that up. Thank you! There is a scaling problem, here one can see the increasing X offset:

I checked the gerber scaling output and it is set to default 1:1 (and grayed out for edit). The position file does not have a scaling option, so I don’t know where it is coming from.

I change the drill/file origin to the center of C10 which is about the center of the PCB, shown by the yellow cross hair below. My thinking was scaling issue should show offsets radiating out from the origin, but it got even more whacky. Don’t know how to solve it.

Yes you are correct, it is the JLCPCB web “Review Parts Placement”. From other threads I have read here, some people have their parts aligned, so I don’t know why I can’t figure out how to get it aligned too.

Even though they can fix it on their side, I would like to get to the root cause of the error, so that in future the position file is exported 100% right.

I repeat the question because you didn’t answer: did you follow their instructions exactly? Scaling problem may refer to some kind of mm vs. inch problem. Gerbers use mm but you can choose the units for the pos file. It has to be mm, too.

It seems to be so. I don’t think it’s possible to change the actual coordinate system of the gerber files, but KiCad does that for viewing because the viewer is integrated to work with pcbnew. That’s outdated now anyways in v5.99 because it’s possible to change the visual coordinates in pcbnew. Time to file an issue…

I have read that and followed it (I have read a lot of their documentation trying to figure it out before posting here). Besides, if it was a mm vs inch problem I would think the scaling would be much more off. I matched their settings exactly (there not many settings to check). I used mm through out all the files.

I see you raised
#8674
, I actually had already raised #8672, great minds think alike!

PS I think you explained the issue better though.

In the end I could not get the placement file to line up in a way that worked with them. They had to correct it on their side.

you may have a look at:


and

Or use KiKit: https://github.com/yaqwsx/KiKit that will handle all the manufacturer-specific details for you.

I’m Having the same issue. Usually I get everything on correct centroid positions. But I recently designed a PCB and I used “flip Board view” view in Kicad. I noticed there was some glitches in coordinates when its flipped. Now I’m having the scaling issue in gebers and centroids.

it would be useful to compare a set of gerber and positioning file made with and without the flip board view…
If this is the culprit, we need to rise an issue at gl.

I believe this issue is caused by silkscreen/courtyard layers extending outside of the board outline. Other tools will automatically crop the silkscreen layer to be fully inside the board area, but AFAIK KiCad currently does not.

The easy fix is to add a break-away border around your entire design, so that all components which would otherwise hang over the edge are now contained inside.

1 Like

I just made a similar board without using “flip view” and unfortunately I get the same issue for this one as well. I’m wondering if JLC’s gerber viewer having problems. I manually measured the distances in gerber using ViewMate, and compared them with the distances in CPL (centroid file) and they are fine.

However, older project files from other projects show correct placement in JLC’s gerber viewer. I tried regenerating new files to check whether i could replicate the issue. but older projects will not have a problem with freshly generated fab files.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.