If a rotation offset is applied, it works as you would expect, just added to the rotation, and could be used as a -20 offset to "fix" the bottom layer in this case, but that only works if rotated 10 degrees. Rotate 20 and you need to change the JLCPCB Rotation Offset to -40 to fix it. This is why the offsets seemed not to work. It is not the offset that is wrong, it is that all rotations on the back of the board need to be inverted, so as to be "as viewed from above the component" and not "as viewed from top" in the way KiCad works.
I think if the JLCPCB Rotation Offset is applied first, when present, to correct for whatever orientation JLC have used for the part, but then all bottom side rotations are inverted, it will be consistent and avoid having to tweak the back of every board.
This was obviously not obvious as rotations 0, and 180 did not show the problem, and 90 or 270 only showed on polarised components. But even a simple 0603, with no need for any rotation offset, breaks if placed at 45 degrees, so I think this is a definite bug, and should be fixed even with the backwards compatibility issues it would cause.
The
positions.csv
is generated with Mid X, Mid Y, and Rotation "as viewed from top". This seems to be how KiCad works.E.g. this is two 0603 resistors with rotation of 10 degrees.
KiCad 3D view shows clearly.
As you can see the 10 degree rotations is "as viewed from top".
The
positions.csv
file looks like this... showing both as 10 degrees.However, when loaded on JLCPCB the rotation on the bottom is wrong, e.g
Clearly JLC are expecting the rotation "as viewed from above the component".
The
positions.csv
file needed isThis works as expected.
If a rotation offset is applied, it works as you would expect, just added to the rotation, and could be used as a -20 offset to "fix" the bottom layer in this case, but that only works if rotated 10 degrees. Rotate 20 and you need to change the
JLCPCB Rotation Offset
to -40 to fix it. This is why the offsets seemed not to work. It is not the offset that is wrong, it is that all rotations on the back of the board need to be inverted, so as to be "as viewed from above the component" and not "as viewed from top" in the way KiCad works.I think if the
JLCPCB Rotation Offset
is applied first, when present, to correct for whatever orientation JLC have used for the part, but then all bottom side rotations are inverted, it will be consistent and avoid having to tweak the back of every board.This was obviously not obvious as rotations 0, and 180 did not show the problem, and 90 or 270 only showed on polarised components. But even a simple 0603, with no need for any rotation offset, breaks if placed at 45 degrees, so I think this is a definite bug, and should be fixed even with the backwards compatibility issues it would cause.