@@ -89,7 +89,7 @@ def to_pyvista_points(point_set: PointSet):
8989 pv.PolyData
9090 """
9191 poly = pv .PolyData (point_set .data .vertex )
92- poly .point_arrays .update (point_set .data .attributes_to_dict )
92+ poly .point_data .update (point_set .data .attributes_to_dict )
9393
9494 return poly
9595
@@ -106,8 +106,8 @@ def to_pyvista_mesh(unstructured_element: Union[TriSurf],
106106 cells = np .c_ [np .full (unstructured_element .mesh .n_elements , nve ),
107107 unstructured_element .mesh .cells ]
108108 mesh = pv .PolyData (vertices , cells )
109- mesh .cell_arrays .update (unstructured_element .mesh .attributes_to_dict )
110- mesh .point_arrays .update (unstructured_element .mesh .points_attributes )
109+ mesh .cell_data .update (unstructured_element .mesh .attributes_to_dict )
110+ mesh .point_data .update (unstructured_element .mesh .points_attributes )
111111
112112 return mesh
113113
@@ -162,7 +162,7 @@ def to_pyvista_line(line_set: LineSet, as_tube=True, radius=None,
162162 else :
163163 raise NotImplementedError
164164 # mesh = pv.Spline(ver)
165- mesh .cell_arrays .update (line_set .data .attributes_to_dict )
165+ mesh .cell_data .update (line_set .data .attributes_to_dict )
166166 if as_tube is True :
167167 return mesh .tube (radius = radius )
168168 else :
@@ -177,7 +177,7 @@ def to_pyvista_tetra(tetra_mesh: TetraMesh):
177177 import vtk
178178 ctypes = np .array ([vtk .VTK_TETRA , ], np .int32 )
179179 mesh = pv .UnstructuredGrid (cells , ctypes , vertices )
180- mesh .cell_arrays .update (tetra_mesh .data .attributes_to_dict )
180+ mesh .cell_data .update (tetra_mesh .data .attributes_to_dict )
181181 return mesh
182182
183183
@@ -236,7 +236,7 @@ def update_grid_attribute(mesh, structured_grid,
236236 if data_set_name is None :
237237 data_set_name = structured_grid .ds .data_array_name
238238
239- mesh .point_arrays .update (
239+ mesh .point_data .update (
240240 {data_set_name : structured_grid .ds .data [data_set_name ].sel (
241241 ** attribute_slice
242242 ).values .ravel (data_order )})
0 commit comments