FOSDEM talk about SVG2Shenzhen
Twinkle Twinkie gave an excellent talk about his awesome PCB art
- First off you'll need Inkscape installed.
- Then you should install the SVG2Shenzhen extension for Inkscape. If you've got a version of Inkscape before 1.0 then you should install SVG2Shenzhen release 0.2.17
On Linux, if you're getting an error with v0.2.17 with it not able to find the
.kicad_mod
file, make sure thebitmap2component_linux64
file in the Inkscape extension folder has the executable permission set.
As an example, we'll rework the PCB design from the DesigningMyFirstBadgeLife tutorial.
-
Run Inkscape
-
Create a new document
-
Prepare the document by choosing
Extensions
->Svg2Shenzhen
->1. Prepare document...
from the menu. Set the document width and height to a little larger than the artwork you want to import into Kicad—for the example 100mm by 100mm. ClickApply
and thenClose
. -
Import your artwork into the document. You can either do this by copying and pasting it from elsewhere or by choosing
File
->Import...
from the menu, finding the SVG to import—in this caseRudolph.svg
—and then choose the "Include SVG image as editable object(s) in the current file" option. -
Next decide which layers you want to use.
Shift-Ctrl-L
will bring up the list of layers. Make sure that the layers you want don't have "-disabled" at the end of the name, and the layers you want to exclude do have "-disabled" at the end of their name. Rename them accordingly. I usually leave theEdge.Cuts
andDrill
layers enabled, even if I'm not using them. For the example, we'll be using theEdge.Cuts
andF.SilkS
layers. -
Choose which layer you need for each bit of the artwork: select the element of the artwork; right-click; choose
Move to Layer...
; pick the relevant layer. Favour darker colours over light ones, because SVG2Shenzhen creates the layers by placing each against a white background, so more contrast is better. For the example, move the teal area to theF.SilkS
layer and the black deer outline to theEdge.Cuts
layer. It should look like this: -
Save your design. The filename you use will also be used for the finished Kicad module, for example, if you save your design as
my-logo.svg
you'll end up with a Kicad module calledmy-logo.kicad_mod
. For the example save it asReindeer.svg
. -
Create the Kicad module:
- From the menu, choose
Extensions
->Svg2Shenzhen
->2. Export Kicad...
- Enter the path to where to save your artwork Kicad module. Picking the same location as your Kicad project is the easiest option. FIXME Check this will show up properly
- Choose
Export layers as...
KICAD - Module
- You can leave the rest of the options as is.
- Click
Apply
to create the newkicad_mod
file. It might take a few moments to generate the module, once that's done you can close the dialog box and also Inkscape.
- From the menu, choose
-
Run Kicad and open your design. For the example you can open the project in Rudolph
-
We'll need to configure the footprint libraries paths so that it can find your new module. Choose
Preferences
->Manage Footprint Libraries...
from the menu and switch to theProject Specific Libraries
tab in the dialog. -
Click the
+
icon to add an empty row to the table. Then fill in theNickname
asProject
(because these are modules local to the project) and theLibrary Path
as${KIPRJMOD}/
: -
Click
OK
to close theFootprint Libraries
dialog and then open PcbNew. -
Choose the
Add footprints
tool and click somewhere to add a footprint. -
Find the
Project
library and choose theReindeer
footprint. -
Place it into the board in a suitable location.