3D model paths not updated paths has changed

Bug #1469373 reported by Nick Østergaard
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

When having a board already populated with footprints whith 3D models assigned and the KISYS3DMOD path is wrong the models are not displayed. This is expected.

Then if one goes to the configure paths dialog and fix the KISYS3DMOD path the 3D models are still not rendered in the 3D view. It was expected that the already placed models would have the models now that the paths are good.

If you place another footprint of the same, that single one will render. Or if you just edit the path to the already placed one it will also render.

This was tested on 5814 in windows.

Tags: 3d-viewer
Revision history for this message
Richard A Johnson (xrixcomx) wrote :

0.201507042246+5884~23~ubuntu14.04.1 32bit -- Been fighting this for some days. This and earlier version?

If I started KiCAD from terminal, PCBNEW would not show 3dView .wrl 3d shapes from /usr/share/kicad/modules/packages3d which is where they are located.

Changing KISYS3DMOD file path in kicad would not redirect the path although it shows the change in kicad.

I had set up another path with some other .wrl files. Those 3d shapes showed up in both the PCB 3dview and in the footprint editor.

Next, I noticed that the ENVIRONMENT for KISYS3DMOD was set to /usr/local/share/modules/packages3d in the terminal. I am not able to figure out how to change it.

If I start kicad using the left side kicad launcher or type kicad from the terminal, the program appears to use the path to the nonexistant folder. No 3d shapes show on the drawings even though the program says it is set up to look for the correct path.

I came up with a workaround for now. I created a desktop icon for kicad that runs the following file. I select executing it as RUN.

#!/bin/bash
# Env var for kicad github plugin
export KIGITHUB="https://github.com/KiCad"
export KISYS3DMOD="/usr/share/kicad/modules/packages3d"
export KISYSMOD="/home/richard/KiCAD/yourfolder.pretty"
export RIXCOMMOD="/home/yourusername/KiCAD/KICAD_Libs-Mods-wrlFiles"
kicad
exit

Maybe not so "pretty", but it will work until bug gets fixed.

Hope this helps. Overall, I think there are many great things about kicad. I found the new libraries difficult to understand, but hopefully this will get resolved. The 3dviews are great when working.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1469373] Re: 3D model paths not updated paths has changed

On 7/10/2015 3:14 PM, Richard A Johnson wrote:
> 0.201507042246+5884~23~ubuntu14.04.1 32bit -- Been fighting this for
> some days. This and earlier version?
>
> If I started KiCAD from terminal, PCBNEW would not show 3dView .wrl 3d
> shapes from /usr/share/kicad/modules/packages3d which is where they are
> located.
>
> Changing KISYS3DMOD file path in kicad would not redirect the path
> although it shows the change in kicad.

This is not a bug. The predefined system or user environment variables
take precedence over the environment variable defined by the kicad
process. This is by design for development purposes. You can
temporarily define a environment variable when running kicad from the
command line without having to change your kicad environment variables.
 When you launch kicad normally, your defined env variables will be as
expected. Please do not ask to change this behavior. It is a big time
saver for both code and library developers.

>
> I had set up another path with some other .wrl files. Those 3d shapes
> showed up in both the PCB 3dview and in the footprint editor.
>
> Next, I noticed that the ENVIRONMENT for KISYS3DMOD was set to
> /usr/local/share/modules/packages3d in the terminal. I am not able to
> figure out how to change it.
>
> If I start kicad using the left side kicad launcher or type kicad from
> the terminal, the program appears to use the path to the nonexistant
> folder. No 3d shapes show on the drawings even though the program says
> it is set up to look for the correct path.
>
> I came up with a workaround for now. I created a desktop icon for kicad
> that runs the following file. I select executing it as RUN.
>
> #!/bin/bash
> # Env var for kicad github plugin
> export KIGITHUB="https://github.com/KiCad"
> export KISYS3DMOD="/usr/share/kicad/modules/packages3d"
> export KISYSMOD="/home/richard/KiCAD/yourfolder.pretty"
> export RIXCOMMOD="/home/yourusername/KiCAD/KICAD_Libs-Mods-wrlFiles"
> kicad
> exit
>
> Maybe not so "pretty", but it will work until bug gets fixed.
>
> Hope this helps. Overall, I think there are many great things about
> kicad. I found the new libraries difficult to understand, but hopefully
> this will get resolved. The 3dviews are great when working.
>

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Wayne, this is not what the original bug description is about. This bug is about the environment varibles already in use from the configure paths dialog is not refreshed where used when updated in the dialog.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Perhaps you have to close kicad and rerun it.
I am not sure the new env vars values are active without closing and rerun kicad.

Revision history for this message
Nick Østergaard (nickoe) wrote :

Closing and rerunning kicad will of course fix it, but this is a workaround. It should not have this partial behaivour of only be in effect for new footprints placed. It should _either_ don't update the paths to require you to restart or just update all instances. I vote for the latter, because the first one does not make sense to me.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 7/12/2015 6:39 AM, Nick Østergaard wrote:
> @Wayne, this is not what the original bug description is about. This bug
> is about the environment varibles already in use from the configure
> paths dialog is not refreshed where used when updated in the dialog.
>
@Nick, this is not the way I'm reading it. Richard A. Johnson says "I
noticed that the ENVIRONMENT for KISYS3DMOD was set to
/usr/local/share/modules/packages3d in the terminal." This means that
KISYS3DMOD is defined either at the system level or the user level. The
user can change the KISYS3DMOD environment variable in the KiCad
environment variable dialog all they want and it will not change because
it's already defined when kicad starts. The user should have seen the
warning dialog about this when attempting to change KISYSMOD using the
env variable dialog. If not, there is a bug in the code that checks for
already defined env variables at start up. The user must remove the
system or user level definition of KISYS3DMOD which apparently in this
case incorrect. Do you have KISYS3DMOD defined outside of kicad on your
system or did you by change run Pcbnew from the command line without
exiting kicad? If it was the latter, the kicad env variable dialog
values probably do not get written to kicad_common until after kicad is
closed. This should work fine when launching Pcbnew from kicad because
they are running in the same process and the environment variables are
updated unless they were defined externally.

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Wayne, disregard Richard's discusison, it is not related to this bug report. His issue should have another ticket. Please focus on the topic.

But as a matter of fact I wonder why the paths lists what is read from the config when the env vars is really defined. (but off topic!)

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 7/12/2015 5:21 PM, Nick Østergaard wrote:
> @Wayne, disregard Richard's discusison, it is not related to this bug
> report. His issue should have another ticket. Please focus on the topic.
>
> But as a matter of fact I wonder why the paths lists what is read from
> the config when the env vars is really defined. (but off topic!)
>
OK. I got it. Richard's comments are what threw me off. I did test
this and strangely I didn't get the same behavior (I using windows 8 as
I write this) that you got. When I changed the KISYS3DMOD env var in
kicad, I had to close and relaunch Pcbnew to get the new env var to work
correctly. This doesn't make sense to me because Pcbnew is running in
the same process as kicad unless it has something to do with the shared
object instances (which is really what a kiface is). I'll take a look
at it and see if I can figure out what's going on.

Revision history for this message
SJeanneret (jeanneret-s) wrote :

Hello,
I'm facing a small problem that is probably related to this.
I have Kicad 4.0.1-stable under Windows 7.
I use the KSYS3DMOD variable to point on my local 3D library.
If i start KiCad, go under PCB, then go to 3D display my design will not display the 3D components.
To have the components displayed, i have to go first on KiCad, Preferences, Configure path, and simply click OK.
Then when i go back to PCB, 3D display, its all fine.
Something seems missing to take in account the global path. (or something i did not understood)
If it can help...

Revision history for this message
Jeff Young (jeyjey) wrote :

This appears to have been fixed. (At least it works for me, whether edited through the 3D model renderer's Edit Environment Variables link or via the main menu bar.)

Changed in kicad:
status: New → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.