Bouni / kicad-jlcpcb-tools

Plugin to generate BOM + CPL files for JLCPCB, assigning LCSC part numbers directly from the plugin, query the JLCPCB parts database, lookup datasheets and much more.
MIT License
1.13k stars 102 forks source link

Rotation override by component property #419

Open lk-davidegironi opened 6 months ago

lk-davidegironi commented 6 months ago

Just like using the 'LCSC Part #' property to auto compile the JLC part number, it would be useful if the 'JLCPCB Rotation Offset' were implemented as a Rotation table override for specific board component. Sometime it happens one package has to be rotate in one board and in other not. (I've found this problem with the Potentiometer_Bourns_3296W_Vertical package, as example the C118954 part).

Bouni commented 6 months ago

Can you go a bit more into detail why a part has to be rotated in one board but not in the other? That makes no sense to me ....

lk-davidegironi commented 6 months ago

I've investigate further to prepare a sample for you. And I've found something "strange". Let's take just the RV1 component (Potentiometer_Bourns_3296W_Vertical) On the board1 with the placement error I've this CPL line for RV1 _RV1,1K,Potentiometer_Bourns_3296WVertical,54.864,-77.988,90.0,top But on the JLCPCB Tools (2023.09.01), the RV1 line looks like this (no rotation, rotation = zero 0) jlcpcb_tool On JLCPCB it looks like the image attached below (90 degree rotated) board_2

The other board indeed has RV1 with not rotation, the CPL line is: _RV1,10k,Potentiometer_Bourns_3296WVertical,85.969,-87.376,0.0,top And I've no error on JLCPCB online.

So I suppose It's something related to just one board. Find attached by rotation Export.

rot.csv

dzid26 commented 6 months ago

Can you go a bit more into detail why a part has to be rotated in one board but not in the other? That makes no sense to me ....

  1. Because there can be multiple footprints with the same name - embedded in PCB file - that have different rotations - this happened to me after importing from Altium. I didn't bother making 100s of footprints to be all the same orientation.
  2. It is also not guaranteed that JLC parts will be always consistent for a given footprint

Of course for a perfect board / ideal world this shouldn't be an issue.
In practise, I use https://github.com/bennymeg/JLC-Plugin-for-KiCad for more messy projects which need corrections per component.

lk-davidegironi commented 6 months ago

Thank you,

I have tried JLC-Plugin-for-KiCad but I prefer the way this plugin works. To me what can solve this issue is a "JLCPCB Rotation Offset" 'JlcRotOffset' 'JLCRotOffset' field as a parameter, or at least prioritize the "JLCPCB Rotation Offset" parameter if exists. But it has to be implemented as a new features.