[Paraview] Is the VIEW-UP vector updated automatically?
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Mon Oct 6 10:46:10 EDT 2014
Kazuyoshi,
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?
Utkarsh
On Sun, Oct 5, 2014 at 10:26 PM, Kazuyoshi Furutaka
<furutaka.kazuyoshi at jaea.go.jp> wrote:
> Dear Utkarsh,
>
> Thanks for your mail.
>
> From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
> Subject: Re: [Paraview] Is the VIEW-UP vector updated automatically?
> Date: Thu, 2 Oct 2014 16:00:33 -0400
>
>> Yes, vtkCamera does often update its itself. Look at vtkCamera.cxx [1].
>>
>> [1] https://github.com/Kitware/VTK/blob/83be7b1b77a6bfbf296ccaa5155cec57d0c77a8c/Rendering/Core/vtkCamera.cxx
>
> Then, how does the following happen?
>
>
>> On Thu, Oct 2, 2014 at 2:18 AM, Kazuyoshi Furutaka
>> <furutaka.kazuyoshi at jaea.go.jp> wrote:
>>> From Python Shell, I got the following result:
>>>
>>> ...resetting...
>>> 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 *
>>>>>> box=Box()
>>>>>> Show(box)
>>> <paraview.servermanager.CompositeMultiSliceRepresentation object at 0xad91dcc>
>>>>>> cam=GetActiveCamera()
>>>>>> cam.SetPosition(0,3,3)
>>>>>> Render()
>>> <paraview.servermanager.SliceView object at 0xad91bac>
>>>>>> cam.GetViewUp()
>>> (0.0, 1.0, 0.0)
>>>>>>
>
> My understanding from the "Figure 3-11 Camera attributes"
> of `The Visualization Toolkit (4th ed.)' is that the view-up
> vector always points upward to the camera and should always
> be normal to the direction of projection (and therefore
> parallel to the SCREEN). Is this correct? Do I misunderstand
> something?
>
>
> Thanks,
> Kazuyoshi
> --
> Kazuyoshi Furutaka
> furutaka _dot_ kazuyoshi _at_ jaea _dot_ go _dot_ jp
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
More information about the ParaView
mailing list