Basically, in gEDA it’s pretty fantastically easy to put pictures on the silk layer using pstoedit. However, for the pins/pads layer this can’t be done because there is no support for polygons in the footprint files.
You could draw the picture yourself using lines, but if there are a lot of curves that could take a long time. Since it’s gEDA and everything is open, it’s pretty straight forward that you can make whatever you want to do whatever you want.
Pad [x1 y1 x2 y2 thickness clearance mask name pad_number flags]
With this info, we could make tiny ‘pixel pads’ for the black pixels that we see in the image!
I created a Processing sketch that reads in the image, looks for non-white pixels, then creates a square line segment pad with a given width and clearance. You can grab the sketch on Github here!
Here are some additional commentary on some parts in the code.
int x1 =0;
int y1 =0;
These are our coordinate variables that are used when looping through the image. Essentially, each pixel pad is just x1 x x1, or y1 x y1. The width is what gives it how wide it is, and then the coordinates are incremented based on that width. It’s odd, but was quick to write it this way.
int t =200;// thickness of line segment (aka pixel) 100
int c = t/4;// 2000
These are two fun variables.
t is the thickness of the pixel pad. The smaller it is, then essentially the more “resolution” you would get in your output footprint picture. Larger, the more pixely and big it will look.
c is the clearance on the solder mask layer. I’m not sure if you can get away with this being 0, but I guess it would depend on your board house. If you have it as t/4, it works out pretty well as it is a very tiny outline.
More on the c now. If the value is large (eg, 2000), it might look a little goofy:
If it is a small value, or say t/4, then it looks decent:
This is what makes up each pixel pad. It’s the start point, end point, thickness, and clearance. This is added to the footprint file for every non-white pixel that the sketch sees. You can check out the document linked to above for more information on the Pad structure details.
output.flush();// Write the remaining data
output.close();// Finish the file
Well, that was pretty easy, wasn’t it?!
It only took about 20 mins to write the sketch, which was pretty cool. It was pretty exciting when it worked first try!
So hopefully this will help people make their boards with more creativity. I was inspired by the SpikenzieLabs boards where sometimes they have their logo on the pins/pads layer (but they use Eagle).
What do I plan to do with it? I want to make an Arduino derivative that has lots of stars on it. I dunno why, it just sounds cool! It would look really good as a black board with silver solder. … or just good purple and gold from OSH Park