(self, request, inInfo, outInfo)
| 42 | |
| 43 | |
| 44 | def RequestData(self, request, inInfo, outInfo): |
| 45 | info = outInfo.GetInformationObject(0) |
| 46 | output = vtkPolyData.GetData(info) |
| 47 | |
| 48 | timestep = info.Get(vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP()) |
| 49 | |
| 50 | sphere = vtkSphereSource() |
| 51 | sphere.SetRadius(1.0) |
| 52 | sphere.SetThetaResolution(16) |
| 53 | sphere.SetPhiResolution(16) |
| 54 | sphere.SetCenter(timestep * 2.0, 0, 0) |
| 55 | sphere.Update() |
| 56 | |
| 57 | data = sphere.GetOutput() |
| 58 | numPts = data.GetNumberOfPoints() |
| 59 | npArray = np.sin(timestep + np.linspace(0, np.pi, numPts)) |
| 60 | |
| 61 | array = numpy_to_vtk(npArray) |
| 62 | array.SetName('MyPointField') |
| 63 | |
| 64 | data.GetPointData().AddArray(array) |
| 65 | output.ShallowCopy(data) |
| 66 | |
| 67 | return 1 |
| 68 | |
| 69 | |
| 70 | class TestFidesWriterTime(Testing.vtkTest): |
nothing calls this directly
no test coverage detected