()
| 90 | |
| 91 | |
| 92 | def buildPolyData(): |
| 93 | pd = vtkPolyData() |
| 94 | |
| 95 | pts = vtkPoints() |
| 96 | pts.InsertNextPoint([0.1, 0.1, 0.0]) |
| 97 | pts.InsertNextPoint([0.9, 0.9, 0.0]) |
| 98 | |
| 99 | pd.SetPoints(pts) |
| 100 | |
| 101 | lines = vtkCellArray() |
| 102 | lines.InsertNextCell(2) |
| 103 | lines.InsertCellPoint(0) |
| 104 | lines.InsertCellPoint(1) |
| 105 | |
| 106 | pd.SetLines(lines) |
| 107 | |
| 108 | colors = vtkUnsignedCharArray() |
| 109 | colors.SetNumberOfComponents(4) |
| 110 | colors.InsertNextTypedTuple([27, 128, 89, 255]) |
| 111 | |
| 112 | pd.GetCellData().SetScalars(colors) |
| 113 | |
| 114 | return pd |
| 115 | |
| 116 | |
| 117 | class TestPythonItem(Testing.vtkTest): |
no test coverage detected