[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: pcblander Landpattern Generator Update
Since the initial release of pcblander, there's a new capability. In
addition to flexible generation of footprints from source files, now
pcblander can append the source code into the landpattern, so you never
loose it and always know what the landpattern is. If want to know
exactly what a landpattern is, all you have to do is browse the top of
the landpattern file. The pcblander code is commented out from pcb, so
the landpattern will load without a problem. If you edit the human
readable top part of the file, the landpattern can rebuild itself if you
type it at the command line.
Here's an example of an 0603 resistor landpattern:
#!/usr/bin/env pcblander
#@teaser|
#@teaser| include("footprints.inc") # macros
#@teaser| include("constraints.inc") # common constraints
#@teaser|
#@teaser| num_pads = 2
#@teaser| pad_width = 1.1mm
#@teaser| pad_height = 1.1mm
#@teaser| padgap_x = 0.6mm # horizontal gap between left and right pads
#@teaser| keepout = 20mils # center-silk to edge of pads
#@teaser| SO(0,0) # 2 padded SO package, centered at
(0,0)
#@teaser|
#@teaser| # write it all out
#@teaser| mywriteland_and_source("0603.sfp")
#@teaser| exit()
Element[0x00000000 "" "" "" 0 0 0 0 0 100 0x00000000]
(
Pad[-3346 0 -3346 0 4331 1200 4831 "1" "1" 0x00000100]
Pad[3346 0 3346 0 4331 1200 4831 "2" "2" 0x00000100]
ElementLine [7512 4165 -7512 4165 1000]
ElementLine [-7512 4165 -7512 -4165 1000]
ElementLine [-7512 -4165 7512 -4165 1000]
ElementLine [7512 -4165 7512 4165 1000]
)
If you wanted to change the pad gap from 0.6mm to 0.8mm, you could edit
the line with "padgap_x = 0.6mm", save the file and type "0603.sfp" at
the command line, and the footprint would rebuild itself. This works
for any pcblander script. To create a footprint/source from an existing
source, change mywriteland(...) to mywriteland_and_source(...), follow
it with "exit()" (so pcblander doesn't try to execute the pcb footprint
text), and put "#!/usr/bin/env pcblander" at the top. Run the file and
a new one will be created with the commented source and footprint
inside. The release, more examples, and additional documentation is at
www.catalinacomputing.com/gEDA.
Steve
From May 1, 2007:
Recently, I built a board using lots of custom surface mount parts, as
well as a number of unusual through hole parts. When it came time to
generate the footprints, I needed to design a number of new footprints.
I looked into the tools available, and found some graphical tools and
specialized scripting tools, but they either were hard to use, or I
couldn't get them to build some of my footprints (sorry in advance, if I
misrepresented someone's tool). To solve my problems, I came up with
"pcblander", which has been very effective for me. It uses human
readable scripts as input. The scripts are pretty easy to follow, as
they are mostly assignment statements and a few function calls. For
those of you who use Darrell Harmon's "footgen" program, it has a number
of similarities to that - I got myself started on pcblander by learning
how footgen works. pcblander is quite flexible and extensible - if
there's something missing, I should be able to add it in quickly (or if
you prefer, you can do it by writing macros or, if you want complete
flexibility, functions in perl).
If you are interested, I've got a release at
www.catalinacomputing.com/gEDA containing the program and source code, a
readme, and some footprint examples.
Steve
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user