[Paraview] reading a list of ellipsoids into paraview quick and dirty

Cook, Rich cook47 at llnl.gov
Mon Mar 21 16:58:44 EDT 2016


Hi,
I have a user that supplies me with a text file of ellipsoids specified by location, rotation, and axis, from which I plan to create Spheres modified by the Transform operator to make ellipsoids.  I can write a function that basically does this:

ellipsoids = open(filename, 'r').read()
for ellipse in ellipsoids:
sphere1 = Sphere()
renderView1 = GetActiveViewOrCreate('RenderView')
sphere1Display = Show(sphere1, renderView1)
transform1 = Transform(Input=sphere1)
transform1.Transform = 'Transform'
transform1.Transform.Translate = [0.0, 2.0, 0.0]
transform1.Transform.Rotate = [0.0, 65.0, 76.0]
transform1.Transform.Scale = [1.0, 2.0, 1.0]
transform1Display = Show(transform1, renderView1)


My question is, how can I use this approach to provide her a macro in the GUI somehow to read her file and populate her scene with ellipsoids?  I hope this question is clear enough.

Thanks.

--
✐Richard Cook
✇ Lawrence Livermore National Laboratory
Bldg-453 Rm-4024, Mail Stop L-557
7000 East Avenue,  Livermore, CA, 94550, USA
☎ (office) (925) 423-9605
☎ (fax) (925) 423-6961
---
Information Management & Graphics Grp., Services & Development Div., Integrated Computing & Communications Dept.
(opinions expressed herein are mine and not those of LLNL)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160321/5d7492bd/attachment.html>


More information about the ParaView mailing list