diff --git a/src/ansys/mapdl/core/__init__.py b/src/ansys/mapdl/core/__init__.py index 6375f74cd6..7c4f77a281 100644 --- a/src/ansys/mapdl/core/__init__.py +++ b/src/ansys/mapdl/core/__init__.py @@ -23,7 +23,7 @@ # Per contract with Sphinx-Gallery, this method must be available at top level try: - from pyvista.utilities.sphinx_gallery import _get_sg_image_scraper + import pyvista _HAS_PYVISTA = True except ModuleNotFoundError: # pragma: no cover diff --git a/src/ansys/mapdl/core/mapdl_geometry.py b/src/ansys/mapdl/core/mapdl_geometry.py index 56d1d0faaa..89130286d9 100644 --- a/src/ansys/mapdl/core/mapdl_geometry.py +++ b/src/ansys/mapdl/core/mapdl_geometry.py @@ -32,10 +32,7 @@ def merge_polydata(items): """Merge list of polydata or unstructured grids""" # lazy import here for faster module loading - try: - from pyvista._vtk import vtkAppendPolyData - except: - from vtk import vtkAppendPolyData + from vtkmodules.vtkFiltersCore import vtkAppendPolyData afilter = vtkAppendPolyData() for item in items: