Re: gEDA-user: autogenerate footprints

2007-01-16 Thread Stephen W Morss
I found a small bug in the footgen script.  It doesn't bite you, unless
you are doing BGAs with more than 39 rows.

The ballname() function has a line:
ball=rowname[(row/20) - 1]
I think it should be:
ball=rowname[((row-1)/20) - 1]

For smaller BGAs with less than 40 rows, this fix isn't important.  If
you have a 40 row array, you'll get BY, when you still want
AY for 40 (BA for the 41st row).  It will bite you again on the 60th,
80th, ... n*20'th  rows.

Steve


  John Griessen wrote:
 
 
  Peter Baxendale wrote:
  there's a short Python program at
  http://dlharmon.com/geda/footgen.html which I've found very useful. It's
  easy to understand and customise even if you only have a little bit of
  understanding of Python. It's really very easy to use and I've generated
  all my own footprints this way. I've added a few modest bits and pieces
  to it which I'd be happy to pass on if anybody is interested.
 
  Yes,  I'm interested to see your mods.  How about making a page on 
  gedasymbols.org?  Or, if you don't feel like it, is it OK if I put up 
  the mods on  http://www.gedasymbols.org/user/john_griessen/?
 
  John G
 
   
 The best way would be to get them integrated into the original rather 
 than having several copies floating around. I have been slow about 
 getting patches and bugfixes integrated into the script, but I will try 
 to get it done sometime if you would like to send it to me. I have had 
 one bugfix for omitballs on BGA in my inbox for months. I have also 
 mentioned doing a CGI interface to footgen, and am still planning on 
 doing that in the near future unless someone else would like to take on 
 that task.
 
 --
 Darrell Harmon
 http://dlharmon.com
 
 
 
 ___
 geda-user mailing list
 geda-user@moria.seul.org
 http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
 



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


Re: gEDA-user: autogenerate footprints

2007-01-06 Thread Darrell Harmon

John Griessen wrote:



Peter Baxendale wrote:
there's a short Python program at

http://dlharmon.com/geda/footgen.html which I've found very useful. It's
easy to understand and customise even if you only have a little bit of
understanding of Python. It's really very easy to use and I've generated
all my own footprints this way. I've added a few modest bits and pieces
to it which I'd be happy to pass on if anybody is interested.


Yes,  I'm interested to see your mods.  How about making a page on 
gedasymbols.org?  Or, if you don't feel like it, is it OK if I put up 
the mods on  http://www.gedasymbols.org/user/john_griessen/?


John G


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

Most of the modifications are now in the version at 
http://dlharmon.com/geda/footgen.html. See the comments at the beginning 
of the code for details. I did drop the part that offsets the part width 
on by 30 mils to maintain compatibility with old files. I also applied a 
few bugfixes that had been sent to me. Any future features or bugfixes 
are welcome.


Darrell Harmon


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


Re: gEDA-user: autogenerate footprints

2007-01-05 Thread Peter Baxendale
 Yeah, great idea... is there any standard Perl Script under svn that most
 people use? 

As well as Perl, there's a short Python program at
http://dlharmon.com/geda/footgen.html which I've found very useful. It's
easy to understand and customise even if you only have a little bit of
understanding of Python. It's really very easy to use and I've generated
all my own footprints this way. I've added a few modest bits and pieces
to it which I'd be happy to pass on if anybody is interested.




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


Re: gEDA-user: autogenerate footprints

2007-01-05 Thread Darrell Harmon

John Griessen wrote:



Peter Baxendale wrote:
there's a short Python program at

http://dlharmon.com/geda/footgen.html which I've found very useful. It's
easy to understand and customise even if you only have a little bit of
understanding of Python. It's really very easy to use and I've generated
all my own footprints this way. I've added a few modest bits and pieces
to it which I'd be happy to pass on if anybody is interested.


Yes,  I'm interested to see your mods.  How about making a page on 
gedasymbols.org?  Or, if you don't feel like it, is it OK if I put up 
the mods on  http://www.gedasymbols.org/user/john_griessen/?


John G

 
The best way would be to get them integrated into the original rather 
than having several copies floating around. I have been slow about 
getting patches and bugfixes integrated into the script, but I will try 
to get it done sometime if you would like to send it to me. I have had 
one bugfix for omitballs on BGA in my inbox for months. I have also 
mentioned doing a CGI interface to footgen, and am still planning on 
doing that in the near future unless someone else would like to take on 
that task.


--
Darrell Harmon
http://dlharmon.com



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


gEDA-user: autogenerate footprints

2007-01-02 Thread Ostheller, Joel A.
From : http://geda.seul.org/wiki/geda:pcb_tips

Some people write Perl scripts to autogenerate footprints.
 
Yeah, great idea... is there any standard Perl Script under svn that most
people use? 



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


Re: gEDA-user: autogenerate footprints

2007-01-02 Thread DJ Delorie

 Yeah, great idea... is there any standard Perl Script under svn that
 most people use?

I have some perl scripts on gedasymbols you can copy routines out of.
There isn't a standard perl script because that's not why people use
perl - each script is custom.  At best, you might be able to cobble
together a useful set of library functions which you'd call from perl.

