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

Re: gEDA-user: pick and place ?plugin?footprints.c? for




Dan McMahill wrote:
> Dave N6NZ wrote:
>> Dan McMahill wrote:
>
>>
>>> The orientation is based on an algorithm that looks for which 
>>> quadrant pin #1 is in and then has some rules for what you do if it 
>>> is along an axis.  
>>
>> I'm a little fuzzy on this.  Can you be more specific about how you 
>> calculate rotation?
> 
> the description follows
> 
> http://pcb.sourceforge.net/pcb-20080202/pcb.html#Centroid%20File%20Format
> 
> the full details start on line 322 of:
> 
> http://pcb.cvs.sourceforge.net/pcb/pcb/src/hid/bom/bom.c?revision=1.13&view=markup 

OK, I'll go take a look.

> 
> 
> hopefully the code there isn't too bad to read even if you're not up on 
> pcb code internals.
> 
> The astute code reader will note that only multiples of 90 degrees work 

Ummmm.... I kind of like 45 degrees :)

> and that if you have multiple pins/pads with the same number, they are 
> counted individually for the purposes of finding the centroid.  There 
> are probably other ways of confusing the code.  I'd welcome someone to 
> poke at the algorithm with a sharp pointy stick and see where it fails.

OK, I'll take a look at doing some testing.  I can think of three 
footprints where I have the same pin number.  One is a SPST momentary 
switch with four legs, and the other two have big heat sink pads with 
the same pin numbers as ground.

> 
> I'm not sure how to make the algorithm properly deal with angles other 
> than multiples of 90 degrees.  That is a pretty major assumption.

What are the barriers to other angles?

> 
> I think before I entertain ideas of modifying that code I'd like to get 
> a regression testsuite in place. 

Makes sense.

-dave



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