[vtkusers] stl mesh problems

stefano scarparo alves alves.scarparo at gmail.com
Sat Sep 16 07:07:46 EDT 2006


Hi, I'm writing a program to convert a CT DICOM file into an STL file
suitable for stereolitography but allways have problems with generated mesh;
probably first and last slice remain open and not closed as it should be for
stereolitography. Has anybody an idea? Thanks in advance.

Here is a peace of tcl code as example:

package require vtk
package require vtkinteraction
package require vtktesting

vtkPolyDataReader pdreader
    pdreader SetFileName "inputfile.vtk"

vtkTriangleFilter tf
    tf SetInput [pdreader GetOutput]

vtkPolyDataNormals normals
    normals SetInput [tf GetOutput]

vtkSTLWriter stlBinary
stlBinary SetInputConnection [tf GetOutputPort]
stlBinary SetFileName "outfile.stl"
stlBinary SetFileType 2
stlBinary Write
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060916/111f5d97/attachment.htm>


More information about the vtkusers mailing list