clearer naming

This commit is contained in:
Martin Diehl 2015-10-09 06:26:18 +00:00
parent 61090c955d
commit 8fe443d068
2 changed files with 6 additions and 6 deletions

View File

@ -88,10 +88,10 @@ for name in filenames:
# --- write data ----------------------------------------------------------------------------------- # --- write data -----------------------------------------------------------------------------------
if name: if name:
writer = vtk.vtkXMLRectilinearGridWriter() writer = vtk.vtkXMLRectilinearGridWriter()
(head,tail) = os.path.split(name) (directory,filename) = os.path.split(name)
writer.SetDataModeToBinary() writer.SetDataModeToBinary()
writer.SetCompressorTypeToZLib() writer.SetCompressorTypeToZLib()
writer.SetFileName(os.path.join(head,'mesh_'+os.path.splitext(tail)[0] writer.SetFileName(os.path.join(directory,os.path.splitext(filename)[0]
+'.'+writer.GetDefaultFileExtension())) +'.'+writer.GetDefaultFileExtension()))
else: else:
writer = vtk.vtkDataSetWriter() writer = vtk.vtkDataSetWriter()

View File

@ -107,10 +107,10 @@ for name in filenames:
#--- write data ----------------------------------------------------------------------------------- #--- write data -----------------------------------------------------------------------------------
if name: if name:
writer = vtk.vtkXMLRectilinearGridWriter() writer = vtk.vtkXMLRectilinearGridWriter()
(head,tail) = os.path.split(name) (directory,filename) = os.path.split(name)
writer.SetDataModeToBinary() writer.SetDataModeToBinary()
writer.SetCompressorTypeToZLib() writer.SetCompressorTypeToZLib()
writer.SetFileName(os.path.join(head,'mesh_'+os.path.splitext(tail)[0] writer.SetFileName(os.path.join(directory,os.path.splitext(filename)[0]
+'.'+writer.GetDefaultFileExtension())) +'.'+writer.GetDefaultFileExtension()))
else: else:
writer = vtk.vtkDataSetWriter() writer = vtk.vtkDataSetWriter()