diff --git a/doc/changelog.d/899.fixed.md b/doc/changelog.d/899.fixed.md new file mode 100644 index 0000000000..7cd14af24c --- /dev/null +++ b/doc/changelog.d/899.fixed.md @@ -0,0 +1 @@ +fix: PyVista deprecation \ No newline at end of file diff --git a/src/ansys/meshing/prime/core/mesh.py b/src/ansys/meshing/prime/core/mesh.py index 78231f04cc..beedb5007e 100644 --- a/src/ansys/meshing/prime/core/mesh.py +++ b/src/ansys/meshing/prime/core/mesh.py @@ -325,7 +325,7 @@ def get_face_polydata( vertices, faces = self._get_vertices_and_surf_faces(face_facet_res, index) surf = pv.PolyData(vertices, faces) fcolor = np.array(self.get_face_color(part, ColorByType.ZONE)) - colors = np.tile(fcolor, (surf.n_faces, 1)) + colors = np.tile(fcolor, (surf.n_faces_strict, 1)) surf["colors"] = colors surf.disp_mesh = self has_mesh = True @@ -415,7 +415,7 @@ def get_spline_cp_polydata(self, part_id: int, spline_id: int) -> MeshObjectPlot faces = self.compute_face_list_from_structured_nodes(dim) surf = pv.PolyData(vertices, faces) fcolor = np.array([0, 0, 255]) - colors = np.tile(fcolor, (surf.n_faces, 1)) + colors = np.tile(fcolor, (surf.n_faces_strict, 1)) surf["colors"] = colors surf.disp_mesh = self if surf.n_points > 0: @@ -443,7 +443,7 @@ def get_spline_surface_polydata(self, part_id: int, spline_id: int) -> MeshObjec faces = self.compute_face_list_from_structured_nodes(dim) surf = pv.PolyData(vertices, faces) fcolor = np.array(color_matrix[1]) - colors = np.tile(fcolor, (surf.n_faces, 1)) + colors = np.tile(fcolor, (surf.n_faces_strict, 1)) surf["colors"] = colors surf.disp_mesh = self if surf.n_points > 0: