item per line in footprint script, better copyright handling
authorBdale Garbee <bdale@gag.com>
Mon, 6 Jan 2020 06:49:05 +0000 (23:49 -0700)
committerBdale Garbee <bdale@gag.com>
Mon, 6 Jan 2020 06:49:05 +0000 (23:49 -0700)
packages/11071.py
packages/1212-8.py
packages/Makefile
packages/fplht.py

index 6271e6fcd927bb6cf7697507b79802fcadf4bbd4..7da815490d57708f5590fb4952b423963d1ae053 100755 (executable)
@@ -44,25 +44,87 @@ fp = footprint()
 
 fp.name = "11071"
 fp.description = "4ucon 11071 tabbed micro USB connector"
+fp.copyright = "Copyright 2020 by Bdale Garbee <bdale@gag.com>"
 
-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()
index 20d1c27fef1660a08e6e97e45cbb4a0d93c1d72c..afc5c1eabe39096873c6cd8384a34d47d7cca74c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 # Copyright 2013 by Bdale Garbee <bdale@gag.com>.  GPLv2
 #
 # Program to emit PCB footprint for Vishay 1212-8 dual FET package
index 6cf810205e93e859f337692099a751259db6e8ee..1e8a04d9f21fc53b95e0d96291531e53829def88 100644 (file)
@@ -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)
index 1a155903efe150d6d5e4710dfb66247340f24927..14dd7088ca8dd42c193f44a75c139d81a1e41d2b 100644 (file)
@@ -30,9 +30,9 @@ class footprint(object):
     def __init__(self):
         self.name = ""
         self.description = ""
+        self.copyright = "Copyright 2020 by Bdale Garbee <bdale@gag.com>"
         self.dist_license = "GPLv3"
         self.use_license = "Unlimited"
-        self.author = "Bdale Garbee <bdale@gag.com>"
         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 {")