<div dir="ltr"><div><div><div>It is not enough details, so it is not clear what you want to do and where.<br><br>I assume you want to do it in your code in VTK since AFAIK Paraview has its mailing list.<br>Then you have to remember that stl file is basically a list of triangles.<br>
</div>Questions are:<br> - do you need handle only triangles or  other 2d and/or 3d cells. <br> - are you satisfied if all your cells are presented by the the set of separated triangles?<br><br></div><div>If yes:<br></div>
If your unstructured grid contains only triangles you could convert it to polydata then use vtkSTLWriter to write stl file.<br></div>if you need to support all 2D cells, you might need to use <a class="" href="http://www.vtk.org/doc/release/4.2/html/classvtkTriangleFilter.html">vtkTriangleFilter<br>
</a><div><div><div><div>before vtkSTLWrite.<br></div><div>If you have 3d cells you might need iterate over them and create appropriate triangles which would describe cell surface.<br> </div><div><br></div><div>Regards,<br>
</div><div>   Alex<br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 4, 2013 at 10:59 AM, Dmitry Tyulin <span dir="ltr">&lt;<a href="mailto:dmitry.tyulin@gmail.com" target="_blank">dmitry.tyulin@gmail.com</a>&gt;</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><div><div>Hello there!<br></div>I have a volume in vtk unstructured grid. How can I convert it to CAD file format? .stl, for example. In paraview I can run Extract Surface module, but it gives to me only a surface. So, how can i convert the whole volume to .stl or .ply?<br>

<br></div>Regards,<br></div>Dmitry.<br></div>
<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>
<br></blockquote></div><br></div>