Coming from a graphic arts background, I was amazed and confounded at how terrible it is to bring artwork in to PCB design software such as Autodesk Eagle. After using Eagle for a couple of years now, I have a better understanding of why it is that way, but it still is baffling that there is no direct EPS or SVG import.
Thankfully videos like this exist… but even so, I thought there must be a way to avoid having to go to an intermediary drawing program (Inkscape), as described in the video and other online tutorials.
Based off of the above-linked youtube video I found a solution that seems to work well for me. Maybe it will work for you, too.
These instructions assume a bit of Adobe Illustrator knowledge and also assume that the artwork is a single color going to the top or bottom silkscreen layer.
Prepare & Export SVG From Adobe Illustrator
- Make sure your document dimensions are in millimeters
- Convert all type to outlines.
- Expand all stroked objects to outlines.
- Export to SVG (default values *should* be OK. Be sure to check the box to include the pasteboard.
- Open the SVG in a plain text editor like Atom.
- You should see a bunch of “path” elements. These seem to be the only element that converts well. Other elements like “Circle” or “Polygon” do not seem to get converted by the script below.
- Make sure there’s a “fill” attribute in each path element. The script seems to look for path elements that have a directly applied fill color. Adobe Illustrator has a tendency to apply style attribute via CSS. So you may have to add fill=”black” to each path element as I did in the screenshot below.
- Save the SVG file with these changes.
Convert the SVG
- Point your browser to Gordon Williams’ svgtoeagle online converter.
- Eagle CAD Layer: tPlace This layer will add the art to your top silkscreen layer. If you wish to put your art on the bottom silk, then enter bPlace, and also check the Flip image horizontally checkbox.
- SVG scale factor: Try the default value. You may have to play with this value to get it to scale to the correct size if it guesses wrong.
- Output format: If your art is getting placed directly on the PCB, then choose Board. If you are importing this artwork in to a Library footprint, then choose Library.
- Flip image horizontally? Only check this if you are placing your artwork on a bottom layer.
- Click the Browse button. Select your edited SVG file.
- Click the Convert button.
- You should have a multi-color image similar to the one below. The colors do not mean anything. They are just there to highlight that multiple shapes were created.
- Scroll to the bottom of the page and click the Download Eagle Script button.
Import in to Eagle
Output format: Board
- Open your board file in Eagle.
- Click the Run Script button.
- Click the Browse button to find your downloaded .scr file.
- Click Open to run the script. Your artwork will be placed at the origin marker of your board.
- Turn off all layers except the tPlace layer (or whatever layer you imported to). I hide the other layers so I don’t accidentally select anything else in the next step.
- Use the Group tool to select your artwork by clicking and dragging a rectangle around your entire artwork. Careful not to miss any!
- Select the Move tool. Right-click in the board window near the selected artwork (I prefer not to click directly on the artwork as it gives you only the one option to move selection).
- Choose the Move Group item from the contextual menu.
- Drag your artwork to the location you wish to put it and left-click to release the artwork.
Tip: Before you left-click to release: Right-clicking will rotate your grouped selection by 90 degrees.
Output format: Library
- Open the Eagle Library you wish to add the artwork to.
- Click Add Footprint to create a new footprint to contain your artwork. Give the footprint a name and click OK.
- Click the Run Script button.
- Click the Browse button to find your downloaded .scr file.
- Click Open to run the script. Your artwork will be placed in your footprint window on the layer you specified in the converter script.
- Use the Group tool to select your artwork by clicking and dragging a rectangle around your entire artwork. Careful not to miss any!
- Select the Move tool. Right-click in the window near the selected artwork (I prefer not to click directly on the artwork as it gives you only the one option to move selection).
- Choose the Move Group item from the contextual menu.
- Drag your artwork to the location you wish to put it and left-click to release the artwork.
Tip: I like to align my artwork with the origin cross-hairs mark (see screenshot above). When you place the library item in your board layout, this mark will be the point at which its coordinates align. In the case of my example I tried to get as close to the center of the logo as possible. For other items I might do the upper left corner or bottom center of the image. Whatever makes the most sense for that image or how it best aligns to other items.