VTK/Examples/Python/STLReader

From KitwarePublic

Jump to: navigation, search

This code snippet reads an STL file and creates a PolyData output

STLReader.py

import vtk
 
filename = "myfile.stl"
 
reader = vtk.vtkSTLReader()
reader.SetFileName(filename)
 
polyDataOutput = reader.GetOutput()
Personal tools