assert np.max(arr) > .99 arr = sphere.getCellArray('carr') print('getCellArray',[arr]) assert len(arr) print('getCellArray',np.max(arr) ,'>', .99) assert np.max(arr) > .99 ######################################__add__ print('__add__', [cone+sphere], [vtk.vtkAssembly]) assert isinstance(cone+sphere, vtk.vtkAssembly) ###################################### points() s2 = sphere.clone() pts = sphere.points() pts2 = pts + [1,2,3] pts3 = s2.points(pts2).points() print('points()',sum(pts3-pts2)) assert np.allclose(pts2, pts3) ###################################### faces print('faces()', np.array(sphere.faces()).shape , (2112, 3)) assert np.array(sphere.faces()).shape == (2112, 3) ###################################### texture st = sphere.clone().texture('wood2') print('texture test')
assert len(arr) print('pointdata', np.max(arr), '>', .99) assert np.max(arr) > .99 arr = sphere.celldata['carr'] print('celldata', [arr]) assert len(arr) print('celldata', np.max(arr), '>', .99) assert np.max(arr) > .99 ######################################__add__ print('__add__', [cone + sphere], [vtk.vtkAssembly]) assert isinstance(cone + sphere, vtk.vtkAssembly) ###################################### points() s2 = sphere.clone() pts = sphere.points() pts2 = pts + [1, 2, 3] pts3 = s2.points(pts2).points() print('points()', sum(pts3 - pts2)) assert np.allclose(pts2, pts3) ###################################### faces print('faces()', np.array(sphere.faces()).shape, (2112, 3)) assert np.array(sphere.faces()).shape == (2112, 3) ###################################### texture st = sphere.clone().texture('wood2') print('texture test') assert isinstance(st.GetTexture(), vtk.vtkTexture)