What am I doing wrong - 3D

I just installed the latest nightly build, 5.0.0-rc2-140-g9302bbce5. Installation went fine, I went with all the default options, lots of things got unpacked and installed, including, I think, the latest libraries. Checking my paths in the main KiCad app, everything is set to defaults:

environment

I made a simple test board with a couple of library components. When I open the 3D viewer, the board is empty. If I have a look at the components’ properties, I see that they have vrml models, but no STEP models. I know that STEP is required for 3D export, but t’s weird that the 3D viewer won’t display the components with just vrml models present, as I never had any problems with 3D viewer displaying components in 4.x.

If I click Add 3D Shape and navigate to and add the appropriate STEP model to each component, everything works fine - the 3D model is shown in the viewer, and I can export the board (although it lists a bunch of “no model defined” and other errors before ultimately saying “STEP file has been created successfully”, see below).

Obviously we can’t be expected to go through every component, manually adding the STEP file to each one, so how does one get, for example, the 0603 resistor STEP file to associate with every 0603 resistor footprint automatically?

Here’s the report file from the board STEP export, FWIW:

Warning: 18:36:14: C:/Jenkins/workspace/windows-kicad-msys2/src/kicad/utils/kicad2step/pcb/oce_utils.cpp: AddComponent: 583
Warning:   * no model defined for component 'C1'
Warning: 18:36:14: [3D File Resolver] No such path; ensure the environment var is defined
Warning: C:\Program Files\KiCad\share\kicad\modules\packages3d\Resistors_SMD.3dshapes\R_0603.wrl
Warning: 18:36:14: C:/Jenkins/workspace/windows-kicad-msys2/src/kicad/utils/kicad2step/pcb/oce_utils.cpp: AddComponent: 583
Warning:   * no model defined for component 'R1'

Thanks

I can see højere is a mention of R_0603. Wrl
This has been renamed in V5 to include metric names. So I believe these are simply due to footprint and models has been renamed. Perhaps you could try adding the WRL file and see if it works correctly

It makes sense to keep around the old libraries to deal with old projects. For 3d models at least it is kind of easy as you can switch around the kisys3dmod variable between the two different library versions. with symbols and footprints it is harder as the whole sym-lib-table and fp-lib-table would need to change. (you could of course use local libraries or trust the cache and rescue libs for the schematic. the pcb side should not really pose a problem.)

There is now an environment variable that can be used to switch between different config directories. So it should be possible to have one config setup for the v4 library and one for the v5 library. (i would guess that a startup script can be used to set up the intended environment.)

It’s not a case of imperial vs metric, I know the difference (although I don’t understand why KiCad developers can’t standardize on one or the other). I used an 0603 imperial footprint and a 1608 metric STEP file, and the 3D model lined up perfectly with the footprint.

I don’t think this is a case of old libraries or path variables. It was a new, complete install of 5.0, with new libraries. The installer warned me that it would delete all old files in the target directory. I started a new project, used new schematic components, and associated them with new footprints. The footprints have vrml models (which don’t show up in the 3D viewer) but no STEP models. When I manually add the STEP models, everything works.

Im talking about the “same” model has been renamed from R_0603.wrl to R_0603_1608Metric.wrl which very well could be why kicad can’t find it

Footprints are cached inside of the pcb file. so if the project was created with the old libs you will now have the wrong 3d models.


and there is another thing that can be problematic. if you had kicad setup in the past then your fp-lib-table will still contain the old libs. (especially if you had it setup for github plugin. which was the default in kicad 4.x)
This will influence new projects as well.


In contrast the 3d models are neither cached nor is there a chance that a new install will still have the old libs

It is a brand new project, created entirely with the new install. Maybe it’s the fp-lib-table, thanks. Tomorrow I will try to delete everything related to KiCad and start again.

just open the footprint library manager. if it contains any lib starting with housings_ then you have the old libs setup.

I deleted my AppData\Roaming\kicad folder, and reinstalled 5.0 for good measure. Now everything works as expected :smiley:

I think most people expect this kind of thing (configuration files buried in an invisible directory) to be updated automatically when they update an application, and many will experience difficulties similar to mine unless the installer is improved.

There is a problem with that. Touching personal config files of the users is a controversial topic. If the installer would flush these, any personal libs you have would be deleted from the config files. A better way would be to provide a button to reset the config directory to factory conditions. This way users are in control. (to be honest it would be low priority as the same can be achieved using the file browser.)

and for v5 there is the option to simply switch to a new config directory such that you would still be able to run v4 in parallel to handle old projects.

Or the installer could offer some choices to the user regarding what to do with old configs, and/or automatically back up the old stuff. As it is, it gives no warning whatsoever that it’s doing an incomplete install; in fact, it gives a message saying that all old files will be deleted, which makes one think that the install will be complete.

I am not sure if the installer is allowed to touch user config files. (operating systems might not like it.)

and what if there are multiple users on the same pc? (should the config for all of them be replaced?) what if your personal profile is on a file server. (quite common if you are part of a larger company.) should the installer replace it for all users on the server? or just the ones that have logged into the pc once? should it just replace it for the current user? (is that a complete install?)

In all of the cases you mention, it is much better to explain to the user what is going on and give him or her choices rather than to simply ignore the issue. In my case, if the installer had simply put up a message saying

“Hey, I see you have some older-version stuff in your AppData\Roaming\kicad folder. Please be aware that lots of things may not work until you sort that out. If you want to do a clean install of 5.0, simply delete that directory before proceeding”

this thread would not have been necessary.

1 Like

How to do it?
Assume I have 4.0.7 working.
I am installing V5. I can install it in another directory to not colide with V4.
Then run V5.
I suppose then selecting any of KiCad applications would then do something related to AppData\Roaming\kicad as it is run for the first time so if I wont it to work in different directory I would have to do something before running any of them. But what?
Sorry for asking before trying myself but I am little afraid of damaging 4.0.7 by installing V5.
I plan to move all I have done to V5 (libraries and one design) but I’m not sure how to do it safely.
One I have checked (by trying to open my 4.0.7 poject on another PC with V5) is that I have to replace all my symbols like 10u/25 with others as V5 don’t likes ‘/’. I plan to do it under 4.0.7 then I will try to move to V5 but cyrrently I’m busy with not PCB work.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.