From cd98bb648903a55462503084dd53152b7516efdb Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sun, 5 Jan 2020 23:49:05 -0700 Subject: [PATCH] item per line in footprint script, better copyright handling --- packages/11071.py | 84 ++++++++++++++++++++++++++++++++++++++++------ packages/1212-8.py | 2 +- packages/Makefile | 3 +- packages/fplht.py | 10 +++--- 4 files changed, 81 insertions(+), 18 deletions(-) diff --git a/packages/11071.py b/packages/11071.py index 6271e6f..7da8154 100755 --- a/packages/11071.py +++ b/packages/11071.py @@ -44,25 +44,87 @@ fp = footprint() fp.name = "11071" fp.description = "4ucon 11071 tabbed micro USB connector" +fp.copyright = "Copyright 2020 by Bdale Garbee " -fp.pad({'x' : pad_spacing* 2, 'y' : pad_y, 'width' : pad_width, 'height' : pad_height, 'name' : 'VBUS', 'number' : '1'}) -fp.pad({'x' : pad_spacing* 1, 'y' : pad_y, 'width' : pad_width, 'height' : pad_height, 'name' : 'D-', 'number' : '2'}) -fp.pad({'x' : pad_spacing* 0, 'y' : pad_y, 'width' : pad_width, 'height' : pad_height, 'name' : 'D+', 'number' : '3'}) -fp.pad({'x' : pad_spacing* -1, 'y' : pad_y, 'width' : pad_width, 'height' : pad_height, 'name' : 'HS', 'number' : '4'}) -fp.pad({'x' : pad_spacing* -2, 'y' : pad_y, 'width' : pad_width, 'height' : pad_height, 'name' : 'GND', 'number' : '5'}) +fp.pad({'x' : pad_spacing* 2, + 'y' : pad_y, + 'width' : pad_width, + 'height' : pad_height, + 'name' : 'VBUS', + 'number' : '1'}) +fp.pad({'x' : pad_spacing* 1, + 'y' : pad_y, + 'width' : pad_width, + 'height' : pad_height, + 'name' : 'D-', + 'number' : '2'}) +fp.pad({'x' : pad_spacing* 0, + 'y' : pad_y, + 'width' : pad_width, + 'height' : pad_height, + 'name' : 'D+', + 'number' : '3'}) +fp.pad({'x' : pad_spacing* -1, + 'y' : pad_y, + 'width' : pad_width, + 'height' : pad_height, + 'name' : 'HS', + 'number' : '4'}) +fp.pad({'x' : pad_spacing* -2, + 'y' : pad_y, + 'width' : pad_width, + 'height' : pad_height, + 'name' : 'GND', + 'number' : '5'}) # mounting "wings", or tabs next to the signal pads -fp.pad({'x' : -wing_x, 'y' : wing_y, 'width' : wing_width, 'height' : wing_height, 'spacing' : 0, 'name' : "", 'number' : "G"}) -fp.pad({'x' : wing_x, 'y' : wing_y, 'width' : wing_width, 'height' : wing_height, 'spacing' : 0, 'name' : "", 'number' : "G"}) +fp.pad({'x' : -wing_x, + 'y' : wing_y, + 'width' : wing_width, + 'height' : wing_height, + 'spacing' : 0, + 'name' : "", + 'number' : "G"}) +fp.pad({'x' : wing_x, + 'y' : wing_y, + 'width' : wing_width, + 'height' : wing_height, + 'spacing' : 0, + 'name' : "", + 'number' : "G"}) # mounting tabs under package -fp.pad({'x' : -tab_x, 'y' : tab_y, 'width' : tab_width, 'height' : tab_height, 'spacing' : 0, 'name' : "", 'number' : "G"}) -fp.pad({'x' : tab_x, 'y' : tab_y, 'width' : tab_width, 'height' : tab_height, 'spacing' : 0, 'name' : "", 'number' : "G"}) +fp.pad({'x' : -tab_x, + 'y' : tab_y, + 'width' : tab_width, + 'height' : tab_height, + 'spacing' : 0, + 'name' : "", + 'number' : "G"}) +fp.pad({'x' : tab_x, + 'y' : tab_y, + 'width' : tab_width, + 'height' : tab_height, + 'spacing' : 0, + 'name' : "", + 'number' : "G"}) # slots for through-hole mounting tabs -fp.slot({'x' : -slot_x, 'y' : slot_y, 'width' : slot_width, 'height' : slot_height, 'thickness' : slot_width + slot_copper * 2, 'name' : 'GND', 'number' : 5}) -fp.slot({'x' : slot_x, 'y' : slot_y, 'width' : slot_width, 'height' : slot_height, 'thickness' : slot_width + slot_copper * 2, 'name' : 'GND', 'number' : 5}) +fp.slot({'x' : -slot_x, + 'y' : slot_y, + 'width' : slot_width, + 'height' : slot_height, + 'thickness' : slot_width + slot_copper * 2, + 'name' : 'GND', + 'number' : 5}) +fp.slot({'x' : slot_x, + 'y' : slot_y, + 'width' : slot_width, + 'height' : slot_height, + 'thickness' : slot_width + slot_copper * 2, + 'name' : 'GND', + 'number' : 5}) fp.emit() diff --git a/packages/1212-8.py b/packages/1212-8.py index 20d1c27..afc5c1e 100755 --- a/packages/1212-8.py +++ b/packages/1212-8.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Copyright 2013 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for Vishay 1212-8 dual FET package diff --git a/packages/Makefile b/packages/Makefile index 6cf8102..1e8a04d 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -158,7 +158,8 @@ $(CLEANDIRS): $(FOOTPRINTS): footprint.5c fplht.py clean: $(CLEANDIRS) - rm -f $(FOOTPRINTS) *.pyc + rm -f $(FOOTPRINTS) *.pyc + rm -rf __pycache__ .PHONY: subdirs $(DIRS) .PHONY: subdirs $(BUILDDIRS) diff --git a/packages/fplht.py b/packages/fplht.py index 1a15590..14dd708 100644 --- a/packages/fplht.py +++ b/packages/fplht.py @@ -30,9 +30,9 @@ class footprint(object): def __init__(self): self.name = "" self.description = "" + self.copyright = "Copyright 2020 by Bdale Garbee " self.dist_license = "GPLv3" self.use_license = "Unlimited" - self.author = "Bdale Garbee " self.cnt = 0 self.items = [] self.padstacks = dict() @@ -76,7 +76,7 @@ class footprint(object): # mask thickness of pad and solder mask # options default to 'square' - print ("adding pad") + # print ("adding pad") d['type'] = 'pad' if 'x1' not in d: @@ -121,7 +121,7 @@ class footprint(object): # mask thickness of pad and solder mask # options default to 'square' for pin number 1 - print ("adding pin") + # print ("adding pin") d['type'] = 'pin' if 'spacing' not in d: @@ -168,7 +168,7 @@ class footprint(object): # clearance twice the spacing between slot copper and other traces # mask thickness of slot copper and solder mask - print ("adding slot") + # print ("adding slot") d['type'] = 'slot' if 'x1' not in d: @@ -369,9 +369,9 @@ class footprint(object): print(" ha:subc.0 {") print(" ha:attributes {") print(" description = %s" % self.description) + print(" copyright = %s" % self.copyright) print(" dist_license = %s" % self.dist_license) print(" use_license = %s" % self.use_license) - print(" author = %s" % self.author) print(" }") print(" uid = %s" % self.create_uuid()) print(" ha:data {") -- 2.30.2