[vtkusers] STL and vtkPolyData in Python

Ricardo Santos ricardo.c.r.santos at gmail.com
Tue Dec 16 18:08:22 EST 2014


Hello everyone!

      I am having a little bit of a hard time trying to save a vtkPolyData
to a stl file using Python. My main problem is that vtkSTLWriter needs a
input that I can't find in vtkPolyData.

      The relevant code is as follows:

stlWriter = vtk.vtkSTLWriter()

stlWriter.SetFileName("test.stl")

stlWriter.SetInput(trianglePolyData) //also used
stlWriter.SetInputPort(trianglePolyData) and it has not worked

stlWriter.Write()


     Does anyone know how I could save the STL file?


Ricardo Santos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141216/c3f02551/attachment.html>


More information about the vtkusers mailing list