<div>Hey gus,</div>
<div> </div>
<div>I am new to VTK, and trying to conver a OBJ file to a STL file. I tried the following code section, but it didn&#39;t work. It did created a STL file, but with nothing inside, only 1KB. Any help and direction would be appreciated. </div>

<div> </div>
<div>Thanks.</div>
<div>   </div>
<div>   vtkSmartPointer&lt;vtkOBJReader&gt; readerOBJ = vtkSmartPointer&lt;vtkOBJReader&gt;::New();<br>   readerOBJ-&gt;SetFileName(filename.c_str());<br>   readerOBJ-&gt;Update();</div>
<div> </div>
<div>  vtkSmartPointer&lt;vtkSTLWriter&gt; stlWriter = vtkSmartPointer&lt;vtkSTLWriter&gt;::New();<br>  stlWriter-&gt;SetFileName(&quot;Bobcat.stl&quot;);<br>  stlWriter-&gt;SetInputConnection(readerOBJ-&gt;GetOutputPort());<br>
  stlWriter-&gt;Write();<br><br>-- <br></div>
<div>Chao Wang<br>Graduate Research Assistant<br>The Durham School of Architectural Engineering and Construction<br>University of Nebraska - Lincoln<br>The Peter Kiewit Institute <br>1110 S. 67th Street 118A</div>
<div>Omaha, NE 68182-0571<font face="arial, sans-serif"><br></font></div><br>