Saved Viewpoint does not always work

Errors and unexpected results
User avatar
Rick
Posts: 404
Joined: Fri Jan 16, 2009 8:20 pm

Re: Saved Viewpoint does not always work

Post by Rick »

Joleen,

The projection matrix for CO_Tilted in viewpoints.xml. Starting with a fresh viewpoints.xml, I created a list similar to yours but was not able to reproduce the anomaly. I wrote up Inquiry 2129 to document the anomaly.

Rick
Last edited by Rick on Thu Aug 06, 2015 4:52 pm, edited 1 time in total.
User avatar
Rick
Posts: 404
Joined: Fri Jan 16, 2009 8:20 pm

Re: Saved Viewpoint does not always work

Post by Rick »

HP,

In the second thread of this post, you mention that the list of viewpoints can get too long making it impossible to access those at the end of the list. I have created Inquiry 2130 to address the problem.

Rick
User avatar
Rick
Posts: 404
Joined: Fri Jan 16, 2009 8:20 pm

Re: Saved Viewpoint does not always work

Post by Rick »

HP,

You mention that you cannot save a Global Display. Do you mean global display viewpoint? I was able to do this, but you can only restore a globe viewpoint to a globe display.

Rick
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

Re: Saved Viewpoint does not always work

Post by hproe »

Rick -

You are right, of course. Apply apples to apples ...

HP
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Saved Viewpoint does not always work

Post by joleenf »

Hi,

I have a slimmer version of my viewpoint.xml file. When using the script attached, I see consistent results for the EASTSL viewpoint, but not the WESTSL. In this case, I am not sure if it something in saving the viewpoint, or something wrong in the script.

Joleen

diffAndSWdisp.py
(2.87 KiB) Downloaded 309 times

viewpoints.xml
(12.35 KiB) Downloaded 332 times
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: Saved Viewpoint does not always work

Post by bobc »

Hi Joleen -

I just wanted to let you know that I'm replicating your problem if I have auto-set projection turned off in the User Preferences. If I have it turned on, then the two displays match up fine with the west viewpoint. We will have to investigate this more on our end to see why this should make a difference.

Thanks -
Bob Carp
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: Saved Viewpoint does not always work

Post by bobc »

Hi Joleen -

This appears to be a bug in a way that a viewpoint is passed to other panels that share views. In the case of your WESTSL example, this was created using the California projection (see the wireframe box around California when you set the viewpoint). This viewpoint isn't the same as the California projection, as it is further zoomed out and the display is translated to show more of the Pacific. If you have two panels created in the default World projection with 'Share Views' enabled and set a the viewpoint to WESTSL, the panel where you set the viewpoint changes to the California projection and then applies the zoom/translation associated with the viewpoint. The other panel doesn't change the viewpoint (sticking with the default World projection) and sets the zoom/translation from there, so you end up with a further zoomed out display and things don't match up. You can see that the other panel's projection isn't changed since the wireframe box is still in it's default location.

This is only a problem if Auto-Set Projection is disabled in the User Preferences. This is because in your function the viewpoint is being set before the data is being displayed. With auto-set projection disabled, the display doesn't change once the data is displayed, so you end up with the different views. When auto-set projection is enabled, the viewpoints are set, but then both of the display panels change to the projection of the data once it is displayed.

On my end, this isn't an issue with the EASTSL projection because this was created using the default World projection, which is what I'm using. Since my display panels are both using the projection used in the viewpoint, there's no problem with applying just the translation/zoom.

You can replicate this problem though scripting and clicking through the GUI. I wrote this up as Inquiry 2144. For now, the easiest way to get this working would be to explicitly set the viewpoint of both panels by adding this line to your function:

Code: Select all

panel2.setViewpoint(viewpoint)

Please let me know if you have any questions.

Thanks -
Bob Carp
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Saved Viewpoint does not always work

Post by joleenf »

Thanks. I will add the line.

Joleen
Post Reply