Archive of the former Yahoo!Groups mailing list: Homebrew PCBs
Subject: Eagle stuff
From: "Mike Young" <mikewhy@...>
Date: 2005-12-04
So it was time finally to teach Eagle to export the images I want. It turned
out there is no need. Someone else had already perceived my wants, and wrote
just what I was going to write, but better. :) I also learned a few related
things along the way. (Trace outlines for milling, for one. I'll mention
these again at the end.)
cam2images.ulp exports images of sets of layers defined in CAM jobs. The
trick now is to set up a CAM job that defines the views you want. Read the
docs if you don't already know how. (I recall now why I never read them; the
docs are simply AWFUL!) Here's a short summary:
∗∗ Click the "CAM processor" icon on the toolbar to open the CAM editor.
∗∗ Add a job section for each set of layers you want to image.
∗∗ Select the layers you want printed.
∗∗ Name the output file ".XXXXX" to write to file
"<yourboardname>.XXXXX.YYY". Without the quotes, of course, and note the
leading '.'. Substitute a meaningful string instead of XXXXX (".TOP" or
".cmp", for example, for top copper). YYY will be replaced with the
appropriate extension for the image file type you'll select later.
The ULP ignores the other job information. Which is nice, because it limits
what you need to learn about. Alas, it also doesn't honor the "mirror"
option, which makes sense since you likewise can't tell Eagle to mirror the
image.
Save the CAM file. Run cam2image.ulp. Select the CAM job you created. Set
the image options. You'll likely want a different resolution than the
default 75 dpi. Click OK.
I changed the default options in the ULP to select monochrome, PNG, and 600
dpi. You might want to do the same, since the idea is to automate your
preferences.
=============
Along the way, I also "discovered" these things about Eagle:
outlines.ulp creates a millable outline of your copper on a new layer.
Search help for "outlines data" for more info.
ULP operates on the board or schematic by returning a string back to Eagle,
which it tries to run as a script. It seems simple enough once someone
points it out to you, but easy to miss in the docs, if it's in there at all.
There seems to be no easy way to delete items in ULP or scripts, which might
be just as well. There's a lot of potential for harm there. OTOH, it seems
not unreasonable to create some objects and then delete them afterward to
clean up.