From 485c2543501ea31afcb6524bd57549555f875dc9 Mon Sep 17 00:00:00 2001 From: evanshultz Date: Wed, 2 Oct 2019 08:46:56 -0700 Subject: [PATCH 1/4] Fixed terminal width error size_tantal.yaml:SMD_2012-12 --- .../SMD_chip_package_rlc-etc/size_definitions/size_tantal.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_tantal.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_tantal.yaml index 67fa869e2..ed0e13652 100644 --- a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_tantal.yaml +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_tantal.yaml @@ -46,8 +46,6 @@ SMD_2012-12: terminal_length: nominal: 0.5 tolerance: 0.2 - terminal_width_min: 0.8 - terminal_width_max: 1.0 terminal_width: nominal: 0.9 tolerance: 0.1 From 24d95b2add2e0dc673aa101991a7c2852a8635d8 Mon Sep 17 00:00:00 2001 From: evanshultz Date: Wed, 2 Oct 2019 09:56:06 -0700 Subject: [PATCH 2/4] Generate unique R, L, and C footprints - File renames to remove 'chip' if file contained more than chip info - Aligned size definition file names - Print part type and definition during execution - Corrected descriptions and keywords in SMD_chip_devices.yaml - Fixed a few typos in comments --- ...kage_rlc-etc.py => SMD_package_rlc-etc.py} | 7 +- ...MD_chip_devices.yaml => SMD_packages.yaml} | 68 ++++----- ...ip.yaml => ipc7351B_smd_two_terminal.yaml} | 0 ...hip.yaml => ipc7351_smd_two_terminal.yaml} | 0 .../size_definitions/size_capacitor_chip.yaml | 143 ++++++++++++++++++ .../size_capacitor_chip_devices.yaml | 60 -------- .../size_capacitor_chip_smaller_0603.yaml | 12 ++ ...tantal.yaml => size_capacitor_tantal.yaml} | 44 +++--- ...ip_devices.yaml => size_default_chip.yaml} | 29 ++-- ...ml => size_default_chip_smaller_0402.yaml} | 0 ...ml => size_default_chip_smaller_0603.yaml} | 0 .../size_definitions/size_inductor.yaml | 43 +++++- .../size_definitions/size_resistor.yaml | 14 -- .../size_definitions/size_resistor_chip.yaml | 112 ++++++++++++++ .../size_resistor_chip_smaller_0603.yaml | 12 ++ ...yaml => size_resistor_chip_wide_body.yaml} | 8 +- 16 files changed, 401 insertions(+), 151 deletions(-) rename scripts/SMD_chip_package_rlc-etc/{SMD_chip_package_rlc-etc.py => SMD_package_rlc-etc.py} (99%) mode change 100755 => 100644 rename scripts/SMD_chip_package_rlc-etc/{SMD_chip_devices.yaml => SMD_packages.yaml} (84%) rename scripts/SMD_chip_package_rlc-etc/{ipc7351B_smd_two_terminal_chip.yaml => ipc7351B_smd_two_terminal.yaml} (100%) rename scripts/SMD_chip_package_rlc-etc/{ipc_smd_two_terminal_chip.yaml => ipc7351_smd_two_terminal.yaml} (100%) create mode 100644 scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip.yaml delete mode 100644 scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip_devices.yaml create mode 100644 scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip_smaller_0603.yaml rename scripts/SMD_chip_package_rlc-etc/size_definitions/{size_tantal.yaml => size_capacitor_tantal.yaml} (97%) rename scripts/SMD_chip_package_rlc-etc/size_definitions/{size_default_chip_devices.yaml => size_default_chip.yaml} (85%) rename scripts/SMD_chip_package_rlc-etc/size_definitions/{size_default_chip_devices_smaller_0402.yaml => size_default_chip_smaller_0402.yaml} (100%) rename scripts/SMD_chip_package_rlc-etc/size_definitions/{size_default_chip_devices_smaller_0603.yaml => size_default_chip_smaller_0603.yaml} (100%) delete mode 100644 scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor.yaml create mode 100644 scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip.yaml create mode 100644 scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip_smaller_0603.yaml rename scripts/SMD_chip_package_rlc-etc/size_definitions/{size_wide_body_chip_resistor.yaml => size_resistor_chip_wide_body.yaml} (97%) diff --git a/scripts/SMD_chip_package_rlc-etc/SMD_chip_package_rlc-etc.py b/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py old mode 100755 new mode 100644 similarity index 99% rename from scripts/SMD_chip_package_rlc-etc/SMD_chip_package_rlc-etc.py rename to scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py index 9e406b2ff..4b568458e --- a/scripts/SMD_chip_package_rlc-etc/SMD_chip_package_rlc-etc.py +++ b/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py @@ -49,7 +49,7 @@ def calcPadDetails(self, device_dimensions, ipc_data, ipc_round_base, footprint_ # Gmin = Smax − 2JH − √(CS^2 + F^2 + P^2) # Xmax = Wmin + 2JS + √(CW^2 + F^2 + P^2) - # Some manufacturers do not list the terminal spacing (S) in their datasheet but list the terminal lenght (T) + # Some manufacturers do not list the terminal spacing (S) in their datasheet but list the terminal length (T) # Then one can calculate # Stol(RMS) = √(Ltol^2 + 2*^2) # Smin = Lmin - 2*Tmax @@ -95,7 +95,7 @@ def deviceDimensions(device_size_data): elif 'terminal_length_max' in device_size_data and 'terminal_length_min' in device_size_data or 'terminal_length' in device_size_data: dimensions['terminal_length'] = TolerancedSize.fromYaml(device_size_data, base_name='terminal_length') else: - raise KeyError("Either terminator spacing or terminal lenght must be included in the size definition.") + raise KeyError("Either terminator spacing or terminal length must be included in the size definition.") if 'terminal_width_min' in device_size_data and 'terminal_width_max' in device_size_data or 'terminal_width' in device_size_data: dimensions['terminal_width'] = TolerancedSize.fromYaml(device_size_data, base_name='terminal_width') @@ -120,6 +120,7 @@ def generateFootprints(self): print(exc) for size_name in package_size_defintions: + print(group_name + ': ' + size_name) device_size_data = package_size_defintions[size_name] device_dimensions = TwoTerminalSMDchip.deviceDimensions(device_size_data) @@ -326,7 +327,7 @@ def generateFootprints(self): help='list of files holding information about what devices should be created.') parser.add_argument('--global_config', type=str, nargs='?', help='the config file defining how the footprint will look like. (KLC)', default='../tools/global_config_files/config_KLCv3.0.yaml') parser.add_argument('--series_config', type=str, nargs='?', help='the config file defining series parameters.', default='config_KLCv3.0.yaml') - parser.add_argument('--ipc_definition', type=str, nargs='?', help='the ipc definition file', default='ipc7351B_smd_two_terminal_chip.yaml') + parser.add_argument('--ipc_definition', type=str, nargs='?', help='the ipc definition file', default='ipc7351B_smd_two_terminal.yaml') parser.add_argument('--force_rectangle_pads', action='store_true', help='Force the generation of rectangle pads instead of rounded rectangle (KiCad 4.x compatibility.)') args = parser.parse_args() diff --git a/scripts/SMD_chip_package_rlc-etc/SMD_chip_devices.yaml b/scripts/SMD_chip_package_rlc-etc/SMD_packages.yaml similarity index 84% rename from scripts/SMD_chip_package_rlc-etc/SMD_chip_devices.yaml rename to scripts/SMD_chip_package_rlc-etc/SMD_packages.yaml index f0356eaa0..4174bd119 100644 --- a/scripts/SMD_chip_package_rlc-etc/SMD_chip_devices.yaml +++ b/scripts/SMD_chip_package_rlc-etc/SMD_packages.yaml @@ -1,6 +1,6 @@ resistor: fp_lib_name: 'Resistor_SMD' - size_definitions: ['size_default_chip_devices.yaml', 'size_wide_body_chip_resistor.yaml', 'size_resistor.yaml'] + size_definitions: ['size_resistor_chip.yaml', 'size_resistor_chip_wide_body.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'R' description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -11,7 +11,7 @@ resistor: resistor_smaller_0603: fp_lib_name: 'Resistor_SMD' - size_definitions: ['size_default_chip_devices_smaller_0603.yaml'] + size_definitions: ['size_resistor_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'R' description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -22,7 +22,7 @@ resistor_smaller_0603: resistor_smaller_0402: fp_lib_name: 'Resistor_SMD' - size_definitions: ['size_default_chip_devices_smaller_0402.yaml'] + size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'R' description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -37,7 +37,7 @@ resistor_smaller_0402: resistor_handsolder: #ToDo: only generate > 0402 fp_lib_name: 'Resistor_SMD' - size_definitions: ['size_default_chip_devices.yaml', 'size_wide_body_chip_resistor.yaml', 'size_resistor.yaml'] + size_definitions: ['size_resistor_chip.yaml', 'size_resistor_chip_wide_body.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'R' description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' @@ -50,7 +50,7 @@ resistor_handsolder: capacitor: fp_lib_name: 'Capacitor_SMD' - size_definitions: ['size_default_chip_devices.yaml', 'size_capacitor_chip_devices.yaml'] + size_definitions: ['size_capacitor_chip.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'C' description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -61,7 +61,7 @@ capacitor: capacitor_smaller_0603: fp_lib_name: 'Capacitor_SMD' - size_definitions: ['size_default_chip_devices_smaller_0603.yaml'] + size_definitions: ['size_capacitor_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'C' description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -72,7 +72,7 @@ capacitor_smaller_0603: capacitor_smaller_0402: fp_lib_name: 'Capacitor_SMD' - size_definitions: ['size_default_chip_devices_smaller_0402.yaml'] + size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'C' description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -87,7 +87,7 @@ capacitor_smaller_0402: capacitor_handsolder: #ToDo: only generate > 0402 fp_lib_name: 'Capacitor_SMD' - size_definitions: ['size_default_chip_devices.yaml', 'size_capacitor_chip_devices.yaml'] + size_definitions: ['size_capacitor_chip.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'C' description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' @@ -99,7 +99,7 @@ capacitor_handsolder: capacitor_tantal: fp_lib_name: 'Capacitor_Tantalum_SMD' - size_definitions: ['size_tantal.yaml'] + size_definitions: ['size_capacitor_tantal.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'CP' description: 'Tantalum Capacitor SMD {code_letter:s} ({code_metric:s} Metric), IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -111,7 +111,7 @@ capacitor_tantal: capacitor_tantal_handsolder: fp_lib_name: 'Capacitor_Tantalum_SMD' - size_definitions: ['size_tantal.yaml'] + size_definitions: ['size_capacitor_tantal.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'CP' description: 'Tantalum Capacitor SMD {code_letter:s} ({code_metric:s} Metric), IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -125,7 +125,7 @@ capacitor_tantal_handsolder: inductor: fp_lib_name: 'Inductor_SMD' - size_definitions: ['size_default_chip_devices.yaml', 'size_inductor.yaml'] + size_definitions: ['size_default_chip.yaml', 'size_inductor.yaml'] # inductor size definitions overwrite generic ones ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'L' description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -136,7 +136,7 @@ inductor: inductor_smaller_0603: fp_lib_name: 'Inductor_SMD' - size_definitions: ['size_default_chip_devices_smaller_0603.yaml'] + size_definitions: ['size_default_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'L' description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -147,7 +147,7 @@ inductor_smaller_0603: inductor_smaller_0402: fp_lib_name: 'Inductor_SMD' - size_definitions: ['size_default_chip_devices_smaller_0402.yaml'] + size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'L' description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -162,10 +162,10 @@ inductor_smaller_0402: inductor_handsolder: #ToDo: only generate > 0402 fp_lib_name: 'Inductor_SMD' - size_definitions: ['size_default_chip_devices.yaml'] + size_definitions: ['size_default_chip.yaml', 'size_inductor.yaml'] # inductor size definitions overwrite generic ones ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'L' - description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' + description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' keywords: 'inductor handsolder' ipc_density: 'nominal' pad_length_addition: 0.35 @@ -175,7 +175,7 @@ inductor_handsolder: diode: fp_lib_name: 'Diode_SMD' - size_definitions: ['size_default_chip_devices.yaml', 'size_diode.yaml'] + size_definitions: ['size_default_chip.yaml', 'size_diode.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'D' description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -187,7 +187,7 @@ diode: diode_smaller_0603: fp_lib_name: 'Diode_SMD' - size_definitions: ['size_default_chip_devices_smaller_0603.yaml'] + size_definitions: ['size_default_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'D' description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -199,7 +199,7 @@ diode_smaller_0603: diode_smaller_0402: fp_lib_name: 'Diode_SMD' - size_definitions: ['size_default_chip_devices_smaller_0402.yaml'] + size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'D' description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -214,7 +214,7 @@ diode_smaller_0402: diode_handsolder: fp_lib_name: 'Diode_SMD' - size_definitions: ['size_default_chip_devices.yaml', 'size_diode.yaml'] + size_definitions: ['size_default_chip.yaml', 'size_diode.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'D' description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -227,7 +227,7 @@ diode_handsolder: diode_castellated: fp_lib_name: 'Diode_SMD' - size_definitions: ['size_default_chip_devices.yaml', 'size_diode.yaml'] + size_definitions: ['size_default_chip.yaml', 'size_diode.yaml'] ipc_reference: "ipc_spec_castellated" prefix: 'D' description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), castellated end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -240,11 +240,11 @@ diode_castellated: led: fp_lib_name: 'LED_SMD' - size_definitions: ['size_default_chip_devices.yaml'] + size_definitions: ['size_default_chip.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'LED' description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' - keywords: 'diode' + keywords: 'LED' ipc_density: 'nominal' pad_length_addition: 0 polarization_mark: 'True' @@ -252,7 +252,7 @@ led: led_smaller_0603: fp_lib_name: 'LED_SMD' - size_definitions: ['size_default_chip_devices_smaller_0603.yaml'] + size_definitions: ['size_default_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'LED' description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -265,7 +265,7 @@ led_smaller_0603: led_smaller_0402: fp_lib_name: 'LED_SMD' - size_definitions: ['size_default_chip_devices_smaller_0402.yaml'] + size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'LED' description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -280,7 +280,7 @@ led_smaller_0402: led_handsolder: fp_lib_name: 'LED_SMD' - size_definitions: ['size_default_chip_devices.yaml'] + size_definitions: ['size_default_chip.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'LED' description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -293,7 +293,7 @@ led_handsolder: led_castellated: fp_lib_name: 'LED_SMD' - size_definitions: ['size_default_chip_devices.yaml'] + size_definitions: ['size_default_chip.yaml'] ipc_reference: "ipc_spec_castellated" prefix: 'LED' description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), castellated end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' @@ -306,33 +306,33 @@ led_castellated: ############################################################################### fuse: fp_lib_name: 'Fuse' - size_definitions: ['size_default_chip_devices.yaml', 'size_fuse.yaml'] + size_definitions: ['size_default_chip.yaml', 'size_fuse.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'Fuse' description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' - keywords: 'resistor' + keywords: 'fuse' ipc_density: 'nominal' pad_length_addition: 0 suffix: "" fuse_smaller_0603: fp_lib_name: 'Fuse' - size_definitions: ['size_default_chip_devices_smaller_0603.yaml'] + size_definitions: ['size_default_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'Fuse' description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' - keywords: 'resistor' + keywords: 'fuse' ipc_density: 'nominal' pad_length_addition: 0 suffix: "" fuse_smaller_0402: fp_lib_name: 'Fuse' - size_definitions: ['size_default_chip_devices_smaller_0402.yaml'] + size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'Fuse' description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' - keywords: 'resistor' + keywords: 'fuse' ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -342,11 +342,11 @@ fuse_smaller_0402: fuse_handsolder: fp_lib_name: 'Fuse' - size_definitions: ['size_default_chip_devices.yaml', 'size_fuse.yaml'] + size_definitions: ['size_default_chip.yaml', 'size_fuse.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'Fuse' description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' - keywords: 'resistor handsolder' + keywords: 'fuse handsolder' ipc_density: 'nominal' pad_length_addition: 0.35 suffix: "_Pad{pad_x:.2f}x{pad_y:.2f}mm_HandSolder" diff --git a/scripts/SMD_chip_package_rlc-etc/ipc7351B_smd_two_terminal_chip.yaml b/scripts/SMD_chip_package_rlc-etc/ipc7351B_smd_two_terminal.yaml similarity index 100% rename from scripts/SMD_chip_package_rlc-etc/ipc7351B_smd_two_terminal_chip.yaml rename to scripts/SMD_chip_package_rlc-etc/ipc7351B_smd_two_terminal.yaml diff --git a/scripts/SMD_chip_package_rlc-etc/ipc_smd_two_terminal_chip.yaml b/scripts/SMD_chip_package_rlc-etc/ipc7351_smd_two_terminal.yaml similarity index 100% rename from scripts/SMD_chip_package_rlc-etc/ipc_smd_two_terminal_chip.yaml rename to scripts/SMD_chip_package_rlc-etc/ipc7351_smd_two_terminal.yaml diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip.yaml new file mode 100644 index 000000000..352a0cd6d --- /dev/null +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip.yaml @@ -0,0 +1,143 @@ +C_0504: + code_imperial: "0504" + code_metric: "1310" + body_length: + minimum: 1.02 + maximum: 1.32 + body_width: + minimum: 0.77 + maximum: 1.27 + terminal_length: + minimum: 0.13 + maximum: 0.38 + size_info: '(Body size source: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +C_0603: + code_imperial: "0603" + code_metric: "1608" + body_length: + minimum: 1.45 + maximum: 1.75 + body_width: + minimum: 0.65 + maximum: 0.95 + terminal_length: + minimum: 0.2 + maximum: 0.5 + size_info: '(Body size source: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +C_0805: + code_imperial: "0805" + code_metric: "2012" + body_length: + minimum: 1.8 + maximum: 2.2 + body_width: + minimum: 1.05 + maximum: 1.45 + terminal_length: + minimum: 0.25 + maximum: 0.55 # only deviation from IPC is reducing this from 0.75mm + size_info: '(Body size source: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf, https://docs.google.com/spreadsheets/d/1BsfQQcO9C6DZCsRaXUlFlo91Tg2WpOkGARC1WS5S8t0/edit?usp=sharing)' + +C_1206: + code_imperial: "1206" + code_metric: "3216" + body_length: + minimum: 3 + maximum: 3.4 + body_width: + minimum: 1.4 + maximum: 1.8 + terminal_length: + minimum: 0.25 + maximum: 0.75 + size_info: '(Body size source: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +C_1210: + code_imperial: "1210" + code_metric: "3225" + body_length: + minimum: 3 + maximum: 3.4 + body_width: + minimum: 2.3 + maximum: 2.7 + terminal_length: + minimum: 0.25 + maximum: 0.75 + size_info: '(Body size source: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +C_1812: + code_imperial: "1812" + code_metric: "4532" + body_length: + minimum: 4.2 + maximum: 4.8 + body_width: + minimum: 3 + maximum: 3.4 + terminal_length: + minimum: 0.25 + maximum: 0.95 + size_info: '(Body size source: https://www.nikhef.nl/pub/departments/mt/projects/detectorR_D/dtddice/ERJ2G.pdf)' + +C_1825: + code_imperial: "1825" + code_metric: "4564" + body_length: + minimum: 4.2 + maximum: 4.8 + body_width: + minimum: 6 + maximum: 6.8 + terminal_length: + minimum: 0.25 + maximum: 0.95 + ipc_reference: "ipc_spec_larger_or_equal_0603" + size_info: '(Body size from: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +C_2220: + code_imperial: "2220" + code_metric: "5650" + body_length: + nominal: 5.7 + tolerance: 0.5 + body_width: + nominal: 5.0 + tolerance: 0.4 + terminal_length: + nominal: 0.85 + tolerance: 0.35 + ipc_reference: "ipc_spec_larger_or_equal_0603" + size_info: '(Body size from: http://datasheets.avx.com/AVX-HV_MLCC.pdf)' + +C_2225: + code_imperial: "2225" + code_metric: "5664" + body_length: + nominal: 5.72 + tolerance: 0.25 + body_width: + nominal: 6.35 + tolerance: 0.25 + terminal_length: + nominal: 0.85 + tolerance: 0.35 + ipc_reference: "ipc_spec_larger_or_equal_0603" + size_info: '(Body size from: http://datasheets.avx.com/AVX-HV_MLCC.pdf)' + +C_3640: + code_imperial: "3640" + code_metric: "9110" + body_length: + nominal: 9.14 + tolerance: 0.25 + body_width: + nominal: 10.2 + tolerance: 0.25 + terminal_length: + minimum: 0.76 + maximum: 1.52 + ipc_reference: "ipc_spec_larger_or_equal_0603" + size_info: '(Body size from: http://datasheets.avx.com/AVX-HV_MLCC.pdf)' diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip_devices.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip_devices.yaml deleted file mode 100644 index b3d35f6ae..000000000 --- a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip_devices.yaml +++ /dev/null @@ -1,60 +0,0 @@ - -SMD_1825: - code_imperial: "1825" - code_metric: "4564" - body_length: - nominal: 4.6 - tolerance: 0.5 - body_width: - nominal: 6.3 - tolerance: 0.4 - terminal_length: - nominal: 0.75 - tolerance: 0.35 - ipc_reference: "ipc_spec_larger_or_equal_0603" - size_info: '(Body size from: http://datasheets.avx.com/AVX-HV_MLCC.pdf)' - -SMD_2220: - code_imperial: "2220" - code_metric: "5650" - body_length: - nominal: 5.7 - tolerance: 0.5 - body_width: - nominal: 5.0 - tolerance: 0.4 - terminal_length: - nominal: 0.85 - tolerance: 0.35 - ipc_reference: "ipc_spec_larger_or_equal_0603" - size_info: '(Body size from: http://datasheets.avx.com/AVX-HV_MLCC.pdf)' - -SMD_2225: - code_imperial: "2225" - code_metric: "5664" - body_length: - nominal: 5.72 - tolerance: 0.25 - body_width: - nominal: 6.35 - tolerance: 0.25 - terminal_length: - nominal: 0.85 - tolerance: 0.35 - ipc_reference: "ipc_spec_larger_or_equal_0603" - size_info: '(Body size from: http://datasheets.avx.com/AVX-HV_MLCC.pdf)' - -SMD_3640: - code_imperial: "3640" - code_metric: "9110" - body_length: - nominal: 9.14 - tolerance: 0.25 - body_width: - nominal: 10.2 - tolerance: 0.25 - terminal_length: - minimum: 0.76 - maximum: 1.52 - ipc_reference: "ipc_spec_larger_or_equal_0603" - size_info: '(Body size from: http://datasheets.avx.com/AVX-HV_MLCC.pdf)' diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip_smaller_0603.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip_smaller_0603.yaml new file mode 100644 index 000000000..fd2f5bd56 --- /dev/null +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_chip_smaller_0603.yaml @@ -0,0 +1,12 @@ +C_0402: + code_imperial: "0402" + code_metric: "1005" + body_length: + minimum: 0.9 + maximum: 1.1 + body_width: + minimum: 0.4 + maximum: 0.6 + terminator_spacing_min: 0.3 + terminator_spacing_max: 0.65 + size_info: '(Body size source: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_tantal.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_tantal.yaml similarity index 97% rename from scripts/SMD_chip_package_rlc-etc/size_definitions/size_tantal.yaml rename to scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_tantal.yaml index ed0e13652..b04bda0c6 100644 --- a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_tantal.yaml +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_capacitor_tantal.yaml @@ -1,4 +1,4 @@ -SMD_1608-08: +C_1608-08: code_metric: '1608-08' # size | 1,6 x 0,8 x 0,8 mm #code_letter: 'Kemet-—' @@ -14,7 +14,7 @@ SMD_1608-08: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: https://www.vishay.com/docs/48064/_t58_vmn_pt0471_1601.pdf)' -SMD_1608-10: +C_1608-10: code_metric: '1608-10' # size | 1,6 x 0,85 x 1,05 mm #code_letter: 'Kemet-—' @@ -30,7 +30,7 @@ SMD_1608-10: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: https://www.vishay.com/docs/48064/_t58_vmn_pt0471_1601.pdf)' -SMD_2012-12: +C_2012-12: code_metric: '2012-12' # size | 2,05 x 1,35 x 1,2 mm code_letter: 'Kemet-R' @@ -52,7 +52,7 @@ SMD_2012-12: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: https://www.vishay.com/docs/40182/tmch.pdf)' -SMD_2012-15: +C_2012-15: code_metric: '2012-15' # size | 2,05 x 1,35 x 1,5 mm #code_letter: 'Kemet-—' @@ -74,7 +74,7 @@ SMD_2012-15: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: https://www.vishay.com/docs/40182/tmch.pdf)' -SMD_3216-10: +C_3216-10: code_metric: '3216-10' # size | 3,2 x 1,6 x 1,0 mm code_letter: 'Kemet-I' @@ -96,7 +96,7 @@ SMD_3216-10: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_3216-12: +C_3216-12: code_metric: '3216-12' # size | 3,2 x 1,6 x 1,2 mm code_letter: 'Kemet-S' @@ -118,7 +118,7 @@ SMD_3216-12: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_3216-18: +C_3216-18: code_metric: '3216-18' # size | 3,2 x 1,6 x 1,8 mm code_letter: 'Kemet-A' @@ -140,7 +140,7 @@ SMD_3216-18: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_3528-12: +C_3528-12: code_metric: '3528-12' # size | 3,5 x 2,8 x 1,2 mm code_letter: 'Kemet-T' @@ -162,7 +162,7 @@ SMD_3528-12: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_3528-15: +C_3528-15: code_metric: '3528-15' # size | 3,5 x 2,8 x 1,5 mm #code_letter: 'Kemet-—' @@ -184,7 +184,7 @@ SMD_3528-15: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_3528-21: +C_3528-21: code_metric: '3528-21' # size | 3,5 x 2,8 x 2,1 mm code_letter: 'Kemet-B' @@ -206,7 +206,7 @@ SMD_3528-21: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_6032-15: +C_6032-15: code_metric: '6032-15' # size | 6,0 x 3,2 x 1,5 mm code_letter: 'Kemet-U' @@ -228,7 +228,7 @@ SMD_6032-15: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_6032-20: +C_6032-20: code_metric: '6032-20' # size | 6,0 x 3,2 x 2,0 mm #code_letter: 'Kemet-—' @@ -250,7 +250,7 @@ SMD_6032-20: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_6032-28: +C_6032-28: code_metric: '6032-28' # size | 6,0 x 3,2 x 2,8 mm code_letter: 'Kemet-C' @@ -272,7 +272,7 @@ SMD_6032-28: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_7343-15: +C_7343-15: code_metric: '7343-15' # size | 7,3 x 4,3 x 1,5 mm code_letter: 'Kemet-W' @@ -293,7 +293,7 @@ SMD_7343-15: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_7343-20: +C_7343-20: code_metric: '7343-20' # size | 7,3 x 4,3 x 2,0 mm code_letter: 'Kemet-V' @@ -315,7 +315,7 @@ SMD_7343-20: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_7343-30: +C_7343-30: code_metric: '7343-30' # size | 7,3 x 4,3 x 3,0 mm #code_letter: 'Kemet-—' @@ -337,7 +337,7 @@ SMD_7343-30: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_7343-31: +C_7343-31: code_metric: '7343-31' # size | 7,3 x 4,3 x 3,1 mm code_letter: 'Kemet-D' @@ -359,7 +359,7 @@ SMD_7343-31: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_7343-40: +C_7343-40: code_metric: '7343-40' # size | 7,3 x 4,3 x 4,0 mm code_letter: 'Kemet-Y' @@ -381,7 +381,7 @@ SMD_7343-40: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_7343-43: +C_7343-43: code_metric: '7343-43' # size | 7,3 x 4,3 x 4,3 mm code_letter: 'Kemet-X' @@ -403,7 +403,7 @@ SMD_7343-43: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_7360-38: +C_7360-38: code_metric: '7360-38' # size | 7,3 x 6,0 x 3,8 mm code_letter: 'Kemet-E' @@ -425,7 +425,7 @@ SMD_7360-38: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://www.kemet.com/Lists/ProductCatalog/Attachments/253/KEM_TC101_STD.pdf)' -SMD_7361-38: +C_7361-38: code_metric: '7361-38' # size | 7,3 x 6,1 x 3,8 mm #code_letter: 'Kemet-—' @@ -447,7 +447,7 @@ SMD_7361-38: ipc_reference: "ipc_spec_tantalumn" size_info: '(Body size from: http://datasheets.avx.com/NOS.pdf)' -SMD_7361-438: +C_7361-438: code_metric: '7361-438' # size | 7,3 x 6,1 x 4,3 mm #code_letter: 'Kemet-—' diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_devices.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip.yaml similarity index 85% rename from scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_devices.yaml rename to scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip.yaml index 154814731..00accb63d 100644 --- a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_devices.yaml +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip.yaml @@ -1,3 +1,5 @@ +#ToDo: update dimensions without capacitor, fuse, inductor, and resistor sizes +# where those part types have a unique size definition file SMD_0603: code_imperial: "0603" code_metric: "1608" @@ -60,19 +62,20 @@ SMD_1210: terminator_spacing_max: 2.32 size_info: '(Body size source: http://www.tortai-tech.com/upload/download/2011102023233369053.pdf)' -SMD_1806: - code_imperial: "1806" - code_metric: "4516" - body_length: - nominal: 4.5 - tolerance: 0.2 - body_width: - nominal: 1.6 - tolerance: 0.2 - terminal_length: - nominal: 0.7 - tolerance: 0.3 - size_info: '(Body size source: https://www.modelithics.com/models/Vendor/MuRata/BLM41P.pdf)' +#Could not find any diode, fuse, or LED in this body size +# SMD_1806: + # code_imperial: "1806" + # code_metric: "4516" + # body_length: + # nominal: 4.5 + # tolerance: 0.2 + # body_width: + # nominal: 1.6 + # tolerance: 0.2 + # terminal_length: + # nominal: 0.7 + # tolerance: 0.3 + # size_info: '(Body size source: https://www.modelithics.com/models/Vendor/MuRata/BLM41P.pdf)' SMD_1812: code_imperial: "1812" diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_devices_smaller_0402.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_smaller_0402.yaml similarity index 100% rename from scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_devices_smaller_0402.yaml rename to scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_smaller_0402.yaml diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_devices_smaller_0603.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_smaller_0603.yaml similarity index 100% rename from scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_devices_smaller_0603.yaml rename to scripts/SMD_chip_package_rlc-etc/size_definitions/size_default_chip_smaller_0603.yaml diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_inductor.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_inductor.yaml index a8f48aed4..752834e5c 100644 --- a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_inductor.yaml +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_inductor.yaml @@ -1,4 +1,18 @@ -SMD_1008: +L_0805: + code_imperial: "0805" + code_metric: "2012" + body_length: + minimum: 1.7 + maximum: 2.3 + body_width: + minimum: 0.6 + maximum: 1.2 + terminal_length: + minimum: 0.1 + maximum: 0.3 + size_info: '(Body size source: IPC-SM-782 page 80, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +L_1008: code_imperial: "1008" code_metric: "2520" body_length: @@ -13,3 +27,30 @@ SMD_1008: ipc_reference: "ipc_spec_larger_or_equal_0603" size_info: '(Body size source: https://ecsxtal.com/store/pdf/ECS-MPI2520-SMD-POWER-INDUCTOR.pdf)' +L_1206: + code_imperial: "1206" + code_metric: "3216" + body_length: + minimum: 2.9 + maximum: 3.5 + body_width: + minimum: 1.3 + maximum: 1.9 + terminal_length: + minimum: 0.2 + maximum: 0.5 + size_info: '(Body size source: IPC-SM-782 page 80, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +L_1806: + code_imperial: "1806" + code_metric: "4516" + body_length: + minimum: 4.2 + maximum: 4.8 + body_width: + minimum: 0.6 + maximum: 1.2 + terminal_length: + minimum: 0.3 + maximum: 0.8 + size_info: '(Body size source: IPC-SM-782 page 80, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor.yaml deleted file mode 100644 index 74c2a1da6..000000000 --- a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor.yaml +++ /dev/null @@ -1,14 +0,0 @@ -SMD_4020: - code_imperial: "4020" - code_metric: "10251" - body_length: - nominal: 10.2 - tolerance: [0.05, 0.2] - body_width: - nominal: 5.1 - tolerance: [0.05, 0.2] - terminal_length: - nominal: 0.9 - tolerance: 0.2 - ipc_reference: "ipc_spec_larger_or_equal_0603" - size_info: '(Body size source: http://datasheet.octopart.com/HVC0603T5004FET-Ohmite-datasheet-26699797.pdf)' diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip.yaml new file mode 100644 index 000000000..d76dfc7a3 --- /dev/null +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip.yaml @@ -0,0 +1,112 @@ +R_0603: + code_imperial: "0603" + code_metric: "1608" + body_length: + minimum: 1.5 + maximum: 1.7 + body_width: + minimum: 0.7 + maximum: 0.95 + terminal_length: + minimum: 0.15 + maximum: 0.4 + size_info: '(Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +R_0805: + code_imperial: "0805" + code_metric: "2012" + body_length: + minimum: 1.85 + maximum: 2.15 + body_width: + minimum: 1.1 + maximum: 1.4 + terminal_length: + minimum: 0.15 + maximum: 0.65 + size_info: '(Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +R_1206: + code_imperial: "1206" + code_metric: "3216" + body_length: + minimum: 3.05 + maximum: 3.35 + body_width: + minimum: 1.45 + maximum: 1.75 + terminal_length: + minimum: 0.25 + maximum: 0.75 + size_info: '(Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +R_1210: + code_imperial: "1210" + code_metric: "3225" + body_length: + minimum: 3.05 + maximum: 3.35 + body_width: + minimum: 2.34 + maximum: 2.64 + terminal_length: + minimum: 0.25 + maximum: 0.75 + size_info: '(Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +R_2010: + code_imperial: "2010" + code_metric: "5025" + body_length: + minimum: 4.85 + maximum: 5.15 + body_width: + minimum: 2.35 + maximum: 2.65 + terminal_length: + minimum: 0.35 + maximum: 0.85 + size_info: '(Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +SMD_1812: + code_imperial: "1812" + code_metric: "4532" + body_length: + nominal: 4.5 + tolerance: 0.2 + body_width: + nominal: 3.2 + tolerance: 0.2 + terminal_length: + nominal: 0.5 + tolerance: 0.2 + size_info: '(Body size source: https://www.nikhef.nl/pub/departments/mt/projects/detectorR_D/dtddice/ERJ2G.pdf)' + +R_2512: + code_imperial: "2512" + code_metric: "6332" + body_length: + minimum: 6.15 + maximum: 6.45 + body_width: + minimum: 3.05 + maximum: 3.35 + terminal_length: + minimum: 0.35 + maximum: 0.85 + size_info: '(Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' + +R_4020: + code_imperial: "4020" + code_metric: "10251" + body_length: + nominal: 10.2 + tolerance: [0.05, 0.2] + body_width: + nominal: 5.1 + tolerance: [0.05, 0.2] + terminal_length: + nominal: 0.9 + tolerance: 0.2 + ipc_reference: "ipc_spec_larger_or_equal_0603" + size_info: '(Body size source: http://datasheet.octopart.com/HVC0603T5004FET-Ohmite-datasheet-26699797.pdf)' diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip_smaller_0603.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip_smaller_0603.yaml new file mode 100644 index 000000000..9ee75c4c5 --- /dev/null +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip_smaller_0603.yaml @@ -0,0 +1,12 @@ +R_0402: + code_imperial: "0402" + code_metric: "1005" + body_length: + minimum: 1.0 + maximum: 1.1 + body_width: + minimum: 0.48 + maximum: 0.6 + terminator_spacing_min: 0.4 + terminator_spacing_max: 0.7 + size_info: '(Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf)' diff --git a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_wide_body_chip_resistor.yaml b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip_wide_body.yaml similarity index 97% rename from scripts/SMD_chip_package_rlc-etc/size_definitions/size_wide_body_chip_resistor.yaml rename to scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip_wide_body.yaml index 25cdfe0ab..a9d642060 100644 --- a/scripts/SMD_chip_package_rlc-etc/size_definitions/size_wide_body_chip_resistor.yaml +++ b/scripts/SMD_chip_package_rlc-etc/size_definitions/size_resistor_chip_wide_body.yaml @@ -1,4 +1,4 @@ -SMD_0612: +R_0612: code_imperial: "0612" code_metric: "1632" body_length: @@ -13,7 +13,7 @@ SMD_0612: ipc_reference: "ipc_spec_larger_or_equal_0603" size_info: '(Body size source: https://www.vishay.com/docs/20019/rcwe.pdf)' -SMD_0815: +R_0815: code_imperial: "0815" code_metric: "2038" body_length: @@ -28,7 +28,7 @@ SMD_0815: ipc_reference: "ipc_spec_larger_or_equal_0603" size_info: '(Body size source: http://www.yageo.com/documents/recent/PYu-PRPFPH_521_RoHS_L_0.pdf)' -SMD_1020: +R_1020: code_imperial: "1020" code_metric: "2550" body_length: @@ -43,7 +43,7 @@ SMD_1020: ipc_reference: "ipc_spec_larger_or_equal_0603" size_info: '(Body size source: https://www.vishay.com/docs/20019/rcwe.pdf)' -SMD_1218: +R_1218: code_imperial: "1218" code_metric: "3246" body_length: From b816b0f1ad07f64ccc742bba274ead1f6dde4d9f Mon Sep 17 00:00:00 2001 From: evanshultz Date: Fri, 4 Oct 2019 16:58:19 -0700 Subject: [PATCH 3/4] Support generation of footprint in varying densities - Branched on top of #438 --- .../SMD_package_rlc-etc.py | 31 ++++++- .../SMD_packages.yaml | 84 +++++++------------ 2 files changed, 55 insertions(+), 60 deletions(-) diff --git a/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py b/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py index 135fd5344..cad436a28 100644 --- a/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py +++ b/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py @@ -29,7 +29,7 @@ def merge_dicts(*dict_args): result.update(dictionary) return result -class TwoTerminalSMDchip(): +class TwoTerminalSMD(): def __init__(self, command_file, configuration): self.configuration = configuration with open(command_file, 'r') as command_stream: @@ -131,10 +131,11 @@ def generateFootprint(self, device_size_data, footprint_group_data): fab_line_width = self.configuration.get('fab_line_width', 0.1) silk_line_width = self.configuration.get('silk_line_width', 0.12) - device_dimensions = TwoTerminalSMDchip.deviceDimensions(device_size_data) + device_dimensions = TwoTerminalSMD.deviceDimensions(device_size_data) ipc_reference = footprint_group_data['ipc_reference'] - ipc_density = footprint_group_data['ipc_density'] + ipc_density = self.configuration.get('ipc_density')[0] + density_suffix = self.configuration.get('ipc_density')[1] ipc_data_set = self.ipc_defintions[ipc_reference][ipc_density] ipc_round_base = self.ipc_defintions[ipc_reference]['round_base'] @@ -148,6 +149,13 @@ def generateFootprint(self, device_size_data, footprint_group_data): model3d_path_prefix = self.configuration.get('3d_model_prefix','${KISYS3DMOD}') suffix_3d = suffix if footprint_group_data.get('include_suffix_in_3dpath', 'True') == 'True' else "" + + if density_suffix != '' and 'handsolder' not in footprint_group_data['keywords']: + density_description = ', IPC-7351 {density:s} land protrusion'.format(density=ipc_density) + suffix = suffix + density_suffix + suffix_3d = suffix_3d + density_suffix + else: + density_description = '' code_metric = device_size_data.get('code_metric') code_letter = device_size_data.get('code_letter') @@ -177,6 +185,7 @@ def generateFootprint(self, device_size_data, footprint_group_data): # init kicad footprint kicad_mod.setDescription(footprint_group_data['description'].format(code_imperial=code_imperial, code_metric=code_metric, code_letter=code_letter, + density=density_description, size_info=device_size_data.get('size_info'))) kicad_mod.setTags(footprint_group_data['keywords']) kicad_mod.setAttribute('smd') @@ -336,9 +345,22 @@ def generateFootprint(self, device_size_data, footprint_group_data): parser.add_argument('--global_config', type=str, nargs='?', help='the config file defining how the footprint will look like. (KLC)', default='../tools/global_config_files/config_KLCv3.0.yaml') parser.add_argument('--series_config', type=str, nargs='?', help='the config file defining series parameters.', default='config_KLCv3.0.yaml') parser.add_argument('--ipc_definition', type=str, nargs='?', help='the ipc definition file', default='ipc7351B_smd_two_terminal.yaml') + parser.add_argument('--ipc_density', type=str, nargs='?', help='IPC density level (L,N,M)') parser.add_argument('--force_rectangle_pads', action='store_true', help='Force the generation of rectangle pads instead of rounded rectangle (KiCad 4.x compatibility.)') args = parser.parse_args() + # if the user requests an IPC density, put that and footprint suffix in a list + # otherwise, use nominal density with no suffix + if args.ipc_density is None or args.ipc_density not in ['l', 'L', 'n', 'N', 'm', 'M']: + ipc_density = ['nominal', ''] + else: + if args.ipc_density.upper() == 'L': + ipc_density = ['least', '_L'] + elif args.ipc_density.upper() == 'N': + ipc_density = ['nominal', '_N'] + elif args.ipc_density.upper() == 'M': + ipc_density = ['most', '_M'] + with open(args.global_config, 'r') as config_stream: try: configuration = yaml.safe_load(config_stream) @@ -352,10 +374,11 @@ def generateFootprint(self, device_size_data, footprint_group_data): print(exc) args = parser.parse_args() configuration['ipc_definition'] = args.ipc_definition + configuration['ipc_density'] = ipc_density if args.force_rectangle_pads: configuration['round_rect_max_radius'] = None configuration['round_rect_radius_ratio'] = 0 for filepath in args.files: - two_terminal_smd =TwoTerminalSMDchip(filepath, configuration) + two_terminal_smd = TwoTerminalSMD(filepath, configuration) two_terminal_smd.generateFootprints() diff --git a/scripts/SMD_chip_package_rlc-etc/SMD_packages.yaml b/scripts/SMD_chip_package_rlc-etc/SMD_packages.yaml index 4174bd119..8b6238a3e 100644 --- a/scripts/SMD_chip_package_rlc-etc/SMD_packages.yaml +++ b/scripts/SMD_chip_package_rlc-etc/SMD_packages.yaml @@ -3,9 +3,8 @@ resistor: size_definitions: ['size_resistor_chip.yaml', 'size_resistor_chip_wide_body.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'R' - description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'resistor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -14,9 +13,8 @@ resistor_smaller_0603: size_definitions: ['size_resistor_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'R' - description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'resistor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -25,9 +23,8 @@ resistor_smaller_0402: size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'R' - description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'resistor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" paste_pad: @@ -40,9 +37,8 @@ resistor_handsolder: size_definitions: ['size_resistor_chip.yaml', 'size_resistor_chip_wide_body.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'R' - description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' + description: 'Resistor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' keywords: 'resistor handsolder' - ipc_density: 'nominal' pad_length_addition: 0.35 suffix: "_Pad{pad_x:.2f}x{pad_y:.2f}mm_HandSolder" include_suffix_in_3dpath: 'False' @@ -53,9 +49,8 @@ capacitor: size_definitions: ['size_capacitor_chip.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'C' - description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'capacitor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -64,9 +59,8 @@ capacitor_smaller_0603: size_definitions: ['size_capacitor_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'C' - description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'capacitor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -75,9 +69,8 @@ capacitor_smaller_0402: size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'C' - description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'capacitor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" paste_pad: @@ -90,9 +83,8 @@ capacitor_handsolder: size_definitions: ['size_capacitor_chip.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'C' - description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' + description: 'Capacitor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' keywords: 'capacitor handsolder' - ipc_density: 'nominal' pad_length_addition: 0.35 suffix: "_Pad{pad_x:.2f}x{pad_y:.2f}mm_HandSolder" include_suffix_in_3dpath: 'False' @@ -102,9 +94,8 @@ capacitor_tantal: size_definitions: ['size_capacitor_tantal.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'CP' - description: 'Tantalum Capacitor SMD {code_letter:s} ({code_metric:s} Metric), IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Tantalum Capacitor SMD {code_letter:s} ({code_metric:s} Metric){density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'capacitor tantalum' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" polarization_mark: 'True' @@ -114,9 +105,8 @@ capacitor_tantal_handsolder: size_definitions: ['size_capacitor_tantal.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'CP' - description: 'Tantalum Capacitor SMD {code_letter:s} ({code_metric:s} Metric), IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Tantalum Capacitor SMD {code_letter:s} ({code_metric:s} Metric){density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'capacitor tantalum' - ipc_density: 'nominal' pad_length_addition: 0.35 suffix: "_Pad{pad_x:.2f}x{pad_y:.2f}mm_HandSolder" include_suffix_in_3dpath: 'False' @@ -128,9 +118,8 @@ inductor: size_definitions: ['size_default_chip.yaml', 'size_inductor.yaml'] # inductor size definitions overwrite generic ones ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'L' - description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'inductor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -139,9 +128,8 @@ inductor_smaller_0603: size_definitions: ['size_default_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'L' - description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'inductor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -150,9 +138,8 @@ inductor_smaller_0402: size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'L' - description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'inductor' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" paste_pad: @@ -165,9 +152,8 @@ inductor_handsolder: size_definitions: ['size_default_chip.yaml', 'size_inductor.yaml'] # inductor size definitions overwrite generic ones ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'L' - description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' + description: 'Inductor SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' keywords: 'inductor handsolder' - ipc_density: 'nominal' pad_length_addition: 0.35 suffix: "_Pad{pad_x:.2f}x{pad_y:.2f}mm_HandSolder" include_suffix_in_3dpath: 'False' @@ -178,9 +164,8 @@ diode: size_definitions: ['size_default_chip.yaml', 'size_diode.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'D' - description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'diode' - ipc_density: 'nominal' pad_length_addition: 0 polarization_mark: 'True' suffix: "" @@ -190,9 +175,8 @@ diode_smaller_0603: size_definitions: ['size_default_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'D' - description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'diode' - ipc_density: 'nominal' pad_length_addition: 0 polarization_mark: 'True' suffix: "" @@ -202,9 +186,8 @@ diode_smaller_0402: size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'D' - description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'diode' - ipc_density: 'nominal' pad_length_addition: 0 polarization_mark: 'True' suffix: "" @@ -217,9 +200,8 @@ diode_handsolder: size_definitions: ['size_default_chip.yaml', 'size_diode.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'D' - description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'diode handsolder' - ipc_density: 'nominal' pad_length_addition: 0.35 polarization_mark: 'True' suffix: "_Pad{pad_x:.2f}x{pad_y:.2f}mm_HandSolder" @@ -230,9 +212,8 @@ diode_castellated: size_definitions: ['size_default_chip.yaml', 'size_diode.yaml'] ipc_reference: "ipc_spec_castellated" prefix: 'D' - description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), castellated end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Diode SMD {code_imperial:s} ({code_metric:s} Metric), castellated end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'diode castellated' - ipc_density: 'nominal' pad_length_addition: 0 polarization_mark: 'True' suffix: "_Castellated" @@ -243,9 +224,8 @@ led: size_definitions: ['size_default_chip.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'LED' - description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'LED' - ipc_density: 'nominal' pad_length_addition: 0 polarization_mark: 'True' suffix: "" @@ -255,9 +235,8 @@ led_smaller_0603: size_definitions: ['size_default_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'LED' - description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'LED' - ipc_density: 'nominal' pad_length_addition: 0 polarization_mark: 'True' suffix: "" @@ -268,10 +247,9 @@ led_smaller_0402: size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'LED' - description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'LED' ipc_density: 'nominal' - pad_length_addition: 0 polarization_mark: 'True' suffix: "" paste_pad: @@ -283,9 +261,8 @@ led_handsolder: size_definitions: ['size_default_chip.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'LED' - description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'LED handsolder' - ipc_density: 'nominal' pad_length_addition: 0.35 polarization_mark: 'True' suffix: "_Pad{pad_x:.2f}x{pad_y:.2f}mm_HandSolder" @@ -296,9 +273,8 @@ led_castellated: size_definitions: ['size_default_chip.yaml'] ipc_reference: "ipc_spec_castellated" prefix: 'LED' - description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), castellated end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'LED SMD {code_imperial:s} ({code_metric:s} Metric), castellated end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'LED castellated' - ipc_density: 'nominal' pad_length_addition: 0 polarization_mark: 'True' suffix: "_Castellated" @@ -309,9 +285,8 @@ fuse: size_definitions: ['size_default_chip.yaml', 'size_fuse.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'Fuse' - description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'fuse' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -320,9 +295,8 @@ fuse_smaller_0603: size_definitions: ['size_default_chip_smaller_0603.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'Fuse' - description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'fuse' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" @@ -331,9 +305,8 @@ fuse_smaller_0402: size_definitions: ['size_default_chip_smaller_0402.yaml'] ipc_reference: "ipc_spec_smaller_0603" prefix: 'Fuse' - description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal, {size_info:s}, generated with kicad-footprint-generator' + description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, {size_info:s}, generated with kicad-footprint-generator' keywords: 'fuse' - ipc_density: 'nominal' pad_length_addition: 0 suffix: "" paste_pad: @@ -345,9 +318,8 @@ fuse_handsolder: size_definitions: ['size_default_chip.yaml', 'size_fuse.yaml'] ipc_reference: "ipc_spec_larger_or_equal_0603" prefix: 'Fuse' - description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' + description: 'Fuse SMD {code_imperial:s} ({code_metric:s} Metric), square (rectangular) end terminal{density:s}, with elongated pad for handsoldering. {size_info:s}, generated with kicad-footprint-generator' keywords: 'fuse handsolder' - ipc_density: 'nominal' pad_length_addition: 0.35 suffix: "_Pad{pad_x:.2f}x{pad_y:.2f}mm_HandSolder" include_suffix_in_3dpath: 'False' From 95456b60f1b6ed430d101f111a736b2d49767566 Mon Sep 17 00:00:00 2001 From: evanshultz Date: Mon, 7 Oct 2019 08:59:13 -0700 Subject: [PATCH 4/4] Improve handling of the ipc_density argument --- .../SMD_package_rlc-etc.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py b/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py index cad436a28..5b395a594 100644 --- a/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py +++ b/scripts/SMD_chip_package_rlc-etc/SMD_package_rlc-etc.py @@ -350,16 +350,18 @@ def generateFootprint(self, device_size_data, footprint_group_data): args = parser.parse_args() # if the user requests an IPC density, put that and footprint suffix in a list - # otherwise, use nominal density with no suffix - if args.ipc_density is None or args.ipc_density not in ['l', 'L', 'n', 'N', 'm', 'M']: + # nominal density with no suffix if no argument is provided + if args.ipc_density is None: ipc_density = ['nominal', ''] + elif args.ipc_density.upper() == 'L': + ipc_density = ['least', '_L'] + elif args.ipc_density.upper() == 'N': + ipc_density = ['nominal', '_N'] + elif args.ipc_density.upper() == 'M': + ipc_density = ['most', '_M'] else: - if args.ipc_density.upper() == 'L': - ipc_density = ['least', '_L'] - elif args.ipc_density.upper() == 'N': - ipc_density = ['nominal', '_N'] - elif args.ipc_density.upper() == 'M': - ipc_density = ['most', '_M'] + raise ValueError("If IPC density is specified, it must be 'L', 'N', or 'M.'") + sys.exit() with open(args.global_config, 'r') as config_stream: try: