Skip to content

Instantly share code, notes, and snippets.

View merlinyx's full-sized avatar

Yuxuan Mei merlinyx

View GitHub Profile
@thewtex
thewtex / vtk-unstructuredgrid-to-stl.py
Created January 5, 2014 01:28
Convert a .vtk UnstructuredGrid file to .stl file.
View vtk-unstructuredgrid-to-stl.py
#!/usr/bin/env python
"""Convert UnstructuredGrid in .vtk files to STL files."""
import sys
import vtk
if len(sys.argv) < 2 or sys.argv[1] == '-h' or sys.argv[1] == '--help':
print('Usage: vtk-unstructuredgrid-to-stl.py <input.vtk> <output.stl>')
sys.exit(1)