How to make 3D modeling work in Kicad 5.0.0?

Sept. 20, 2018

Greetings to all and thanks for your excellent work developing Kicad!

Last night I upgraded kicad from 4.0.7 by doing this:

    # apt-get dist-upgrade kicad

That installed kicad 5.0 !

So I copied this file my_2018_kicad_log.txt from ~/kicad4/ to ~/kicad5/
Then I moved all my URL.txt* files from ~/kicad4/ to ~/kicad5/


Here is my version information:

Application: kicad
Version: 5.0.0+dfsg1-2~bpo9+1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/2.0.4 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Platform: Linux 4.17.0-0.bpo.3-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.62.0
OpenCASCADE Community Edition: 6.8.0
Curl: 7.52.1
Compiler: GCC 6.3.0 with C++ ABI 1010

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=OFF

Here is my OS information:

It is called Neptune 5.3 – a debian stretch stable distribution.

The following words are from KInfoCenter - Info Center:

Software
Neptune 5.0
KDE Plasma Version 5.12.5
KDE Frameworks Version 5.46.0
Qt Version 5.7.1
Kernel Version 4.16.0-0bpo1-amd64
OS Type 64-bit

Hardware
Processors: 4-AMDAB-5600K APU with Radeon™ HD Graphics
Memory: 6.9GiBN of RAM
Swap: 3.5 GiB of Swap

Graphics
OpenGL Renderer: AMD ARUBA (DRM 2.5.0/4.16.0-0.bpo.1-amd64, LLVM 5.0.1)
Xorg-Server/Wayland: 1.19.2
Mesa 3D: 17.3.9

OS
OS Type: 64-bit
OS Version: Neptune5



                         KiCAD 5.0

And the beat goes on…

I opened my old project
/home/user/kicad4/555-PWM-relay/555-PWM-relay-cache.lib
and clicked on yes to update all the library parts to the new names

While watching Drew’s instructions for the 5.0 library changes at
https://www.youtube.com/watch?v=u1dDpdfDqUUs

I generated a report file and saved it to
kicad5/kicad5_remap_report.txt

This file contains basenames of parts where library files exist that
should be copied in case you want to save the entire project in one place.
At least that is what I understand.


The Good News:


When I opened the old project w/ eeschema and again w/ pcbnew, I
saw the exact same two-dimensional circuit that I saw in kicad 4.0.7.

I just had to click to transfer the old footprint files to the new
corresponding footprint files, which I am guessing kicad 5.0 down-
loaded from the web?

Once done, the pcb looked exactly as it had when I created it in
pcbnew 4.0.7. YAHOO!!!

You did a good job keeping kicad 5.0 backward-compatible. It was
simple enough that even I could do it. Thank you for your good work.


The Bad News:


When I tried the 3D-viewer, via View…3D-viewer, I saw a purple
PCB with the white silkscreen for the parts and the holes for the
parts (this is a through-hole only PCB) with red keep-away rings
around them.

However, no components appeared.

When I looked at the bottom side of the PCB, I saw a yellow board
with even yellower traces and light-green rings/squares (for copper)
around the holes.

So what do I need to do to download/create/ or whatever the 3D infor-
mation for the components that pcbnew 4.0.7 displayed ?

I already read Arjun’s post at:
3D models not showing
However, I did not look at ~/.config/kicad because I did not save a
copy before overwriting kicad 4.0.7 w/ kicad 5.0, so I did not have
the ability to view/modify/edit “any remaining file from the KiCad 4 installation”.
Or am I wrong – am I safe to assume that anyfile stamped w/ Sept. 20th
was from 4.0.7 and any file newer than Sept. 19th is from 5.0.0 ?

If that were the case, then could I simply remove any files older
than Sept. 20th ?

I am a newbie and want to do avoid doing anything dumb. That is why I
am seeking help.

Please correct me if I am wrong.

Posted Sept. 25, 2018

Russ

Every footprint has a field for the 3D module.
This field must contain the path to the 3D model.
The path can be absolute or relative.
The path can contain environment variables or not.

Check the paths to the 3D modules of your footprints.
In the picture you can see the 3d field of a footprint with a relative path to the 3d module.

Thank you for your reply, pedro.
Is that GUI something that I do in “PCB layout editor” (pcbnew), or is it something that I do in “Footprint library editor” ? or somewhere else?

Footprint library editor.

If you open the footprints properties of the footprint in the layout, you will modify the path for this single footprint in this single project.
If you modify the footprint in library, changes will be available for future projects.

After modifying the library, the footprints in the layout must be updated.

1 Like

So I gather that if I close this project whose PCB is open in pcbnew, and open the footprint library editor with no project selected, then I can add, for each library part used, a 3D model by clicking on the 3D-Settings tab as you have shown, and then clicking the [Add 3D Shape] button ?
I will try to do that next.

After modifying the library, the footprints in the layout must be updated.

Is there anything special [other than closing the footprint library editor and opening the PCB file w/ pcbnew] I need to do to make that happen?

Since BuildElectronicCircuit’s first demo. project uses only
a resistor, and LED, and a battery, I think I might try that one first Quickstart Intro. to KiCAD

Russ

In eeschema I chose Tools…Assign Footprints from the toolbar and saw a list of all my components.

