Skip to content

Instantly share code, notes, and snippets.

@akaszynski
Created November 1, 2022 16:01
Show Gist options
  • Save akaszynski/2360026f0adbb9673accf19375b6bac0 to your computer and use it in GitHub Desktop.
Save akaszynski/2360026f0adbb9673accf19375b6bac0 to your computer and use it in GitHub Desktop.
Add measure widget example
import time
import vtk
import pyvista as pv
cube = pv.Cube()
pl = pv.Plotter(notebook=False)
pl.add_mesh(cube) # <-- Add pygeometry stuff
def add_widget(flag):
print(flag)
pl.add_measure_widget()
_ = pl.add_checkbox_button_widget(add_widget, value=False)
# tree = vtk.vtkQtTreeView()
pl.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment