On Sat, Apr 25, 2009 at 2:03 PM, pat marion <span dir="ltr"><<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>></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">> The only remaining question is why is there no obj support?<br>
><br>
> Thanks,<br>
><br>
> David<br>
<br>
</div>There is the vtkOBJReader. It'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("/home/pat/porsche.obj")<br>
w.SetFileName("/home/pat/porsche.vtp")<br>
w.SetInput(r.GetOutput())<br>
w.Write()<br>
<br>
<br>
The above code is purely in the vtk world, so you can't mix it with<br>
things from servermanager, and you can'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've been wondering the same thing about the missing objwriter in c++ vtk). How do people generally write obj files from polydata's?<br>
<br clear="all">Thanks,<br><br>David<br>