[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:
>>
>> But... since most pads are strokes, wouldn't looking at the XY 
>> endpoints of any single pad give you the rotation of one axis?  This 
>> fails on precisely square pads, of course.  But on any SO or TQFP 
>> part, just looking at the end points of pin 1 will tell you rotation.
> 
> hmm.  Thats a good idea.  I don't think it quite gets you 100% there 
> because if you compare a typical pad on an SO to something like one of 
> the larger smt resistors I think the pads are 90 degrees out. 

Actually, I think on both SO's and 0603-type two-pad parts it will give 
you the minor axis.  At least in my library.  It would give you the 
major axis on my crystal, some caps I have used, and ganged resistor packs.

> But I do 
> think that perhaps combining your idea with the current code might do 
> it.  In other words, we figure out what quadrant we're in with the 
> current code and then use the angle of the pad to figure out where 
> within the quadrant.  What do you think?

Or maybe the other way around?  Use pin 1 as a unit vector to find an 
axis, look at the maximum extents of the pads to see if what you just 
found was the major or minor axis, or if the part is square.  Then fall 
into the current quadrant code giving it the orientation you just found.

So, for either a DIL or a part like an 0603 or 0805, pin 1 will probably 
give you the minor axis.  For a TQFP.... umm... which is which? :) I'm 
not sure what convention is used.

But now that I think on it, an SO-8 could well be wider than it is long, 
if you take "long" to be along the package centerline in line with the 
pins.  So the maximal pad extent could confuse the axis heuristic.

> 
> Of course with a DIP or other 100% leaded you're sunk but then again 
> I'll bet these days almost no one is machine stuffing leaded parts.  If 
> they are, they get what they deserve ;)

Yes, all of my comments have been SMT-centric.  But then I realized that 
even most SMT boards often have through-hole parts on them.  I suspect 
those are still being machine stuffed for high volume products.  But how 
often is a through-hole part put in at an odd rotation?  The whole 
non-orthogonal orientation issue may be moot with through-hole parts. 
Or heck, this seems like a good case to use a band-aid clause in the 
footprint definition if it ever does come up.

> 
> With regards to square pads, how about this.  Add an extra rule that 
> says if you have square pads then look to see if it is a 2 pin 
> footprint.  If so, figure out rotation from the line formed between the 
> 2 pins.  I'll bet this captures most (but of course not all) of the 
> square pad cases.

Yes, I think that works.  It probably even makes sense to first make a 
determination if you have: a) two pad, b) dil, c) qfp, d) other.  Then 
you can switch() to an appropriate rule set.  Your two-pad rule will 
work for both my resistor footprints where the pad is along the minor 
axis, and my crystal and electrolytic cap footprints where the pad is 
along the major axis.

The unit vector trick might also be a quick discriminant for sorting 
dils and qfps. On a dil, you would expect all the pads to be aligned 
along the same axis, on a qfp, half would be along each axis.

And then there are BGA's..... I'm not going to think about them tonight.

> 
> -Dan
> 

-dave





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