Open source EDA software KiCad has been gaining a lot of traction recently. CERN has been devoting resources to introduce many new advanced features such as differential pair tracks, push and shove routing and this plenty more scheduled in the pipeline. One important requirement of EDA packages is a seamless interface with mechanical CAD packages by exporting 3D models in industry common formats. This improves collaboration and allows further engineering designs such as enclosures and panels to be produced.
KiCad has had a 3D viewer available for quite a long time. But it uses the VRML mesh format (.wrl files) and there are compatibility issues which prevent it from rendering certain versions of VRML files. Moreover, the VRML mesh export is not particularly useful since it cannot be easily manipulated in mechanical CAD software. Recent versions of KiCad now offer IDFv3 format export – the Intermediate Data Format, a mechanical data exchange specification for the design and analysis of printed wiring assemblies. Taking advantage of this new feature, [Maurice] created KiCad StepUp – an export script that allows collaborative exchange between KiCad and FreeCAD.
A FreeCAD macro and a corresponding configuration file are added to the KiCad project folder. You start with .STEP files for all the components used in the KiCad design. The next step is to convert and save all .STEP files as .WRL format using FreeCAD. On the KiCad side, you use the .WRL files as usual. When you want to export the board, use the IDFv3 option in KiCad. When [Maurice]’s StepUp script is run (outside of KiCad) it replaces all instances of .WRL files with the equivalent .STEP versions and imports the board as well as the components in to FreeCAD as .STEP models. The result is a board and its populated components which can be manipulated as regular 3D objects.
To get started, download the StepUp source from the Sourceforge repository. [Maurice] has also built a large library of 3D models designed using FreeCAD’s parametric capabilities, consisting of .STEP and .WRL models for each component. If you require additional resources, check out online services such as GrabCAD and 3DContentCentral from where you can obtain .STEP models for almost all of the commonly used components. The StepUp download contains a Demo project and User Guide to help you get started. [Maurice] also includes another FreeCAD macro to help with scaling, moving and rotating models.
The script configuration file lets you set the path to your 3D models folder and assign a color to the PCB. It’s also possible to ignore certain classes of components (such as the smallest ones or those non-critical to mechanical layout) from being imported into FreeCAD. This can be useful to reduce loading time and file sizes. We took a shot at trying out this new script and work flow, and after a few hiccups, were able to successfully perform the transfer. If you have any feedback to provide, [Maurice] is keen to hear you out over at the kicad.info forum. The forum would also be a good place to ask for any help you need with KiCad StepUp.
The first video here shows installation and use of the StepUp script and the second one demonstrates it in action exporting the CrazyFlie quadcopter from KiCad to FreeCAD.