Making 3D Models for KiCAD
Posted: Mon Jun 01, 2020 7:34 pm
One thing I have done before in KiCAD was create a 3D model of a part so that it could be displayed in the 3D viewer. I quickly found this tutorial online: https://www.workshopshed.com/2019/04/cr ... for-kicad/ That didn't look too hard so I gave it a go.
I first sat down and measured all the components that I wanted to create:
I have been using DesignSpark Mechanical (DSM) as my main CAD package since 2013, so I quickly whipped up a 2.1mm Barrel Jack design, only to find that DSM doesn't allow you to export a STEP file. I did find that I could export an OBJ file and import the mesh file into Fusion 360 (yes, some people will say I should be using Fusion 360 be default and save my self the minor conversion pain). After importing (INSERT function) the OBJ mesh, I had to click on the lower right hand cog and select: 'Do Not Capture Design History', then I needed to convert the mesh into a true F360 body, by selecting all the components of the item and then: Modify | Mesh | Mesh to BRep. Note: the Mesh option wont show up unless you have removed the capture history. Nothing appears to happen.
I then select all the Mesh Bodies and delete them. This action doesn't delete them, but it does force the true F360 Bodies to appear, one per mesh.
Next, I give a material type to each of the bodies. I select all the new F360 Bodies of the part and select: Modify | Physical Material. I select the material/colour I want for each of the parts of the item from the extensive menu. I do this by dragging each material onto the surface of each of the parts of the 3D model. Here is an example of my 2.1mm Barrel Jack I created:
I save the part in native format, and then: File | Export the part as a STEP file. This file is then copied over to my personal KiCAD packages3d folder.
I can then add the 3D model to my part. Here is a sub-view of my UPS Monitoring and Distribution board with they circled new components: This can be quite fiddly, especially for the USB socket. Some things are a bit out, but at least you get an overall view and appreciation of how it's all going to fit onto the PCB.
I first sat down and measured all the components that I wanted to create:
I have been using DesignSpark Mechanical (DSM) as my main CAD package since 2013, so I quickly whipped up a 2.1mm Barrel Jack design, only to find that DSM doesn't allow you to export a STEP file. I did find that I could export an OBJ file and import the mesh file into Fusion 360 (yes, some people will say I should be using Fusion 360 be default and save my self the minor conversion pain). After importing (INSERT function) the OBJ mesh, I had to click on the lower right hand cog and select: 'Do Not Capture Design History', then I needed to convert the mesh into a true F360 body, by selecting all the components of the item and then: Modify | Mesh | Mesh to BRep. Note: the Mesh option wont show up unless you have removed the capture history. Nothing appears to happen.
I then select all the Mesh Bodies and delete them. This action doesn't delete them, but it does force the true F360 Bodies to appear, one per mesh.
Next, I give a material type to each of the bodies. I select all the new F360 Bodies of the part and select: Modify | Physical Material. I select the material/colour I want for each of the parts of the item from the extensive menu. I do this by dragging each material onto the surface of each of the parts of the 3D model. Here is an example of my 2.1mm Barrel Jack I created:
I save the part in native format, and then: File | Export the part as a STEP file. This file is then copied over to my personal KiCAD packages3d folder.
I can then add the 3D model to my part. Here is a sub-view of my UPS Monitoring and Distribution board with they circled new components: This can be quite fiddly, especially for the USB socket. Some things are a bit out, but at least you get an overall view and appreciation of how it's all going to fit onto the PCB.