[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: footpgen.py female headers implementation
Hi,
I've added a new feature to footgen.py.
It has now a mode called "dihf". It is the same as "dih", but produces mirror image.
It is good for female headers, keeping the same pinout.
Diff attached.
Cheers,
Levente
--
Levente Kovacs
http://logonex.eu
519c519
< dihelt = dihelt + pin(-x,y,paddia,drill,str(pinnum),polyclear,maskclear)
---
> dipelt = dipelt + pin(-x,y,paddia,drill,str(pinnum),polyclear,maskclear)
523c523
< dihelt = dihelt + pin(x,y,paddia,drill,str(pinnum),polyclear,maskclear)
---
> dipelt = dipelt + pin(x,y,paddia,drill,str(pinnum),polyclear,maskclear)
527,556c527,529
< dihelt = dihelt + box(silkx,silky,-silkx,-silky,silkwidth)
< dihelt = dihelt + box(-silkx,-silky,-silkx+pitch,-silky+pitch,silkwidth)
< return dihelt+")\n"
<
< def dihf(attrlist):
< pins = findattr(attrlist, "pins")
< drill = findattr(attrlist, "drill")
< paddia = findattr(attrlist, "paddia")
< width = findattr(attrlist, "width")
< polyclear = findattr(attrlist, "polyclear")
< maskclear = findattr(attrlist, "maskclear")
< silkwidth = findattr(attrlist, "silkwidth")
< pitch = findattr(attrlist, "pitch")
< refdesx = findattr(attrlist, "refdesx")
< refdesy = findattr(attrlist, "refdesy")
< y = -(pins/2-1)*pitch/2
< x = width/2
< dihfelt = "Element[0x00000000 \"\" \"\" \"\" 1000 1000 %d %d 0 100 0x00000000]\n(\n" % (refdesx, -4000 - refdesy)
< for pinnum in range (1,1+pins,2):
< dihfelt = dihfelt + pin(x,y,paddia,drill,str(pinnum),polyclear,maskclear)
< y = y + pitch
< y = -(pins/2-1)*pitch/2
< for pinnum in range (2,1+pins,2):
< dihfelt = dihfelt + pin(-x,y,paddia,drill,str(pinnum),polyclear,maskclear)
< y = y + pitch
< silky = pins*pitch/4
< silkx = (width+pitch)/2
< dihfelt = dihfelt + box(silkx,silky,-silkx,-silky,silkwidth)
< dihfelt = dihfelt + box(silkx,-silky,-silkx+pitch,-silky+pitch,silkwidth)
< return dihfelt+")\n"
---
> dipelt = dipelt + box(silkx,silky,-silkx,-silky,silkwidth)
> dipelt = dipelt + box(-silkx,-silky,-silkx+pitch,-silky+pitch,silkwidth)
> return dipelt+")\n"
595,596d567
< elif parttype == 'dihf':
< return dihf(attributes)
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user