Newbie Question: Setting the location of 3D (.wrl) files?

Just started using KiCad and overall I’m quite pleased with it.

However… (there’s always a however, isn’t there?)…

I completed a couple of small boards and attached 3Ds to each component. I thought is was absolutely wonderful to see the 3D representation of the boards. Then I decided to update the 3Ds to get the latest ones from github.

Well, then… When loading my projects afterward and using the 3D view, none of the components had a 3D image associated with them any more. Looking in the 3D folders for KiCad, I noticed the ones I assigned were simply not there any more… They were gone ! Now, I’m down to reassigning them to the components again using the updated 3Ds. :unamused:

Now the question…
Is it possible to specify (in a path setting or something) that the software use a folder for the 3Ds that relative to the folder the project is saved in (i.e., a subdirectory of it), to avoid this again? I really wouldn’t mind copying each .wrl file used to a subdirectory of the project’s main folder.

Or… Being new to KiCad… Is there a better way that I’m not aware of to accomplish this ?

Many thanks in advance.

Did you update the footprints or did you download new 3d files?
If you did the later, maybe the path has changed. (Some footprint libs have been renamed lately. This means that the 3d libs also got new names.)
Which footprints seem to make the problem?

If you make your own footprints you can do that.
You can even use your own path variable than.
Simply add a variable to “main kicad window”->preferences->“configure path” and use it in your footprints (Usage: $[path variable name]/[subfolder in wherever path variable points to]/[3dfile name].wrl)

For the kicad footprints, i don’t think you can change it. (This is part of the footprint.)
Kicad footprints expect the 3d files under:
Linux: /usr/share/kicad/modules/packages3d (or similar)
Windows: somewhere in c:/? @Joan_Sparky can you help me out here?
OS x has i think the same path as linux
You can look under main kicad window->preferences->configure path and look what is in KISYS3DMOD (I’m not sure what happens if you change this variable.)

I’m currently not at a pc where i have kicad installed so everything is from memory. The exact names might differ a bit.

Thank you for your response, Rene, as well as some extra tips concerning the footprints.

So far, I’ve only updated the 3Ds through pcbnew. I haven’t updated footprints, yet. And, yes, the Linux/Ubuntu path is as you stated.

To help clarify… Not only did the 3D update process update and add several 3D groups/folders, it completely removed several folders the originals I used were in… They’re simply gone !

You can look under https://github.com/KiCad/kicad-library if they are still there.
If not maybe checkout an old version. (You can use the tag system simply checkout the one that is tagged 4.0.5 or 4.0.4 … as a fast check.)
If they have been deleted than this happened because they are of a bad quality.
Maybe @SchrodingersGat knows more.

It could also be the 3d files update already looks in the new repo which has not yet all 3d files ported. (Currently only some of our script generated 3d files have been ported.)
But i highly doubt it.

Thank you, Rene.

Doing a little research reveals a path variable called ${KIPRJMOD}. Based on what I see from the post, it is possible to copy the .wrl files used in a project to a subdirectory of that project and use the above variable to access the .wrl instead of KiCad’s ‘packages3d’ folder.

Example: Copy the .wrl files you use to a subfolder of your project. When assigning the 3Ds to a component in pcbnew, use:

${KIPRJMOD}/your/path/to/3d_models/model_name.wrl.

I have looked at the Arduino Uno Template for KiCad, and this is the method used there. If someone more knowledgable than I could please verify this, then it would be exactly what I would like to do, as it would avoid my situation happening again. It would also allow zipping and sharing the entire project with others, regardless of the OS and library path names they use.

if possibble use step files

and nowadays that is very possible, not hard at all.
its the most common format provided by component manufacturares.

also the 3d vault at dassault systems is a gold-mine

Thank you, Nicholas.

I’ve been trying KiCad for about a week now and I really like it. I’m coming here from another software package that looked promising, but it’s just not “there”, yet (starts with F, ends with g).

There’s quite a bit I need to learn about this package, and Chris’ YouTube videos really helped convince me to make the switch. I could use any tips that could help me with this particular package… And understanding STEP files is one of them.

I’ll have a look at dassault systems.
Thanks again.

That will work afai-can-see.
Just be aware that it will need manual handling of the 3D models by you for this behind the scenes.
And everytime the footprints change in the github lib, you have to re-assign the 3D models again…

The more common approach would be to chose a folder for the 3D models that KiCAD is not using (out of the box) and linking the ${KI3DMOD} variable to that and collecting the 3D models in the same structure as the footprints.
And then naturally doing the same for the footprints and only relying on the github ones in the KiCAD folder if you need others that you don’t already have and adding them to your local library.

Search the forums for local library setup or similar notions on this subject.

1 Like