Dealing with PCB artwork: procedural vector art tooling for Eagle

I like decorating PCBs. After I’ve spent ages designing and routing a schematic, I want it to look nice.

Sadly – this is very badly supported by most CAD software dealing with circuit boards. Some vector art import tools exist, but they are all very far removed from an ideal art workflow. The artist can’t really get direct visual feedback on the endresult.

To fix this, I’ve started writing some tools.
The first tool is a C# module that mimics the HTML5 Canvas2D vectorographics API but outputs scripts for Eagle CAD. Eagle can only deal with cutout-polygons on copper layers! This means that polygons with holes (like the letter O) will not have their insides emptied out if they are on the silk layer. Therefore, all polygons are converted to holeless triangle meshes. This allows the tool to import complex shapes. The first usage of this system is the text function. Any font file you have can safely be converted to a holeless polygon soup.

The second tool is a full Eagle board file importer, rasterizer and interpreter so you can extract relevant curves and use them to dynamically create graphics.

The third tool will integrate the first and the second tool with a code-editor window and a Lua backend. This should allow very fast “live coded” procedural board-art graphics. I am still working this.

Screenshots of the progress in chronological order:

The Eagle script generator starts to work:
Generating Vector Art for Eagle

Holes correctly converted to Eagle polygons (triangle soup):
Generating Vector Art for Eagle - 2

Importing Eagle board XML files starts to work (this is the PCB for the first LED badge):
Eagle Board Rendering In C#

More complex boards start to work (Goldfish R3 and Protoboard v2):
Eagle Board Rendering In C# - 2

01 - SMD Pad Rotation Correct!

Added the Eagle “ArcTo” curves -> automatically converted in to seperate line segments. (See the round corners – this is the Goldfish R3 connector board)
02 - Better layer abstractions and linewidths

And finally:  first glimpse of the combined board-reader-and-script-executing tool:
03 - Some random vectorart test

I am currently still perfecting the board-import/rendering function. After the integration of all the tools has been completed I will upload the code to our Github page.