Problem with the cylindrical coordinates on Paraview
Hello everyone,
I am a trainee in hydraulics and new to OpenFOAM and Paraview. In my projects I have to visualize my results in Paraview using cylindrical components of the velocity. I found on the internet this macro that permits to convert into cylindrical coordinates : import vtk input = self.GetInput() output = self.GetOutput() transform = vtk.vtkCylindricalTransform() transformFilter = vtk.vtkTransformFilter() transformFilter.SetInputData(input) transformFilter.SetTransform(transform.GetInverse( )) transformFilter.Update() output.ShallowCopy(transformFilter.GetOutput()) When I run the macro I have this error : File '<string>', line 3, in <module> NameError: name 'self' is not defined I am not an expert in Python and I don't understand the error and how to resolve it. Anyone have a solution ? Thank you very much and have a good day. |
Hi Maxime,
The script should be used in Programmable Filter. Best, Mikko |
Hello Mikko and thank you for your reply
Is the code the same as a programmable filter ? It seems that paraview don't like the shallow copy function Thanks Maxime |
All times are GMT -4. The time now is 23:17. |