Marco,<br><br>Thanks very much for your reply. Actually, it isn't the camera I need information on, it's the rest of the object. I need to know how big the thing I'm looking at is, so I can know where exactly I should move the camera. And I can't figure out how to get bounding box on any of the objects that are available to me. Do you have any idea?<br>
<br><div class="gmail_quote">On Fri, Sep 2, 2011 at 4:05 AM, Marco Nawijn <span dir="ltr"><<a href="mailto:nawijn@gmail.com">nawijn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Rick,<br>
<br>
You can get a direct reference to the camera like this:<br>
<br>
>>> camera = GetActiveCamera()<br>
<br>
You have than full control with the different Get/Set methods. Like:<br>
<br>
>>> camera.GetFocalPoint()<br>
(-12.119979858398438, -3.0926971435546875, 36.27721977233887)<br>
<br>
Don't forget to call Render() if you set camera parameters.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
On Thu, Sep 1, 2011 at 11:46 PM, Rick Muller <<a href="mailto:rpmuller@gmail.com">rpmuller@gmail.com</a>> wrote:<br>
> I'm using the Python scripting facility in Paraview to do some batch<br>
> visualization of some semiconductor models I'm simulating. The Start/Stop<br>
> Trace feature is great, and I've already put together something quite<br>
> usable. However, I can't figure out how to reset the camera between<br>
> different simulations.<br>
><br>
> The code coming out of the Trace feature looked something like:<br>
> rv = pv.GetRenderView()<br>
> rv.CameraFocalPoint = [0.223, -0.0160,-0.334]<br>
> rv.CameraParallelScale = 1.684<br>
> rv.CenterOfRotation = [0.223, -0.0160,-0.334]<br>
> rv.CameraPosition = [0.223, -0.0160, 4.105]<br>
> rv.CameraClippingRange = [5.308, 8.033]<br>
> i.e. they already got the center of the object from some query to the<br>
> objects already in the database. What would I have to do to get this<br>
> information myself? I'm having a hard time finding info. I've tried reading<br>
> the doctext for the Outline and OutlineCorners features, and I've seen a<br>
> couple refs to a GetBounds command while googling around, but I can't find<br>
> anything that really helps.<br>
><br>
> My pipeline looks something like:<br>
> * Use the ExodusIIReader to create a reader object<br>
> * Use the aforementioned render view object to control the camera<br>
> * Create a slice object in the z-direction at a certain height<br>
> * Create a data representation and a colormap<br>
> * Render the object.<br>
> I can't tell which of the objects I would use for an Outline() or a<br>
> GetBounds() call. For example, I get the min/max values for the data in the<br>
> slice via<br>
> min,max = slice.PointData[0].GetRange()<br>
> but using s or s.PointData with Outline() or GetBounds() doesn't get me<br>
> anywhere. Can anyone nudge me in the right direction?<br>
><br>
> Thanks,<br>
> Rick<br>
><br>
> --<br>
> Rick Muller<br>
> <a href="mailto:rpmuller@gmail.com">rpmuller@gmail.com</a><br>
> <a href="tel:505-750-7557" value="+15057507557">505-750-7557</a><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <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:<br>
> <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>
><br>
><br>
</blockquote></div><br><br clear="all"><br>-- <br>Rick Muller<br><a href="mailto:rpmuller@gmail.com">rpmuller@gmail.com</a><br>505-750-7557<br><br>