[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Very heavy symbols



On Thu, Apr 10, 2008 at 11:51 PM, Carl Denzen Van <carl@xxxxxxxxxxxx> wrote:
>  I have seen symbols with footprints and alternate footprints.
>  Wouldn't it be a good idea to have "very heavy" symbols that
>  incorporate the definition of many footprints, and you can select one
>  of them with p.e. an attribute choose_footprint=TO220_EBC? The symbol
>  would look like this:
>
>  device=NPN_TRANSISTOR
>  alt_footprint TO220_ECB
>  {
>  footprint TO220
>  gschempinnumber "E"=footprintpinnumber "1"
>  gschempinnumber "C"=footprintpinnmber "2"
>  gschempinnumber "B"=footprintpinnumber "3"
>  }
>  alt_footprint TO220_EBC
>  {
>  footprint TO220
>  gschempinnumber "E"=footprintpinnumber "1"
>  gschempinnumber "B"=footprintpinnmber "2"
>  gschempinnumber "C"=footprintpinnumber "3"
>  }
>  alt_footprint TO126_EBC
>  {
>  footprint TO126
>  gschempinnumber "E"=footprintpinnumber "1"
>  gschempinnumber "B"=footprintpinnmber "2"
>  gschempinnumber "C"=footprintpinnumber "3"
>  }

My slotting / heavification mechanism supports this sort of thing:

$ cat symbols/abstract/npn-1.sym
v 20070818 1
P 600 1000 600 800 1 0 0
{
T 500 850 5 6 1 1 0 0 1
pinnumber=?
T 500 850 5 6 0 0 0 0 1
pinseq=1
T 500 850 5 6 0 1 0 0 1
pinlabel=3
T 500 850 5 6 0 1 0 0 1
pintype=pas
T 650 850 5 6 0 1 0 0 1
pinfunction=c
}
[snip other pins and graphical representation]

$ cat symbols/transistor/2N3904-heavy.sym
v 20080110 1
S
{
T 100 200 5 10 0 0 0 0 1
device=bjt_npn
T 100 200 5 10 0 0 0 0 1
slotmap=e=3,b=2,c=1
T 100 200 5 10 0 0 0 0 1
slotname=TO92
}
T 900 900 5 10 1 1 0 0 1
type=2N3904
T 900 700 5 10 0 0 0 0 1
device=2N3904
T 900 600 8 10 1 1 0 0 1
refdes=Q?
T 800 100 5 10 0 0 0 0 1
footprint=TO92
B 800 500 900 600 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1

You place npn-1.sym and connect stuff to its pins, and then you *also*
place a "2N3904" somewhere on your schematic - not necessarily on the
same page - presumably in some area kept aside for BOM-like metadata.
Then you invoke the slot editor and tell the NPN symbol to attach to
the "TO92" slot in the 2N3904 component.

>  Advantage:
>  -you have very little number of symbols, which are easier to maintain
>  (compared to heavy symbols)

Totally!

>  Disadvantages:
>  - the file definition changes (documentation must be updated)

Indeed.  I had to add a first-class "slot" object represented by lines
starting with 'S'.

>  - gsch2pcb must understand the new file format

Not true, fortunately, thanks to libgeda knowing very intimately about
the associations between component slots and their (separate!)
graphical representations.


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user