Here's an example of a custom perl script to generate footprints.  It
builds a quad flat pack style footprint.  There isn't much in here
that's reusable, but you can see that it's easy to tweak it to change
the generated footprint.

#!/usr/bin/perl
# -*- perl -*-

$e = 0.50;
$vpins = 25;
$hpins = 25;
$b2 = 0.225;
$i2 = 0.9 + 0.4;
$out = 1.2;

$pin = 1;
$vy = ($vpins-1) * $e;
$hx = ($hpins-1) * $e;

print Element[\\ \TQFP-$vpinsx$hpins-$e\ \\ \\ 0 0 0 0 0 100 \\] 
(\n;

for ($i=0; $i$vpins; $i++) {
pad(0, $e * $i, -1, 0);
$pin ++;
}

for ($i=0; $i$hpins; $i++) {
pad($e * $i, $vy, 0, 1);
$pin ++;
}

for ($i=0; $i$hpins; $i++) {
pad($hx, $vy - $e * $i, 1, 0);
$pin ++;
}

for ($i=0; $i$hpins; $i++) {
pad($hx - $e * $i, 0, 0, -1);
$pin ++;
}

sub pad {
my ($x, $y, $dx, $dy) = @_;
$x += $dx * ($out + $b2/2);
$y += $dy * ($out + $b2/2);
$x2 = $x + $dx * ($i2 - $b2);
$y2 = $y + $dy * ($i2 - $b2);

printf(\tPad[%d %d %d %d %d %d %d \%s\ \%s\ \square\]\n,
   m($x), m($y), m($x2), m($y2),
   m($b2), m($e*0.51-$b2), m(($e+2*$b2)/3),
   $pin, $pin);
}

sub m {
my ($mm) = @_;
return int($mm / 0.000254);
}

print )\n;



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


Re: gEDA-user: autogenerate footprints

2007-01-02 Thread John Luciani

On 1/2/07, Ostheller, Joel A. [EMAIL PROTECTED] wrote:

From : http://geda.seul.org/wiki/geda:pcb_tips

Some people write Perl scripts to autogenerate footprints.

Yeah, great idea... is there any standard Perl Script under svn that most
people use?


I have some stuff at ---

http://www.luciani.org/geda/geda-index.html

(* jcl *)


--
http://www.luciani.org


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


RE: gEDA-user: autogenerate footprints

2007-01-02 Thread Ostheller, Joel A.
Thanks for the examples DJ and John... 

Joel Ostheller
Digital Hardware Design Engineer
Email  : [EMAIL PROTECTED]
Phone : 253.867.0407 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:geda-user-
 [EMAIL PROTECTED] On Behalf Of DJ Delorie
 Sent: Tuesday, January 02, 2007 2:54 PM
 To: geda-user@moria.seul.org
 Subject: Re: gEDA-user: autogenerate footprints
 
 
  Yeah, great idea... is there any standard Perl Script under svn that
  most people use?
 
 I have some perl scripts on gedasymbols you can copy routines out of.
 There isn't a standard perl script because that's not why people use
 perl - each script is custom.  At best, you might be able to cobble
 together a useful set of library functions which you'd call from perl.
 
 Here's an example of a custom perl script to generate footprints.  It
 builds a quad flat pack style footprint.  There isn't much in here
 that's reusable, but you can see that it's easy to tweak it to change
 the generated footprint.
 
 #!/usr/bin/perl
 # -*- perl -*-
 
 $e = 0.50;
 $vpins = 25;
 $hpins = 25;
 $b2 = 0.225;
 $i2 = 0.9 + 0.4;
 $out = 1.2;
 
 $pin = 1;
 $vy = ($vpins-1) * $e;
 $hx = ($hpins-1) * $e;
 
 print Element[\\ \TQFP-$vpinsx$hpins-$e\ \\ \\ 0 0 0 0 0 100
 \\] (\n;
 
 for ($i=0; $i$vpins; $i++) {
 pad(0, $e * $i, -1, 0);
 $pin ++;
 }
 
 for ($i=0; $i$hpins; $i++) {
 pad($e * $i, $vy, 0, 1);
 $pin ++;
 }
 
 for ($i=0; $i$hpins; $i++) {
 pad($hx, $vy - $e * $i, 1, 0);
 $pin ++;
 }
 
 for ($i=0; $i$hpins; $i++) {
 pad($hx - $e * $i, 0, 0, -1);
 $pin ++;
 }
 
 sub pad {
 my ($x, $y, $dx, $dy) = @_;
 $x += $dx * ($out + $b2/2);
 $y += $dy * ($out + $b2/2);
 $x2 = $x + $dx * ($i2 - $b2);
 $y2 = $y + $dy * ($i2 - $b2);
 
 printf(\tPad[%d %d %d %d %d %d %d \%s\ \%s\ \square\]\n,
  m($x), m($y), m($x2), m($y2),
  m($b2), m($e*0.51-$b2), m(($e+2*$b2)/3),
  $pin, $pin);
 }
 
 sub m {
 my ($mm) = @_;
 return int($mm / 0.000254);
 }
 
 print )\n;
 
 
 
 ___
 geda-user mailing list
 geda-user@moria.seul.org
 http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


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