My 1st 3D model for Kicad

Hi Andy,

that looks cool :smile:
do you entirely designed it in wings3d?

i think you could have done this in KiCad itself - just rebuild the PCB and export the 3D-Data -

i have never get the motivation to learn wings3d…
i use blender and FreeCad to design my models..
and for the process to convert so that kicad finally can read it i use wings3d :wink:

example of the HopeRF RFM69 modul (as THT variant):
Blender Render:


KiCad 3D Display:

sometimes i get a bit crazy about details for example at this smd crystal - its just to much fun to do this rounded edges and things with FreeCad:

here is my ‘Workflow’:

3D Model for KiCad Footprints:

Here is a working process to generate 3D *.wrl Files for KiCad PCBNew 3D-Viewer.
Tested with KiCad Versions:
  • Application: KiCad
    Version: (2013-07-07 BZR 4022)-stable
    Build: wxWidgets 2.9.4 (wchar_t,compiler with C++ ABI 1002,GCC 4.7.2,wx containers,compatible with 2.8)
    Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
    Boost version: 1.53.0
    Options: USE_PCBNEW_NANOMETRES=ON
             KICAD_GOST=OFF
             USE_WX_GRAPHICS_CONTEXT=OFF
             USE_WX_OVERLAY=OFF
             KICAD_SCRIPTING=OFF
             KICAD_SCRIPTING_MODULES=OFF
             KICAD_SCRIPTING_WXPYTHON=OFF
            
  • Application: kicad
    Version: (2014-12-04 BZR 5312)-product Release build
    wxWidgets: Version 3.0.0 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.8.2,wx containers,compatible with 2.8)
    Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
    Boost version: 1.54.0
             USE_WX_GRAPHICS_CONTEXT=OFF
             USE_WX_OVERLAY=OFF
             KICAD_SCRIPTING=ON
             KICAD_SCRIPTING_MODULES=ON
             KICAD_SCRIPTING_WXPYTHON=ON
             USE_FP_LIB_TABLE=HARD_CODED_ON
             BUILD_GITHUB_PLUGIN=ON
            
FreeCad is used to generate Solid accurate Models out of the informations from the datasheets.
For Packages with repeating Patterns(like Pins or Pads on a DIP or SOIC, ...) Blender comes with a wonderfull array-modifier.
so its easy to generate only one pin in FreeCad (accurate measurements) and generate the pattern with the modifier in blender.
Additional it is easy to manage the materials in blender more easily.

i have tested the blender wrl export and it did not work in KiCad.
the Wings3D export is working nicely - its a extra step but works ;-)
if some one has the time / knowledge to implement / extend the Blender WRL exporter to fit the KiCad format it would make it faster...
this could be done as python script.

generate model in FreeCad:

FreeCad:
    use orig. mm
    export as *__FreeCADExport.wrl

Blender:
import *__FreeCADExport.wrl
axis_forward = ‘Y’
axis_up = ‘Z’
clean up import:
search all not needed objects and delete.
rename used objects and also rename meshes.
check materials and rename
Ambient=1
Specular>=0.5
export from blender as *__BlenderExport.obj
options see Blender export

generate model in Blender:

Blender: 
    use orig. mm
    export from blender as *__BlenderExport.obj
        'blender2wings3d'
        op.use_selection = False
        op.use_animation = False
        op.use_mesh_modifiers = True
        op.use_edges = True
        op.use_smooth_groups = False
        op.use_normals = False
        op.use_uvs = True
        op.use_materials = True
        op.use_triangles = False
        op.use_nurbs = False
        op.use_vertex_groups = False
        op.use_blen_objects = True
        op.group_by_object = False
        op.group_by_material = False
        op.keep_vertex_order = False
        op.axis_forward = '-Y'
        op.axis_up = 'Z'
        op.global_scale = 393.6
        op.path_mode = 'AUTO'

Convert to KiCad PCBNew '*.wrl file'

Wings3D:
    import *__BlenderExport.obj
    export as *.wrl

// Needed for KiCad Versions <= (2014-12-04 BZR 5312)-product Release build
Text Editor (Notepad++):
open *.wrl
search for ‘ambientIntensity 0.0’
replace with ‘ambientIntensity 1.0’

KiCad PCBNew
load *.wrl as 3D shape
Scale=1
Shape Offset = 0;
Rotation=0

i have documented this ‘workflow’ just that i can remember what steps to take..
it is relative complicated - but i like the software involved.. so i have fun doing it this way…

sunny greetings
stefan

2 Likes