Skip to content

Commit cec0425

Browse files
Bump version 0.4.3
1 parent f5625e3 commit cec0425

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

doc/changelog.d/140.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: Missing support for unstructured grid types

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
44

55
[project]
66
name = "ansys-tools-visualization-interface"
7-
version = "0.4.2"
7+
version = "0.4.3"
88
description = "A Python visualization interface for PyAnsys libraries"
99
readme = "README.rst"
1010
requires-python = ">=3.9,<4"

src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def plot(
242242
return self._object_to_actors_map
243243

244244
# Check what kind of object we are dealing with
245-
if isinstance(plottable_object, pv.PolyData):
245+
if isinstance(plottable_object, (pv.PolyData, pv.UnstructuredGrid)):
246246
if "clipping_plane" in plotting_options:
247247
mesh = self.clip(plottable_object, plotting_options["clipping_plane"])
248248
plotting_options.pop("clipping_plane", None)

tests/test_generic_plotter.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ def test_plotter_add_mb():
5252
pl.plot(mb)
5353
pl.show()
5454

55+
def test_plotter_add_unstructured_grid():
56+
"""Adds unstructured grid to the plotter."""
57+
pl = Plotter()
58+
sphere = pv.Sphere()
59+
ug = pv.UnstructuredGrid(sphere)
60+
pl.plot(ug)
61+
pl.show()
5562

5663
def test_plotter_add_custom():
5764
"""Adds a MeshObjectPlot object to the plotter."""

0 commit comments

Comments
 (0)