From 96dcaa1c28cd2ce604555acf0cb2aa3999da2e80 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 14 Nov 2023 13:37:47 -0300 Subject: [PATCH] [Rotatio filter][Added] More rotations From the current https://github.com/matthewlai/JLCKicadTools/blob/master/jlc_kicad_tools/cpl_rotations_db.csv --- kibot/fil_rot_footprint.py | 61 +++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/kibot/fil_rot_footprint.py b/kibot/fil_rot_footprint.py index a9b1a2da..47d34b08 100644 --- a/kibot/fil_rot_footprint.py +++ b/kibot/fil_rot_footprint.py @@ -21,29 +21,63 @@ logger = log.get_logger() # Known rotations for JLC DEFAULT_ROTATIONS = [["^R_Array_Convex_", 90.0], ["^R_Array_Concave_", 90.0], + # *SOT* seems to need 180 + ["^SOT-143", 180.0], ["^SOT-223", 180.0], ["^SOT-23", 180.0], + ["^SOT-353", 180.0], + ["^SOT-363", 180.0], + ["^SOT-89", 180.0], ["^D_SOT-23", 180.0], ["^TSOT-23", 180.0], - ["^SOT-353", 180.0], - ["^QFN-", 270.0], - ["^LQFP-", 270.0], - ["^TQFP-", 270.0], - ["^SOP-(?!18_)", 270.0], - ["^MSOP-", 270.0], - ["^TSSOP-", 270.0], - ["^DFN-", 270.0], - ["^SOIC-", 270.0], - # ["^SOP-18_", 0], - ["^VSSOP-10_", 270.0], + # Polarized capacitors ["^CP_EIA-", 180.0], ["^CP_Elec_", 180.0], ["^C_Elec_", 180.0], - ["^LED_WS2812B_PLCC4", 180.0], + # Most four side components needs -90 (270) + ["^QFN-", 270.0], ["^(.*?_|V)?QFN-(16|20|24|28|40)(-|_|$)", 270.0], + ["^DFN-", 270.0], + ["^LQFP-", 270.0], + ["^TQFP-", 270.0], + # SMD DIL packages mostly needs -90 (270) + ["^SOP-(?!(18_|4_))", 270.0], # SOP 18 and 4 excluded, wrong at JLCPCB + ["^MSOP-", 270.0], + ["^TSSOP-", 270.0], + ["^HTSSOP-", 270.0], + ["^SSOP-", 270.0], + ["^SOIC-", 270.0], + ["^SO-", 270.0], + ["^SOIC127P798X216-8N", 270.0], + ["^VSSOP-8_3.0x3.0mm_P0.65mm", 270.0], + ["^VSSOP-8_", 180.0], + ["^VSSOP-10_", 270.0], + ["^VSON-8_", 270.0], + ["^TSOP-6", 270.0], + ["^UDFN-10", 270.0], + ["^USON-10", 270.0], + ["^TDSON-8-1", 270.0], + # Misc. + ["^LED_WS2812B_PLCC4", 180.0], + ["^LED_WS2812B-2020_PLCC4_2.0x2.0mm", 90.0], ["^Bosch_LGA-", 90.0], ["^PowerPAK_SO-8_Single", 270.0], - ["^HTSSOP-", 270.0], + ["^PUIAudio_SMT_0825_S_4_R*", 270.0], + ["^USB_C_Receptacle_HRO_TYPE-C-31-M-12*", 180.0], + ["^ESP32-W", 270.0], + ["^SW_DIP_SPSTx01_Slide_Copal_CHS-01B_W7.62mm_P1.27mm", -180.0], + ["^BatteryHolder_Keystone_1060_1x2032", -180.0], + ["^Relay_DPDT_Omron_G6K-2F-Y", 270.0], + ["^RP2040-QFN-56", 270.0], + ["^TO-277", 90.0], + ["^SW_SPST_B3", 90.0], + ["^Transformer_Ethernet_Pulse_HX0068ANL", 270.0], + ["^JST_GH_SM", 180.0], + ["^JST_PH_S", 180.0], + ["^Diodes_PowerDI3333-8", 270.0], + ["^Quectel_L80-R", 270.0], + ["^SC-74-6", 180.0], + [r"^PinHeader_2x05_P1\.27mm_Vertical", 90.0], ] DEFAULT_ROT_FIELDS = ['JLCPCB Rotation Offset', 'JLCRotOffset'] DEFAULT_OFFSET_FIELDS = ['JLCPCB Position Offset', 'JLCPosOffset'] @@ -186,7 +220,6 @@ class Rot_Footprint(BaseFilter): # noqa: F821 def filter(self, comp): """ Apply the rotation """ - logger.error(f"{self.invert_bottom} {self.mirror_bottom}") if (self.skip_top and not comp.bottom) or (self.skip_bottom and comp.bottom): # Component should be excluded return