From c92a6ad45991f0e0404911ad27811b0b90a977fd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 11 Mar 2020 07:50:11 +0100 Subject: [PATCH] simpler and system independent --- python/damask/ktv.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/damask/ktv.py b/python/damask/ktv.py index 08e8f21a9..2eb1008a4 100644 --- a/python/damask/ktv.py +++ b/python/damask/ktv.py @@ -1,7 +1,6 @@ import os import numpy as np import vtk -import vtkmodules #from vtk.util import numpy_support class VTK: # capitals needed/preferred? @@ -58,11 +57,11 @@ class VTK: # capitals needed/preferred? def write(self,fname): #ToDo: Discuss how to handle consistently filename extensions - if (isinstance(self.geom,vtkmodules.vtkCommonDataModel.vtkRectilinearGrid)): + if (isinstance(self.geom,vtk.vtkRectilinearGrid)): writer = vtk.vtkXMLRectilinearGridWriter() - elif(isinstance(self.geom,vtkmodules.vtkCommonDataModel.vtkUnstructuredGrid)): + elif(isinstance(self.geom,vtk.vtkUnstructuredGrid)): writer = vtk.vtkUnstructuredGrid() - elif(isinstance(self.geom,vtkmodules.vtkCommonDataModel.vtkPolyData)): + elif(isinstance(self.geom,vtk.vtkPolyData)): writer = vtk.vtkXMLPolyDataWriter() writer.SetFileName('{}.{}'.format(os.path.splitext(fname)[0],