[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: footgen.py
Hi,
I've added capability to omit pins at the dip type. This enables to
generate footprints for reed relays.
type = "dip"
omitballs = "3,4,5,10,11,12"
pins = 14
will generate something like that
* *
* *
* *
* *
patch attached.
Cheers,
Levente
Index: footgen.py
===================================================================
--- footgen.py (revision 482)
+++ footgen.py (working copy)
@@ -485,15 +485,18 @@
pitch = findattr(attrlist, "pitch")
refdesx = findattr(attrlist, "refdesx")
refdesy = findattr(attrlist, "refdesy")
+ omitlist = expandomitlist(findattr(attrlist, "omitballs"))
y = -(pins/2-1)*pitch/2
x = width/2
dipelt = "Element[0x00000000 \"\" \"\" \"\" 1000 1000 %d %d 0 100 0x00000000]\n(\n" % (refdesx, -4000 - refdesy)
for pinnum in range (1,1+pins/2):
- dipelt = dipelt + pin(-x,y,paddia,drill,str(pinnum),polyclear,maskclear)
+ if omitlist.find("\""+str(pinnum)+"\"")==-1:
+ dipelt = dipelt + pin(-x,y,paddia,drill,str(pinnum),polyclear,maskclear)
y = y + pitch
y = y - pitch
for pinnum in range (1+pins/2, pins+1):
- dipelt = dipelt + pin(x,y,paddia,drill,str(pinnum),polyclear,maskclear)
+ if omitlist.find(str(pinnum))==-1:
+ dipelt = dipelt + pin(x,y,paddia,drill,str(pinnum),polyclear,maskclear)
y = y - pitch
silky = pins*pitch/4
silkx = (width+pitch)/2
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user