Skip to content

Commit 6d30c70

Browse files
fix: Doc review suggestions
1 parent 69b025f commit 6d30c70

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

doc/source/user_guide/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Use with PyAnsys custom objects
4646

4747
You can also use the default plotter to visualize PyAnsys custom objects. The only requirement is that the
4848
custom object must have a method that returns a PyVista mesh a method that exposes a ``name`` or
49-
``id`` attribute of your object. To expose a custom object, you use a ``MeshObjectPlot`` instance. This class
49+
``id`` attribute of your object. To expose a custom object, you use a :class:`~ansys.tools.visualization_interface.types.mesh_object_plot.MeshObjectPlot` instance. This class
5050
relates PyVista meshes with any object.
5151

5252
The following code shows how to use the default plotter to visualize a PyAnsys custom object:
@@ -100,7 +100,7 @@ class. After that, see these main use cases for customizing the plotter:
100100
* The most common use case is to customize the way that the objects you represent are shown in the plotter.
101101
To this end, you can override the ``plot`` and ``plot_iter`` methods. These methods are called every time
102102
a new object is added to the plotter. The default implementation of this method is to add a PyVista mesh
103-
or a ``MeshObjectPlot`` instance to the plotter. You can override this method to add your own meshes or
103+
or a :class:`~ansys.tools.visualization_interface.types.mesh_object_plot.MeshObjectPlot` instance to the plotter. You can override this method to add your own meshes or
104104
objects to the plotter in a manner that fits the way that you want to represent the meshes.
105105

106106
* Another use case is the need to have custom button functionalities for your library. For example, you may
@@ -116,11 +116,11 @@ For comprehensive migration information with code examples, see :ref:`ref_migrat
116116
Customizing the picker and hover callbacks
117117
==========================================
118118

119-
The Visualization Interface Tool provides a base class, ``AbstractPicker``, for customizing the picker and hover
119+
The Visualization Interface Tool provides a base class, :class:`~ansys.tools.visualization_interface.backends.pyvista.picker.AbstractPicker`, for customizing the picker and hover
120120
callbacks of the plotter. This class provides a set of methods that can be overridden so that you can adapt the
121121
picker and hover functionalities to the specific need of your PyAnsys library.
122122

123-
The first thing you must do is to create a class that inherits from the ``AbstractPicker`` class. After that, see
123+
The first thing you must do is to create a class that inherits from the :class:`~ansys.tools.visualization_interface.backends.pyvista.picker.AbstractPicker` class. After that, see
124124
these main use cases for customizing the picker and hover callbacks:
125125

126126
* You may want to change the way that objects are picked in the plotter. To do this, you can override the
@@ -131,4 +131,4 @@ these main use cases for customizing the picker and hover callbacks:
131131
override the ``hover_select_object`` and ``hover_unselect_object`` methods. These methods are called when an
132132
object is hovered over or unhovered, respectively.
133133

134-
A practical example of how to use the ``AbstractPicker`` class are included in the examples section of the documentation.
134+
A practical example of how to use the :class:`~ansys.tools.visualization_interface.backends.pyvista.picker.AbstractPicker` class is included in :ref:`sphx_glr_examples_00-basic-pyvista-examples_custom_picker.py`.

doc/source/user_guide/migration.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
Migration
44
#########
55

6-
In this section two guides are provided to help you migrate from PyVista plotters to the Ansys Tools Visualization Interface plotters.
6+
This section helps you migrate from PyVista plotters to the Ansys Tools Visualization Interface plotters.
7+
It consists of two major topics:
8+
9+
- `Code migration`_
10+
- `Documentation configuration migration`_
711

812
Code migration
913
==============
@@ -73,7 +77,7 @@ Your custom object must have a method that returns a PyVista mesh and a method t
7377
return self.name
7478
7579
76-
You then need to create a ``MeshObjectPlot`` instance that relates the PyVista mesh with your custom object:
80+
You then need to create a :class:`~ansys.tools.visualization_interface.types.mesh_object_plot.MeshObjectPlot` instance that relates the PyVista mesh with your custom object:
7781

7882
.. code-block:: python
7983
@@ -109,7 +113,7 @@ You can customize the backend of the Ansys Tools Visualization Interface plotter
109113
# Show the plotter
110114
pl.show()
111115
112-
If you want to customize the backend even more, you can create your own backend by inheriting from the ``PyVistaBackendInterface`` class
116+
If you want to customize the backend even more, you can create your own backend by inheriting from the :class:`~ansys.tools.visualization_interface.backends.pyvista.PyVistaBackendInterface` class
113117
and implementing the required methods:
114118

115119
.. code-block:: python
@@ -150,14 +154,15 @@ and implementing the required methods:
150154
pass
151155
152156
153-
The rest of the methods are implemented for you. This ensures that while you can customize what you need for plotting, the rest of the functionalities still work as expected.
154-
If you need to even go further, you can create your own plotter by inheriting from the ``BaseBackend`` class and implementing the required methods,
155-
although this may break existing features. You can find more information about this in the plotter documentation.
157+
The rest of the methods are implemented for you. This ensures that while you can customize what you need for plotting,
158+
the rest of the functionalities still work as expected. For more information, see the backend documentation. If you
159+
need to even go further, you can create your own plotter by inheriting from the :class:`~ansys.tools.visualization_interface.backends._base.BaseBackend` class and implementing the required methods,
160+
although this may break existing features.
156161

157162
Customize the picker or hover behavior
158163
--------------------------------------
159164
You can customize the picker of the Ansys Tools Visualization Interface plotter to decide what happens when you pick or hover over an object.
160-
For example, if you want to print the name of the picked object, you can do it as described in the custom picker example.
165+
For example, if you want to print the name of the picked object, you can do it as described in the :ref:`sphx_glr_examples_00-basic-pyvista-examples_custom_picker.py` example.
161166

162167
Use the PyVista Qt backend
163168
--------------------------

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def plot_iter(self, plottable_object: Any, name_filter: str = None, **plotting_o
509509
plottable_object : Any
510510
One or more objects to add.
511511
name_filter : str, default: None.
512-
Regular expression with the desired name or names to include in the plotter.
512+
Regular expression with the desired name or names to include in the plotter.
513513
**plotting_options : dict, default: None
514514
Keyword arguments. For allowable keyword arguments, see the
515515
:meth:`Plotter.add_mesh <pyvista.Plotter.add_mesh>` method.
@@ -524,7 +524,7 @@ def plot(self, plottable_object: Any, name_filter: str = None, **plotting_option
524524
Parameters
525525
----------
526526
plottable_object : Any
527-
Object to add.
527+
Object to plot.
528528
name_filter : str
529529
Regular expression with the desired name or names to include in the plotter.
530530
**plotting_options : dict, default: None
@@ -618,7 +618,7 @@ def plot(self, plottable_object: Any, name_filter: str = None, **plotting_option
618618
Parameters
619619
----------
620620
plottable_object : Any
621-
Object to add.
621+
Object to plot.
622622
name_filter : str
623623
Regular expression with the desired name or names to include in the plotter.
624624
**plotting_options : dict, default: None

0 commit comments

Comments
 (0)