Ruler#

class ansys.geometry.core.plotting.widgets.ruler.Ruler(plotter: pyvista.Plotter)#

Bases: ansys.geometry.core.plotting.widgets.widget.PlotterWidget

Provides the ruler widget for the PyAnsys Geometry Plotter class.

Parameters:
plotterPlotter

Provides the plotter to add the ruler widget to.

Overview#

callback

Remove or add the ruler widget actor upon click.

update

Define the configuration and representation of the ruler widget button.

Import detail#

from ansys.geometry.core.plotting.widgets.ruler import Ruler

Method detail#

Ruler.callback(state: bool) None#

Remove or add the ruler widget actor upon click.

Parameters:
statebool

State of the button, which is inherited from PyVista. The value is True if the button is active.

Notes

This method provides a callback function for the ruler widet. It is called every time the ruler widget is clicked.

Ruler.update() None#

Define the configuration and representation of the ruler widget button.