KiCad can generate 3D views of the model being developed and can also export them in several formats. However, the files aren't useable in many CAD programs.
The Problem
Interfacing a PCB with other parts of a project is eased if the PCB model can be imported into the mechanical design model. When Autodesk purchased Eagle they integrated it with Fusion 360 to make the communication more seamless. However, the VRML models used by KiCad cannot be directly used by many CAD programs including Fusion 360. This blog will describe one way of making them useable in mechanical CAD programs. The PCB shown below in the KiCad 3D viewer will be used to demonstrate the process.
Exporting from KiCad
The export options are accessed by using the pull-down menu File-->Export as shown in the image below. As noted above, KiCad uses VRML descriptions of the components to generate the model.
At first glance, it might appear that a STEP model would be appropriate for export to CAD programs. However, selection of that option results in the following messages:
Edit: There is a thread on the KiCad forum which describes this issue. It recommends ticking the "Substitute similarly named models" option in STEP export. I tried it and it clears the "cannot add a VRML model to a STEP file" message but I still can't see the components on the resulting model after export. Another option is to export the VRML model which in my experience always picks up the components so select that option and note where it is stored.
Converting the Model
KiCad is said to work well with FreeCAD and there are FreeCAD macros that do conversions that I've not used and it may well work with STEP files generated by KiCad. Another option is to try converting VRML files using online conversion programs. The method described here uses the open-source software Blender which released version 3.0 in December of 2021.
The free version of Fusion 360 can import STL, OBJ, and 3MF files so those are types that will be explored here. Blender can handle all three (although 3MF is an add-on) along with several others as shown in the screenshot below. Select X3D to import the .wrl files generated by KiCad's VRML option.
Once imported, the model will be visible in Blender.
Now the model can be exported by using any of the formats available, including STL, OBJ, and 3MF. The image below shows export using the .obj format.
Importing into Fusion 360
Hopefully, one of the formats available in Blender can be read by your CAD program. There are several ways of importing mesh models into Fusion 360 but here they will be inserted directly with the pull-down menu as seen in the screenshot below.
I usually work in millimeters but note that Fusion 360 can match whatever units you are using. STL and OBJ models do not retain color but are dimensionally correct after importing. There isn't much to choose between them as shown in the screenshot below (STL is on the left, OBJ is on the right). Both are easy and fast to manipulate inside Fusion 360 (but ugly!).
3MF files are more complex and have additional information but are much slower to manipulate. A 3MF model is shown in the screenshot below.
In general, I prefer OBJ files as they can be manipulated quickly and are dimensionally accurate. In the screenshot below a simple enclosure was designed around the PCB model which mates cleanly with the mounting holes and has an opening in the correct locations for the pins.
Conclusion
While not as seamless as it could be, and not that aesthetically pleasing, this method allows for dimensionally accurate models of a PCB to be created from KiCad for use in mechanical CAD packages such as Fusion 360. Users could also investigate the use of FreeCAD which seems to be popular with KiCad users. I'm not an expert at this and if you have a better method I'd love to hear about it in the comments below.