Page 2 of 2

Re: Saved Viewpoint does not always work

Posted: Thu Aug 06, 2015 4:49 pm
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

Re: Saved Viewpoint does not always work

Posted: Thu Aug 06, 2015 4:51 pm
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

Re: Saved Viewpoint does not always work

Posted: Thu Aug 06, 2015 4:54 pm
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

Re: Saved Viewpoint does not always work

Posted: Thu Aug 06, 2015 5:33 pm
by hproe
Rick -

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

HP

Re: Saved Viewpoint does not always work

Posted: Wed Aug 26, 2015 5:03 pm
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 335 times

viewpoints.xml
(12.35 KiB) Downloaded 365 times

Re: Saved Viewpoint does not always work

Posted: Wed Aug 26, 2015 8:11 pm
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

Re: Saved Viewpoint does not always work

Posted: Wed Sep 02, 2015 5:14 pm
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

Re: Saved Viewpoint does not always work

Posted: Thu Sep 03, 2015 1:32 pm
by joleenf
Thanks. I will add the line.

Joleen