diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a90f39a1d..4447394222 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ env: DPF_PORT: 21004 MAPDL_PACKAGE: ghcr.io/ansys/mapdl ON_CI: True - PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile' + PYTEST_ARGUMENTS: '-vvv -rxXsal --full-trace --tb=long --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile' BUILD_CHEATSHEET: True PYMAPDL_DEBUG_TESTING: True diff --git a/doc/changelog.d/3615.dependencies.md b/doc/changelog.d/3615.dependencies.md new file mode 100644 index 0000000000..9f83a709d3 --- /dev/null +++ b/doc/changelog.d/3615.dependencies.md @@ -0,0 +1 @@ +build: update to vtk 9.4.0 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d181b4ecd3..e2e7c64544 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ tests = [ "pytest-timeout==2.3.1", "pytest==8.3.4", "scipy==1.15.1", - "vtk==9.3.1", + "vtk==9.4.1", ] doc = [ "ansys-dpf-core==0.10.1", @@ -102,7 +102,7 @@ doc = [ "sphinx==8.1.3", "sphinxcontrib-websupport==2.0.0", "sphinxemoji==0.3.1", - "vtk==9.3.1", + "vtk==9.4.1", ] [tool.flit.module] diff --git a/src/ansys/mapdl/core/plotting/visualizer.py b/src/ansys/mapdl/core/plotting/visualizer.py index f4df50e8d8..29e2c97fd9 100644 --- a/src/ansys/mapdl/core/plotting/visualizer.py +++ b/src/ansys/mapdl/core/plotting/visualizer.py @@ -225,15 +225,10 @@ def get_meshes_from_plotter(self): list[pv.PolyData] Plotted meshes. """ - datasets = [] - for actor in self.scene.actors.values(): - if hasattr(actor, "mapper"): - datasets.append(actor.mapper.dataset) - return [ actor.mapper.dataset for actor in self.scene.actors.values() - if hasattr(actor, "mapper") + if hasattr(actor, "mapper") and hasattr(actor.mapper, "dataset") ] def add_labels( @@ -856,4 +851,12 @@ def scene(self): @property def meshes(self): """Return the meshes.""" - return self.scene.meshes + try: + # Pyvista 0.44.2 makes this method to fail, so adding a backup plan + return self.scene.meshes + except AttributeError: + return [ + actor.mapper.dataset + for actor in self.scene.actors.values() + if hasattr(actor, "mapper") and hasattr(actor.mapper, "dataset") + ]