No relative path when specifying 3D models in nightly

I keep playing with the nightly (Sept 19th) in a Windows 7 VM. I have my paths for 3D models and footprint set up correctly and for previous projects and footprints with the 3D models already specified they display correctly and show a relative path to the 3D model folder. The problem is that when I try to add a new 3D shape it will open up on my list of drives and I have to navigate all the way to my 3D folder under my home directory tree from there (this happens the fist time after starting PCBnew, after that it starts in the 3D folder.) The resulting path to the new 3D model is in all cases not relative to the 3D model folder but contains the whole long absolute path. The 3D model will display correctly then, but I do not think this is the way it is supposed to work.

Also this is not the way it works in 4.07 where navigation starts in the 3D model folder and relative paths are resulting from the selection. Is there a setting I am missing somewhere or is this a bug/incomplete development?

I’d budge towards the latter… @cbernard or @kammutierspule might know more

PS: I do this stuff manually (at least the last time I had to do it) and work with relative paths in there. But I think I remember there being absolute paths caused by the program, although everything was set for relative paths.

Sorry I don’t know about that mechanism.
I used it was working ok for me I think, I just used it on Linux
I just tried it now on Linux, if I select a folder from the configured paths, it will jump/navigate to that folder.
Can you try to select the folder and then add the model and see if adds it with a relative path?

1 Like

Thanks for the quick responses. No, it still uses the absolute path. The only way to get a relative path is to then select edit and delete the path to the 3d model folder. It will still find the 3d model without the absolute path part.

By doing stuff manually, do you mean editing the text of the footprint file directly?

Could someone with a windows version do a quick test so that we can get a clear answer as to whether a bug report should be filed?

Procedure: With OpenGL canvas in ver. 0.17, right click the footprint, select properties, go to the 3D setting tab. Selelct add 3D shape. The easiet way to navigate to the 3D folder is to use the listbox button with all the defined paths, including the 3D model library to navigate to that library. After selecting a 3D model press OK. The 3D Shape Name box will now show the full path to the 3D model, not the relative path.

My installation is Win 7 and 19SEP17 KiCad nightly.

In the “Select 3d Model” window, the “Paths:” is a drop-down menu. Click the down arrow on the right side of that menu. Select the path you used last time.

Now, I’ll admit that the Default path displayed should be the one that leads to the 3d libraries directly. Why should everyone have to waste a click when KiCad already knows where the 3d libraries are?

On my version, the path is prefixed by the string “${KISYS3DMOD}”. Maybe this is a bug, or maybe you don’t have that string configured?

ON EDIT: It is “”${KISYS3DMOD}"" and not “”$[KISYS3DMOD}" … typo I did not catch.

Thanks, this starts to get useful. I have the KISYS3DMOD folder specified as environmental variable. Is that what you mean?. Previously defined 3D models are found in that folder and is displayed without prefix, not even $[KISYS3DMOD} is displayed, just any potential subfolder and the file name. I looked and there is a configure path button. I found I could add the path for the KISYS3DMOD alias there, then it is shown as KISYS3DMOD:3DfileFIlename after adding a 3D model. And it displays the 3D model. I can get back into the dialog to display the alias:

However after I save the files, save KiCad settings, exit KICAD , restart KiCad and open up that file and the properties dialog again, the alias that I just defined is gone and Kicad cannot display the 3D model I just added. If I remove the alias from the file reference the 3D model is displayed again.

I think it is a bit ridiculous to have to manually type in information again that KiCad already knows. And obviously there is a bug or my installation has a corruption that makes it forget the alias for the 3D model folder I entered. I do not understand the reason for this complexity, it seems to work well enough in 4.07. Perhaps something is not quite finished in the nightly here and it is planned to work more smoothly?

Attempt to move your “Number Five” library to the top of the list, into the #1 position.

Or, maybe delete all the other entries???

CAUTION!!! DANGER!!!

I’m not using the same nightly version that you are using. Apply the above instructions at your own risk/value ratio based upon your newer knowledge.

ON EDIT: Only load one 3d model to a footprint at a time. This seems to have been done with some forward thinking in mind, but does not seem to do anything but break things in practice at the moment.

you have grey entries…

We are actually using the same Sept 19th version I think, mine is installed from kicad-r8510.dddaa7e69-x86_64.exe
Right now I am trying a reinstall.

That is a different dialog. They are not greyed out in the Path Configuration. They are greyed out in the 3D Search Path Configuration dialog because they cannot be edited there, only viewed as per the help info. I still cannot wrap my head about what the philosophy is behind that dialog.

Check your brackets. Do you have a matching pair of {} or do you really have [} as you have written?

1 Like

Thanks for further suggestions. After complete uninstall I did a reinstall from scratch in the same VM (making sure not to use default environment variables in the main program, only help files and library wizard ticked on), re-specified the path variables, copied the fplib table back in. This time it responds as Sprig describes in the quoted message below, even with multiple models specified for one footprint. (That is a feature I recently used in another project, it worked OK in 4.07 too.) What was symptomatic is that before uninstall the brackets were not accepted for the alias in the 3D search configuration dialog. As before though, when I reenter the dialog, the alias I added is gone.

I am getting a feeling that it should not be necessary by design to add the environmental KISYS3DMOD variable already specified in order to have the 3D models appear with relative path, and that this dialog is there to add aliases for paths that are not in the environmental variables, thus the latter are grayed out. The move up and down commands do not work on these, I get a "No entry selected message in response.

Unfortunately I did not try adding a footprint this time without specifying the 3D path variables to see if that worked now without specifying the already existing path configuration. I also left out specifying some custom names in the Path Configuration. I can not find the KISYS3DMOD variable specified in any of the configuration files or the project profile or the KiCad profile except the standard one in KiCad_common, so likely my action of specifying the default KISYS3DMOD as 3D Search Path Configuration had no effect anywhere and it works without it.

So in conclusion I likely had some corruption that caused the problem, but I need to keep a watch on this. Thanks for all the help to solve it.

You can simple delete your kicad profile to refresh the configuration, without the need to re-install all the suite.
(you can also backup the previous profile)
The profile is in:

%APPDATA%\kicad

2 Likes

And in ~/.config/kicad/ for linux

2 Likes

Thanks, yes I routinely back up that folder before each upgrade in case something goes wrong, and sometimes individual files in it. I do not want to loose my modified fplib table, and in the future the symbol table. I did check the content of the different configuration files before the reinstall and everything looked normal.