[Paraview] pvpython:

Weirs, V Gregory vgweirs at sandia.gov
Wed Apr 23 14:11:43 EDT 2008


I have a python script to read data from an exodus file, apply CellToPoint, then apply a Clip by scalar. When I run it in the python shell from the GUI, the bubble for "Clip Type" doesn't get populated, and the "Scalars" bubble only lists "DENSITY" as an option. Do I need to register proxies for i_f.Scalar() and the SelectInputScalars to populate the bubbles? What am I missing?

from paraview import servermanager as SM
PM = SM.ProxyManager()
i_f = SM.implicit_functions

(Loading data, cell2point omitted.)

clip = SM.filters.Clip()
clip.Input = cell2point
clip.ClipFunction = i_f.Scalar()
clip.Value = 4.0
clip.SelectInputScalars = ("0", "0", "0", "0", "DENSITY")
if GUIClient:
  PM.RegisterProxy("sources","ClipScalar",clip)

I have a similar problem when I Clip by plane; the plane parameters (normal, origin of plane) don't appear in the Object Inspector, I still see the Scalars bubble and the Value text box.

clip = SM.filters.Clip()
clip.Input = cell2point
clip_plane = i_f.Plane()
clip_plane.Normal = [1.0,1.0,0]
clip_plane.Origin = [-0.1,0,0]
clip.ClipFunction = clip_plane
if GUIClient:
  PM.RegisterProxy("sources","ClipPlane",clip)

Do I have to register clip_plane?

Thanks,
Greg


(Running from today's cvs head on Mac.)


--
V. Gregory Weirs
Sandia National Laboratories                vgweirs at sandia.gov
P.O.Box 5800, MS 0378                        phone: 505 845 2032
Albuquerque, NM 87185-0378              fax: 505 284 0154
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20080423/b4ddb404/attachment-0001.htm>


More information about the ParaView mailing list