[vtkusers] Exporting to STL

Stewart Dickson dickson at cs.unca.edu
Mon Nov 26 15:25:44 EST 2007


The STL file format requires that the cone's cap be composed strictly of 
a triangular mesh -- not an n-gon approximating a circle.   
http://www.ennex.com/~fabbers/StL.asp     You need an algorithm to 
generate a triangular mesh which fills-in the circular base of the 
cone.   vtkTriangleFilte 
<http://www.vtk.org/doc/nightly/html/classvtkTriangleFilter.html>r()?

Here's a pipeline I use to successfully generate STL files from the 
vtkContourFilter():
http://www.isl.uiuc.edu/~sdickson/Julia/Zoetrope3.html
vtkImageReader 
<http://www.vtk.org/doc/nightly/html/classvtkImageReader.html> [raw 
UnsignedChar; DataSpacing 0.00585938 -- Data size: 52,428,800 BYTES] -> 
vtkContourFilter 
<http://www.vtk.org/doc/nightly/html/classvtkContourFilter.html> [Value 
0 16; ComputeScalarsOn] -> vtkCleanPolyData 
<http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html> -> 
vtkTriangleFilter 
<http://www.vtk.org/doc/nightly/html/classvtkTriangleFilter.html> -> 
vtkSTLWriter 
<http://www.vtk.org/doc/nightly/html/classvtkSTLWriter.html> [FileType 
2/Binary]

-Stewart   http://us.imdb.com/Name?Stewart+Dickson
http://emsh.calarts.edu/~mathart/R_Proto_ref.html
http://www.isl.uiuc.edu/~sdickson
http://emsh.calarts.edu/~mathart/MathArt_siteMap.html

Lior A wrote:
> Hello!
>
> I used the "cone" example that comes with the VTK source code. 
> I added code that exports the cone to STL format.
> But no matter if my cone had capping or not, In the STL I got it without capping (I got a surface instead of a solid)
>
> Has anyone had this problem before?
> How can I solve it?
>
> Thanks, 
> Lior.
>
>
>       ____________________________________________________________________________________
> Get easy, one-click access to your favorites. 
> Make Yahoo! your homepage.
> http://www.yahoo.com/r/hs 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071126/f8123728/attachment.htm>


More information about the vtkusers mailing list