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.<br>
<br>Pat<br><br><br><div class="gmail_quote">On Thu, Mar 15, 2012 at 6:52 AM, Nico Schlömer <span dir="ltr"><<a href="mailto:nico.schloemer@gmail.com">nico.schloemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
the ParaView GUI has this nifty little button action "Zoom To Data"<br>
which displays the current object such that it somehow fits its<br>
window.<br>
<br>
Is there a similar thing for the Python paraview.simple module? I'm<br>
trying to get a hang on it with certain view options such as<br>
<br>
view = pv.GetRenderView()<br>
view.CameraFocalPoint = [0, 0, 0]<br>
view.CameraViewAngle = 90<br>
view.CameraPosition = [0, 0, 10]<br>
view.ViewSize = [600, 600]<br>
<br>
but what I would really like to have is to set the camera at a<br>
distance such that the object(s) just fit into the window they're<br>
displayed in.<br>
<br>
Any hints?<br>
<br>
Cheers,<br>
Nico<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</blockquote></div><br>