(self)
| 176 | self.assertEqual(c.GetOutput().GetNumberOfCells(), nCells) |
| 177 | |
| 178 | def testStructured(self): |
| 179 | rt = vtkRTAnalyticSource() |
| 180 | rt.SetWholeExtent(-5, 5, -5, 5, -5, 5) |
| 181 | rt.Update() |
| 182 | i = rt.GetOutput() |
| 183 | |
| 184 | st = vtkStructuredGrid() |
| 185 | st.SetDimensions(i.GetDimensions()) |
| 186 | |
| 187 | nps = i.GetNumberOfPoints() |
| 188 | ps = vtkPoints() |
| 189 | ps.SetNumberOfPoints(nps) |
| 190 | for idx in range(nps): |
| 191 | ps.SetPoint(idx, i.GetPoint(idx)) |
| 192 | |
| 193 | st.SetPoints(ps) |
| 194 | |
| 195 | s = vtkSphere() |
| 196 | s.SetRadius(2) |
| 197 | s.SetCenter(0,0,0) |
| 198 | |
| 199 | c = vtkTableBasedClipDataSet() |
| 200 | c.SetInputData(st) |
| 201 | c.SetClipFunction(s) |
| 202 | c.SetInsideOut(1) |
| 203 | |
| 204 | c.Update() |
| 205 | |
| 206 | self.assertEqual(c.GetOutput().GetNumberOfCells(), 64) |
| 207 | |
| 208 | def testUnstructured(self): |
| 209 | rt = vtkRTAnalyticSource() |
nothing calls this directly
no test coverage detected