<div dir="ltr">Hello everyone!<div><br></div><div> 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.</div><div><br></div><div> The relevant code is as follows:</div><div><br></div><div><p style="margin:0px">stlWriter = vtk.vtkSTLWriter()</p>
<p style="margin:0px">stlWriter.SetFileName("test.stl")</p>
<p style="margin:0px">stlWriter.SetInput(trianglePolyData) //also used stlWriter.SetInputPort(trianglePolyData) and it has not worked</p>
<p style="margin:0px">stlWriter.Write()</p><p style="margin:0px"><br></p><p style="margin:0px"> Does anyone know how I could save the STL file?</p><p style="margin:0px"><br></p><p style="margin:0px">Ricardo Santos</p></div></div>