Handle correction offsets and rotation separately #707
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into some very confusing/unintuitive behavior when setting both rotation and X/Y offsets on a component, and I think it's a bug, but please correct me if I'm wrong.
I have a PCB file where the rotation of a component is set to -90, and I noticed when uploading the position file for a PCBA job that it is off by 180 degrees from JLCPCB's library. I set the JLCPCB_CORRECTION field to
0;0;180
in my schematic to fix that, then went to update the X/Y offsets which were also offset. But because the component's rotation ended up being converted to 90 degrees this function effectively swapped X and Y, which is very confusing, especially when making changes to both X and Y at the same time.I don't think it makes sense for the rotation angle to be taken into account when applying the X/Y correction fields here. Intuitively, I expect X and Y to be applied as is to the final positions regardless of the rotation, but let me know what you think