However, I saw no footprint when I clicked the [View selected footprint] button.

Did I neglect to do something important?

Russ

Check the following reply that I posted on another thread:


I go through a detailed procedure for upgrading from V4 to V5. I think the problem you are encountering is due to the fact that once a footprint is placed in a board file, the libraries are ignored. The placed footprint is now embedded in the board file. This allows lots of latitude, like making subtle changes to the footprint in the board w/o having to change your libraries. But, that means that if you update the library the footprint in the board won’t see the library changes. Because the 3D object found by a pointer parameter in the footprint, updating all your libraries to V5 won’t magically point the footprints in your existing board to the new 3D libraries.

I think in my procedure steps 12.2 and 12.6 should help you get the 3D object pointer parameters pointing to the modern V5 libraries. As I warn in 12.6 you may need to find some new (or extract old from a backup of the V4 3D libraries) models.

You may want to read through the full procedure to make sure you haven’t missed a step along the way.

Yes, SembazuruCDE, I had already scanned your post to tdarlic starting Aug. 26th. Thank you for interjecting again to remind me. I will re-read your sensible upgrade process you posted there and see if I can discern what applies to me.

I started over again anew in eeschema 5.0.0 from the youtube-video by BuildElectronicCircuits.
So I will follow your instructions to tdarlic. I will post back when if or when I get stuck or if I need to ask further questions to clarify my understanding of kicad 5.0.0

Thank you, SembazuruCDE,

Russ

1 Like

Disclaimer: I did not read your full report. But the first part tells me this might be relevant to you: I had KiCad 4 installed previosly. Now i updated to v5. Now i have some problems with the library setup

I just checked the footprint library editor, Rene_Poschl, and found that I only had Packages…

Hello,
I made a short video to show how I upgraded my Kicad project from version 4 to version 5 : here
It is in French but I hope that the images are quite explicit and will allow you to upgrade your own files.
Christian

1 Like

Merci beaucoup, je comprends fran< c avec un cedille>ais, Christian.

Pedro,

In pcbnew, I clicked on the LED, R-clicked on “Properties” in the dialog box, chose the “3D Settings” tab. Then I clicked on the filename LED_THT.pretty under the /modules folder.
I selected LED_D3mm-3.kicad_mod, and double-clicked the OK button.

Now three lines appear for this part in the dialog box with the name “3D Shape Name”
(KISYS3DMOD)/LED_THT.3dshapes`/LED_D3.0mm_IRGrey.wrt
/usr/share/kicad/modules/LED_THT.pretty/LED_D3.0mm-3.kicad_mod
/usr/share/kicad/modules/LED_THT.pretty/LED_D3.0mm-3.kicad_mod

However, when I rotate the part using the 3D part viewer on the “3D Settings” tab of the “Footprint Properties” dialog box, I see only the two plated-through-holes in the PCB for the LED, but not the LED itself.

Looking at the board with the View…3D Viewer in pcbnew confirms this to be the case–the two LED plated-through-holes look great, but no LED shape appears.

What else must I do to add the 3D LED shape?

Does this file actually exists in your hard disk?
Do you know the value of KISYS3DMOD?

Also, who added these lines to the LED_D3.0mm_IRGrey.kicad_mod file?
/usr/share/kicad/modules/LED_THT.pretty/LED_D3.0mm-3.kicad_mod
/usr/share/kicad/modules/LED_THT.pretty/LED_D3.0mm-3.kicad_mod

What you need is the path, absolute or relative, to the file LED_D3.0mm_IRGrey.wrl

Is that back tick actually in your settings, or is that a typo? AFAIK there shouldn’t be a back tick in any of the KISYS3DMOD 3D symbol paths.
There should also be a dollar sign starting the path and the last character of the extension should be a lower case “L”, not a lower case “T”…
This is probably what you want (feel free to delete the other two and copy-paste this using the “Edit Filename” button of the footprint properties):
${KISYS3DMOD}/LED_THT.3dshapes/LED_D3.0mm_IRGrey.wrl

Yes, I am sorry. The backtick is a typo. The actual three lines are:
${KISYS3DMOD}/LED_THT.3dshapes/LED_D3.0mm_IRGrey.wrl
/usr/share/kicad/modules/LED_THT.pretty/LED_D3.0mm-3.kicad_mod
/usr/share/kicad/modules/LED_THT.pretty/LED_D3.0mm-3.kicad_mod

Blockquote

No, pedro, I don’t know its value. How would I find it? Does it matter that it is in braces, not parentheses?

Okay, Pedro, I just deleted the second two lines, ending in .kicad_mod, and saved the file. However, that didn’t make a difference. I still don’t see the LED. What did I neglect to do?

I searched for this file from my user account as user, and from /usr/share/kicad and from /usr/ and from superuser’s home as superuser:

root@neptune1:/usr# find ./ -name “LED_D3.0mm_IRGrey.wrl”

Nothing appeared.
Can you think of any other places to look for it?

The syntax for using path variables is ${variable name} (The brases and $ are essential here. They tell kicad that it is a variable)

These variables are set in the kicad main window -> preferences -> configure paths (or similar. I have no access to kicad right now and work from memory)

1 Like