On Sat, Apr 25, 2009 at 2:03 PM, pat marion <span dir="ltr">&lt;<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">&gt; The only remaining question is why is there no obj support?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; David<br>
<br>
</div>There is the vtkOBJReader.  It&#39;s not in paraview, but you can access<br>
it from the <a href="http://vtk.io" target="_blank">vtk.io</a> module bundled with paraview.<br>
<br>
import <a href="http://paraview.vtk.io" target="_blank">paraview.vtk.io</a> as vtkio<br>
<br>
# for pv 3.4, use instead: import vtkIOPython as vtkio<br>
#     or on posix, import libvtkIOPython as vtkio<br>
<br>
r = vtkio.vtkOBJReader()<br>
w = vtkio.vtkXMLPolyDataWriter()<br>
r.SetFileName(&quot;/home/pat/porsche.obj&quot;)<br>
w.SetFileName(&quot;/home/pat/porsche.vtp&quot;)<br>
w.SetInput(r.GetOutput())<br>
w.Write()<br>
<br>
<br>
The above code is purely in the vtk world, so you can&#39;t mix it with<br>
things from servermanager, and you can&#39;t do things like<br>
Reader(FileName=foo)<br>
<font color="#888888"><br>
Pat<br>
</font></blockquote></div><br>Thanks for the reading obj example, Pat. I looked at dir(vtkio) after importing it, and it looks like there is an ObjReader, but not an ObjWriter (makes sense, because I&#39;ve been wondering the same thing about the missing objwriter in c++ vtk). How do people generally write obj files from polydata&#39;s?<br>
<br clear="all">Thanks,<br><br>David<br>