[Paraview] Is the VIEW-UP vector updated automatically?

Kazuyoshi Furutaka furutaka.kazuyoshi at jaea.go.jp
Mon Oct 6 19:57:30 EDT 2014


Dear Utkarsh,

Thanks for the response.	

From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
Subject: Re: [Paraview] Is the VIEW-UP vector updated automatically?
Date: Mon, 6 Oct 2014 10:46:10 -0400

> I just noticed that you're getting a "SliceView". I am not entirely
> sure why. Is there something different with your configuration? Here's
> what I get:
> 
>>>> from paraview.simple import *
> paraview version 4.2.0-4-g03d4c39
>>>> Box()
> <paraview.servermanager.Box object at 0x7f7d6f165e10>
>>>> Show()
> <paraview.servermanager.GeometryRepresentation object at 0x7f7d6f133f50>
>>>> Render()
> <paraview.servermanager.RenderView object at 0x7f7d6f165e10>
> 
> With SliceView, the camera is managed by the SliceVIew itself. To be
> able to freely play with the camera, you want the RenderView, which is
> indeed the default.
> Did you manually create the SliceView before running the script?

Yes, for a reason, I set SliceView as my default view.

Therefore, though I'm not sure, as I remember, what I did were...
1. "Edit -> Reset Session",
2. Close "SliceView1" view,
3. Create View "Render View",
4. Open "Tools -> Python Shell", then
5. Create a Box(), then Show() and Render(),
   change the camera position, and see what the view-up is...

This time I did the same procedure again (to see if the above 
really happens in the Render view) and get almost the same result.
1. Run ParaView 4.2.0 32-bit on linux (fedora-20),
2. Close "SliceView1" view,
3. Create View "Render View",
4. Open "Tools -> Python Shell",
5. type and get the following:
Python 2.7.5 (default, Sep 25 2014, 13:58:10) 
[GCC 4.8.3 20140911 (Red Hat 4.8.3-7)] on linux2
>>> from paraview.simple import *
paraview version 4.2.0
>>> Box()
<paraview.servermanager.Box object at 0xbaf586c>
>>> Show()
<paraview.servermanager.GeometryRepresentation object at 0xbafe2cc>
>>> Render()
<paraview.servermanager.RenderView object at 0xba8e48c>
>>> cam=GetActiveCamera()
>>> cam.GetViewUp()
(0.0, 1.0, 0.0)
>>> cam.SetPosition(0,3,3)
>>> Render()
<paraview.servermanager.RenderView object at 0xbaf586c>
>>> cam.GetViewUp()
(0.0, 1.0, 0.0)
>>> 

So, it seems the view-up is not updated...


I just want to write a Python macro to change/rotate the camera
position using Azimuth() and Elevation().

In addition to the following:

> I'm observing a curious behavior of paraview.simple.Azimuth();
> camera is NOT moving left/right.

I sometimes get the following message

 Warning: In /home/furutaka/work/ParaView/ParaView.git/VTK/Rendering/Core/vtkRenderer.cxx, line 1030
vtkOpenGLRenderer (0xa702510): Resetting view-up since view plane normal is parallel

and am wondering how can the view-up be parallel to the view-plane
normal...

My understanding is that the view-up is (always) perpendicular to
the direction of projection (pointing upward of the computer display)
and therefore parallel to the view-plane, so the view-up should always
be normal to view-plane normal.
Isn't the view-plane normal parallel to the direction of projection?
Isn't the view-plane parallel to the front/back clipping planes?

Kazuyoshi
--
Kazuyoshi Furutaka
furutaka _dot_ kazuyoshi _at_ jaea _dot_ go _dot_ jp


More information about the ParaView mailing list