Hello,
I need to overlay a disk or sphere over my data and move it along a given function, that depends on the simulation time t. So e.g. I want a disk to move along the x-axis during the simulation time - is this possible? At the moment I create the disk by hand, which is nice for one single timestep, automating this would be a great help.
Thanks in advance,
Mathias
//Edit:
I found a similar question here:
https://public.kitware.com/pipermail/paraview/2014-September/032153.html and there a similar problem could be solved with a ProgrammableFilter. So I tried this on my problem too and at the moment I have this programmable filter on my sphere:
from vtk import vtkDataObject
from paraview.simple import GetActiveView
pdi = self.GetPolyDataInput()
pdo = self.GetPolyDataOutput()
newPoints = vtk.vtkPoints()
numPoints = pdi.GetNumberOfPoints()
view = GetActiveView()
time = view.ViewTime
for i in range(0, numPoints):
coord = pdi.GetPoint(i)
x, y, z = coord[:3]
x = x + time
y = y
z = z
newPoints.InsertPoint(i, x, y, z)
pdo.SetPoints(newPoints)
this works, when I trigger it manually each timestep. Is it possible, that the filter is executed automatically on each new timestep?