[vtkusers] STl file is empty

David Doria daviddoria+vtk at gmail.com
Sat Jan 16 11:42:52 EST 2010


On Sat, Jan 16, 2010 at 10:13 AM, InfoSeekerr
<ali.mahmoud.habib at gmail.com> wrote:
>
> Dear all,
> I write the following code to create mesh then write it to stl file, the
> algorithm is:
>
> vtkDICOMImageReader then vtkContourFilter then vtkSmoothPolyDataFilter then
> vtkPolyDataNormals then vtkStripper then vtkPolyDataConnectivityFilter (to
> remove undisered parts ) then  vtkSTLWriter
>
> when open the stl file using notepad I just found those lines :
> solid ascii
> endsolid
>
> which can't be read by other stl readers programs like maya
>
> any advice please

It sounds like the problem doesn't have anything to do with your
pipeline, just the last step (the writer).

This example seems to create a valid stl file:
http://www.cmake.org/Wiki/VTK/Examples/IO/WriteSTL

By "valid", I mean it opens in Paraview. Since paraview uses VTK IO,
I'm not sure this is a good test for testing if the file is in a
generally acceptable format. Blender doesn't seem to have an STL
importer - does anyone know another open source package that can read
STL? I don't have maya on this machine to try it.

Thanks,

David



More information about the vtkusers mailing list