| 167 | |
| 168 | |
| 169 | def test_ctrlPts(): |
| 170 | |
| 171 | c = circle(1) |
| 172 | |
| 173 | # non-NURBS objects throw |
| 174 | with raises(ValueError): |
| 175 | ctrlPts(c) |
| 176 | |
| 177 | # control points of a curve |
| 178 | a1 = ctrlPts(c.toNURBS()) |
| 179 | assert isinstance(a1, vtkActor) |
| 180 | |
| 181 | # control points of a non-periodic curve |
| 182 | a2 = ctrlPts(c.trim(0, 1).toNURBS()) |
| 183 | assert isinstance(a2, vtkActor) |
| 184 | |
| 185 | # non-NURBS objects throw |
| 186 | with raises(ValueError): |
| 187 | ctrlPts(plane(1, 1)) |
| 188 | |
| 189 | # control points of a surface |
| 190 | a3 = ctrlPts(sweep(c.trim(0, 1), spline((0, 0, 0), (0, 0, 1)))) |
| 191 | assert isinstance(a3, vtkActor) |
| 192 | |
| 193 | # control points of a u,v periodic surface |
| 194 | a4 = ctrlPts(torus(5, 1).faces().toNURBS()) |
| 195 | assert isinstance(a4, vtkActor) |
| 196 | |
| 197 | |
| 198 | def test_style(wp, assy): |