<div dir="ltr"><span style="font-family:verdana,sans-serif">vtkDataSetSurfaceFilter is indeed the way to go. You should be able to set an unstructrued grid as input. Not sure why it didn't work for you? Doesn't the following code work:</span><br><div><span style="font-family:verdana,sans-serif"><br></span></div><div><font face="verdana, sans-serif">vtkUnstructuredGrid* ug = ...</font></div><div><span style="font-family:verdana,sans-serif">vtkDataSetSurfaceFilter* dsf = ...</span><span style="font-family:verdana,sans-serif"><br></span></div><div><span style="font-family:verdana,sans-serif">dsf->SetInputDataObject(ug);</span></div><div><span style="font-family:verdana,sans-serif"><br></span></div><div><span style="font-family:verdana,sans-serif">Utkarsh</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 13, 2016 at 5:20 AM, Reza Faieghi <span dir="ltr"><<a href="mailto:mfaieghi@westerneng.ca" target="_blank">mfaieghi@westerneng.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hello,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">I am wondering is there a way to write an unstructured grid into an STL file?</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">I am not sure if this is correct but I realized that for writing into an STL file, I have to create a triangle filter from my geometry. And, to create the triangle filter, I need to extract surface of my unstructured grid. I tried to use vtkDataSetSurfaceFilter for this purpose, but I was not able to set an input to an instance of this class from a vtkUnstructuredGrid.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">I am not sure if my approach is correct. I would be really grateful if you have any idea how to solve this.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Many Thanks,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Reza </div>
</div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>