yaqwsx / KiKit

Automation tools for KiCAD
https://yaqwsx.github.io/KiKit
MIT License
1.56k stars 201 forks source link

JLCPCB_CORRECTION wrong orientation on multiple components #762

Open greenscreenflicker opened 2 weeks ago

greenscreenflicker commented 2 weeks ago

Prerequisites

KiKit version

kikit, version 1.6.0

KiCAD version

8.0.5

Operating system

Windows 11

Description

May it be that JLCPCB_CORRECTION is only applied to the first element of a series? I see that the correction is applied for one, but not for the other. In the schematic both are there.

grafik

Steps to Reproduce

Use PCB send. Apply kikit panelize --layout "grid; rows: 1; cols: 5; space: 4mm; rotation: 0deg;" --tabs "fixed; hwidth: 42mm; vwidth: 60mm" --cuts "vcuts" --post "millradius: 0.3mm" --source "tolerance: 20mm" ../acpd_v2.kicad_pcb panel.kicad_pcb kikit fab jlcpcb --assembly --schematic ../acpd_v2.kicad_sch panel.kicad_pcb --no-drc gerber_panel/

Thank you for checking

yaqwsx commented 2 weeks ago

You haven't provided all the necessary files for reproduction - acpd_v2.kicad_sch is missing.

greenscreenflicker commented 2 weeks ago

@yaqwsx send you all the files right now

yaqwsx commented 2 weeks ago

I think your conclusion is incorrect. What happened is that JLC PCB changed the specification of the POS file. They seem to require the orientation of the components to be given when viewing from the corresponding side of the PCB. This didn't use to be the case.

I will need to contact JLC PCB and get a precise specification of what they require, so I can avoid making ad-hoc changes that can even make it worse.

greenscreenflicker commented 2 weeks ago

@yaqwsx note that both sot23 are on the same pcb side, so i don't think thats it

yaqwsx commented 2 weeks ago

It is it. If you switch sides, the orientation of 90 degrees doesn't change, but the orientation of 0 degrees flips to 180 degrees.

greenscreenflicker commented 2 weeks ago

Note that the green is correctly orientated while red is not. Both are the exact same component with the exact same jlcpcb correction parameter. Edit: and both are on the same Side

yaqwsx commented 2 weeks ago

It is it. If you switch sides, the orientation of 90 degrees doesn't change, but the orientation of 0 degrees flips to 180 degrees.

markh-de commented 1 week ago

Yes, it would be great if you could contact JLCPCB and try to fix this issue (#664). Even if you don't get an answer, we really know how to calculate the "correct" values, don't we? If you want to avoid regression, the changed calculation feature could be a CLI option that users need to pass explicitly.

This issue just bit me. I have some connectors that aren't rotated N×90°, and they are good on the top side, but have flipped angle interpretation on the bottom side.

Thanks for all your hard work.

markh-de commented 1 week ago

I did the 180-angle conversion as suggested in #664, until I realized that this only works as long as you don't have orientation compensation != 0°. That compensation data also needs to be flipped. I hope that PR #767 helps fixing this issue.