Skip to content

Commit e3cb30f

Browse files
Bump version 0.4.4
1 parent cec0425 commit e3cb30f

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

doc/changelog.d/142.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: UnstructuredGrid not working with clipping plane widget

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.3"
7+
version = "0.4.4"
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ def plot(
241241
if hasattr(plottable_object, "name") and not re.search(name_filter, plottable_object.name):
242242
return self._object_to_actors_map
243243

244+
if "show_edges" in plotting_options:
245+
self._show_edges = plotting_options["show_edges"]
246+
244247
# Check what kind of object we are dealing with
245248
if isinstance(plottable_object, (pv.PolyData, pv.UnstructuredGrid)):
246249
if "clipping_plane" in plotting_options:

src/ansys/tools/visualization_interface/backends/pyvista/widgets/mesh_slider.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,14 @@ def callback(self, state: bool) -> None:
7272
self.plotter_helper._pl.scene.add_actor(actor)
7373
else:
7474
self._mb = pv.MultiBlock(self.plotter_helper._pl.scene.meshes).combine()
75-
self._widget_actor = self.plotter_helper._pl.scene.add_mesh_clip_plane(self._mb)
75+
self._widget_actor = self.plotter_helper._pl.scene.add_mesh_clip_plane(
76+
self._mb, show_edges=self.plotter_helper._pl._show_edges
77+
)
7678
for mesh in self._meshes:
7779
if isinstance(mesh, pv.PolyData):
7880
mesh_id = "PolyData(" + mesh.memory_address + ")"
81+
elif isinstance(mesh, pv.UnstructuredGrid):
82+
mesh_id = "UnstructuredGrid(" + mesh.memory_address + ")"
7983
elif isinstance(mesh, pv.MultiBlock):
8084
mesh_id = "MultiBlock(" + mesh.memory_address + ")"
8185
self._mesh_actor_list.append(self.plotter_helper._pl.scene.actors[mesh_id])

0 commit comments

Comments
 (0)