Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/375.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: Uninitialized variable in PyVistaBackendInterface
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def __init__(
# Map that relates PyVista actors with PyAnsys objects
self._object_to_actors_map = {}

self._edge_actors_map: Dict[pv.Actor, EdgePlot] = {}

# PyVista plotter
self._pl = None

Expand Down
6 changes: 4 additions & 2 deletions tests/test_generic_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import pytest
import pyvista as pv

from ansys.tools.visualization_interface import ClipPlane, MeshObjectPlot, Plotter
from ansys.tools.visualization_interface import ClipPlane, EdgePlot, MeshObjectPlot, Plotter
from ansys.tools.visualization_interface.backends.pyvista import PyVistaBackend
from ansys.tools.visualization_interface.backends.pyvista.picker import Picker

Expand Down Expand Up @@ -93,7 +93,9 @@ def test_plotter_add_structured_grid():
def test_plotter_add_custom():
"""Adds a MeshObjectPlot object to the plotter."""
sphere = pv.Sphere()
custom = MeshObjectPlot(CustomTestClass("myname"), sphere)
edge = pv.Cube((0, 1, 0))
custom_edge = EdgePlot(CustomTestClass("myname_edge"), edge)
custom = MeshObjectPlot(CustomTestClass("myname"), sphere, edges=[custom_edge])
pl = Plotter()
pl.plot(custom)
pl.show()
Expand Down
Loading