Created
November 1, 2022 16:01
-
-
Save akaszynski/2360026f0adbb9673accf19375b6bac0 to your computer and use it in GitHub Desktop.
Add measure widget example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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