Just looked at your to_vtk.py
and ideally you want to create a single vtkPolyData without using vtkAppendPolyData().
It should be straight forward to do something along those lines
polydata = vtkPolyData()
points = vtkPoints()
polys = vtkCellArray()
polydata.SetPoints(points)
polydata.SetPolys(polys)
for cell in cells:
size = len(cell)
polys.InsertNextCell(size)
for point in cell:
pid = points.InsertNextPoint(tulpe(point))
polys.InsertCellPoint(pid)