[Paraview] how to create a vtk.vtkParametricEllipsoid and write it to a VTK file?

Cook, Rich cook47 at llnl.gov
Tue Mar 29 13:35:26 EDT 2016


I'm still trying to solve my ellipsoid puzzle.
From looking around online, I've found a promising avenue.  Create a vtk.vtkParametricEllipsoid, rotate it, and then write to VTK for my user.
My question is, can someone help me finish this script?  I am hoping for an experienced user it's trivial.  My objective is to hand the user a python script to convert her data to VTK.

from ? import ?  # WHAT GOES HERE?  Do I need to run this from paraview?
for ellipsoid in ellipsoids:
ellipsoid = vtk.vtkParametricEllipsoid()
ellipsoid.SetXRadius(50)
ellipsoid.SetYRadius(10)
ellipsoid.SetZRadius(10)
transform = vtk.vtkTransform()
transform.RotateWXYZ(45,0,1,0)
transform.Translate(100,200,50)
# The magic:   connect the transform to the ellipsoid and add it to the scene.
# HOW???

# write all objects in the scene to a VTK file  Again, HOW?

--
✐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/20160329/d8dd522e/attachment.html>


More information about the ParaView mailing list