[Paraview] Python paraview.simple: Zoom To Data?
Pat Marion
pat.marion at kitware.com
Thu Mar 15 10:40:08 EDT 2012
ResetCamera() will position the camera so that all visible objects fit in
the view. You can control the view direction by setting the
view.CameraPosition and view.CameraFocalPoint properties. You don't have
to set the properties to any useful values, I usually set position to 0,0,0
and CameraFocalPoint to the view direction, say [1,0,0] to look along the X
axis, then ResetCamera() will figure out where to put the camera while
keeping the view direction intact.
Pat
On Thu, Mar 15, 2012 at 6:52 AM, Nico Schlömer <nico.schloemer at gmail.com>wrote:
> Hi,
>
> the ParaView GUI has this nifty little button action "Zoom To Data"
> which displays the current object such that it somehow fits its
> window.
>
> Is there a similar thing for the Python paraview.simple module? I'm
> trying to get a hang on it with certain view options such as
>
> view = pv.GetRenderView()
> view.CameraFocalPoint = [0, 0, 0]
> view.CameraViewAngle = 90
> view.CameraPosition = [0, 0, 10]
> view.ViewSize = [600, 600]
>
> but what I would really like to have is to set the camera at a
> distance such that the object(s) just fit into the window they're
> displayed in.
>
> Any hints?
>
> Cheers,
> Nico
> _______________________________________________
> 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://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120315/db74a670/attachment.htm>
More information about the ParaView
mailing list