Converting 3D models from EasyEDA to KiCAD using FreeCAD

3D component models are not mandatory in a PCB design, but they come in handy to check footprints and potential mechanical collisions. In this video, I export a 3D modelisation from EasyEDA, the JLCPCB EDA solution, to fan’s favourite KiCAD, using the open-source 3D design software FreeCAD.

Trick EasyEDA into exporting a solid

EasyEDA is a CAD solution provided by JLCPCB, and it has ready-made designs for most components in the LCSC/JLCPCB catalogue. Unfortunately, there is no quick export from EasyEDA to KiCAD.

Login to EasyEDA with your JLCPCB login, and select Standard version. It will open an online PCB EDA.

Create a project: it will automatically create a blank schematics. Add the component you want to the schematics and save it.

Next, create a PCB for your project, save it, and import your component in it. The 3D view should show you your component.

Move your component to the axis 0, and move the PCB shape away from the component. Then, export the PCB 3D view as 3D OBJ file: it contains your component 3D as well as a bit of PCB that we will remove in FreeCAD.

Modify your 3D in FreeCAD

Unzip the export from EasyEDA and use FreeCAD to open the .obj file. It should display the component and PCB.

Open the “Mesh” workbench. Select the component in the hierarchy panel and use the “Cut mesh” tool to separate component and PCB.

Then, select the “Scale…” tool to apply a 1/10 transformation: input a 0.1 scaling factor.

Since the offset was modified by the scaling operation, your object is now out of focus. Right-click and “Fit all” will make your object appear on screen again.

Display the axis with View > Toggle axis cross, and unzoom until you can see it. In order to have an estimate of the coordinates, use the “Measure distance” tool, aka the ruler: you can display the ruler point coordinates in the “Data” panel.

Then, click on your component, and fix the offset with the Edit > Placement… menu.

Here are some magic offset values you can try:

X -402
Y 323,4
Z -1

Click on the dice on the top-left corner to display the top view and fine-tune your offset.

Once your scale and offset are done, export the object with File > Export… and use VRML format (.wrl extension).

Import in your KiCAD component

Open the Footprint Editor, and select your custom component. Go to File > Footprint Properties… and switch to the 3rd tab, “3D Model”. Open your VRML file in the tab and check that your alignment and size is correct. You can rotate the component with a left click.

Side note about the format

For KiCAD component models, you should also provide a STEP file, which is a more complete description of a solid than VRML or OBJ are. But this is all we can get without redrawing the shape from scratch, and it still is pretty useful.