Skip to content

Commit

Permalink
Merge branch 'main' into doc/python_version
Browse files Browse the repository at this point in the history
  • Loading branch information
waltersma authored Oct 1, 2024
2 parents 1f0e207 + f0e4376 commit 79814fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/changelog.d/899.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: PyVista deprecation
6 changes: 3 additions & 3 deletions src/ansys/meshing/prime/core/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 79814fb

Please sign in to comment.