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

Re: gEDA-user: centroid data generated by pcb-20050315



Stuart Brorson wrote:
I guess what I think would be useful is:

1) better documentation of all how the xy placement file is
  calculated.  also, the source code mentions that unnumbered pins
  are left out of the calculation, which should be clearly documented
  (if it's in the manual right now, it's not as loudly stated as it
  probably should be, because I don't remember coming across it).


Here's my suggestion on this particular issue:  Why don't you write up
a couple of paragraphs describing how the xy file works, and how it is
calculated?  You are probably the world's expert on this subject right
now!  If you write it up, I will be happy to stick it into whatever
PCB documentation I eventually write up.  I will also attribute you
for the contribution.  If you don't fancy yourself a writer, that's
OK -- I don't mind polishing other peoples' prose.  Since you've taken
the time to understand the issue, you can save all of us time by
putting your discoveries into text!

Stuart


I'll go back over the docs for that since I wrote the x-y output.

There were a number of issues I ran into.

1) There is currently no way to store the "center" of the part. In other words, if you write out your pcb file in the latest file format, there is nothing in each element which says "here is your center" other than 0,0 in element coordinates. The problem is one can easily build up a part with 0,0 being the center of mass, the center of pin 1 or some odd ball location. In fact, thats pretty much the case for the library. Thats why I ended up finding the common centroid of all the pins.

I wouldn't mind maybe adding a column to the output which is the location of element 0,0 in board coordinates. Then for those who build up parts with some consistency, they can use that column.

2) elements don't store rotation. I really don't like this for multiple reasons. What currently happens is that the coordinates of all the pins, pads, silk, etc are actually rotated and stored that way in the file. So if you look at your .pcb file, a 90 rotated SO8 package looks rather different than a 0 degree rotated package. It would have been nicer if they looked the same except for a flag which says "hey, you're rotated". Even if we did store rotation (useful for things like updating all 0603 footprints on a board), there is still the issue of inconsistancy in the library. Thats why I picked a more or less arbitrary algorithm based on pin #1's location relative to the common centroid of the pins/pads.

For this one, until we store rotation (which I'd like to do), I don't have any other ideas.

3) as DJ has mentioned, there seems to be no standard. I've worked with assemblers who have said "center of pin 1", "center of the body", "center of the pins", and "we ignore what you tell us anyway".


anyway, I'll try to clean up the docs to reflect whats actually going on currently.


-Dan