Marco, 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?
On Fri, Sep 2, 2011 at 4:05 AM, Marco Nawijn <[email protected]> wrote: > Hello Rick, > > You can get a direct reference to the camera like this: > > >>> camera = GetActiveCamera() > > You have than full control with the different Get/Set methods. Like: > > >>> camera.GetFocalPoint() > (-12.119979858398438, -3.0926971435546875, 36.27721977233887) > > Don't forget to call Render() if you set camera parameters. > > > > > On Thu, Sep 1, 2011 at 11:46 PM, Rick Muller <[email protected]> wrote: > > I'm using the Python scripting facility in Paraview to do some batch > > visualization of some semiconductor models I'm simulating. The Start/Stop > > Trace feature is great, and I've already put together something quite > > usable. However, I can't figure out how to reset the camera between > > different simulations. > > > > The code coming out of the Trace feature looked something like: > > rv = pv.GetRenderView() > > rv.CameraFocalPoint = [0.223, -0.0160,-0.334] > > rv.CameraParallelScale = 1.684 > > rv.CenterOfRotation = [0.223, -0.0160,-0.334] > > rv.CameraPosition = [0.223, -0.0160, 4.105] > > rv.CameraClippingRange = [5.308, 8.033] > > i.e. they already got the center of the object from some query to the > > objects already in the database. What would I have to do to get this > > information myself? I'm having a hard time finding info. I've tried > reading > > the doctext for the Outline and OutlineCorners features, and I've seen a > > couple refs to a GetBounds command while googling around, but I can't > find > > anything that really helps. > > > > My pipeline looks something like: > > * Use the ExodusIIReader to create a reader object > > * Use the aforementioned render view object to control the camera > > * Create a slice object in the z-direction at a certain height > > * Create a data representation and a colormap > > * Render the object. > > I can't tell which of the objects I would use for an Outline() or a > > GetBounds() call. For example, I get the min/max values for the data in > the > > slice via > > min,max = slice.PointData[0].GetRange() > > but using s or s.PointData with Outline() or GetBounds() doesn't get me > > anywhere. Can anyone nudge me in the right direction? > > > > Thanks, > > Rick > > > > -- > > Rick Muller > > [email protected] > > 505-750-7557 > > > > > > _______________________________________________ > > 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 > > > > > -- Rick Muller [email protected] 505-750-7557
_______________________________________________ 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
