I liked very much the realistic 3D renderings obtained after exporting the board from Eagle to SketchUp, with the EagleUp script. Since the 3D viewer integrated into Kicad is not very realistic and it lacks some features, I searched a way to bring the realistic 3D rendering capability to Kicad and I came up with KicadUp.
KicadUp a script which produces an output compatible with the one generated by the EagleUp script. This way, the board could be imported into SketchUp using the original EagleUp plugin, and you can benefit from the already existing 3D models developed for the Eagle parts.
At this moment the KicadUp script is experimental and uses some features from the development version of Kicad (notably the Kicad Python bindings which offer an easy way to parse the PCB layout files).
Setting up the environment
At this moment, it is a bit cumbersome to use the script, since it only works on Linux, so, you need a Linux box for generating the output. There are two setups which could be used:
- a Linux workstation and a Virtualbox running Windows
- a Windows workstation and a Virtualbox running Ubuntu 12.04 (64 bit)
On Linux, you need to have the following programs installed: ImageMagick, Python, Gerbv
On Windows, you need the following programs:
- ImageMagick (open source, I recommend using the Q8 static binary)
- SketchUp (freeware)
- Maxwell Render for SketchUp (easy to use, the free version is limited to 800×800 px)
- eagleUp_import.rb plugin for SketchUp (it is found in the EagleUp package)
- 3D models (you can get them from the EagleUp warehouse)
The file eagleUp_import.rb should be copied to “C:\Program Files\Google\Google SketchUp 8\Plugins”.
An alternative 3D renderer, which also works on Linux and doesn’t have size limitations is Kerkythea.
Download the KicadUp files from here: kicadup-v0.1.tar.bz2 (compiled under Ubuntu 12.04)
Update: Kicad-Up compiled for Kicad 2013-03-31_BZR4008 under Ubuntu 13.04 64 bit available: kicadup-v0.2.tar.bz2
Unpack the files on you Linux box and type ./kicad_up.py -h in the directory where you unpacked the files. This command should print the help.
If you use a different version of Kicad, try to follow these steps (the example is for Kicad 2013-03-31_BZR4008):
- build Kicad with scripting support by running “cmake -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON” in the Kicad source folder
- delete the file pcbnew.pyc from the kicad_up folder (this will be automatically generated by Python at the first run)
- copy stable_2013-03-31_BZR4008/pcbnew/pcbnew.py to the kicad_up folder and overwrite the current pcbnew.py
- copy stable_2013-03-31_BZR4008/pcbnew/_pcbnew.so to the kicad_up folder and overwrite the current _pcbnew.so
In order to use KicadUp for a given project, you need to plot the Gerber files with “Exclude PCB edge layer from other layers” option unchecked. This is necessary because the PCB layout images are generated from the Gerber files.
Run the KicadUp script on the Linux box and then import the generated files in SketchUp, as you would do with the files generated by the EagleUp script.
Usage example: ./kicad_up.py project_name_here path_to_project_folder_here
The script only works on Linux because it uses Gerbv to generate the PCB layout images, and it seems that the Windows version of Gerbv can’t be used from the command line.
At this moment, KicadUp only works with rectangular boards.