Hello,<br><br><div id="result_box" dir="ltr">Have examples in vtk page [1].<br></div><br>[1] - <a href="http://www.vtk.org/doc/nightly/html/c2_vtk_t_13.html">http://www.vtk.org/doc/nightly/html/c2_vtk_t_13.html</a><br><br>
<br>import vtk<br>
import time<br>
<br>
<br>
cone = vtk.vtkConeSource()<br>
cone.SetHeight( 3.0 )<br>
cone.SetRadius( 1.0 )<br>
cone.SetResolution( 10 )<br><b><br>#Write in file <br>w = vtk.vtkPolyDataWriter()<br>w.SetInput(cone.GetOutput())<br>w.SetFileName("junk.vtk")<br>w.Write()</b><br>
<br><br><br><div class="gmail_quote">2009/5/12 Olumide <span dir="ltr"><<a href="mailto:50295@web.de">50295@web.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I would like to create several objects/primitives in the vtkpython, and then write them out as VTK files, without visualizing them. How can I accomplish this? I'm not problem I'm having is how to use vtkPolyDataWriter in python.<br>
<br>
Thanks,<br>
<br>
- Olumide<br>
<br>
<br>
####################### Example #######################<br>
<br>
<br>
#!/usr/bin/env python<br>
<br>
import vtk<br>
import time<br>
<br>
<br>
cone = vtk.vtkConeSource()<br>
cone.SetHeight( 3.0 )<br>
cone.SetRadius( 1.0 )<br>
cone.SetResolution( 10 )</blockquote><div><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
# wite file out using vtkPolyDataWriter<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>