Skip to content

Commit

Permalink
docs(SurfacePicking): add jupyter helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Sep 29, 2022
1 parent af70938 commit 76e6c8b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions examples/06_vtk/Applications/SurfacePicking/app.py
Expand Up @@ -46,7 +46,7 @@

data_directory = Path(__file__).parent.parent.parent.with_name("data")
f1_vtp = data_directory / "f1.vtp"
print(f1_vtp)
# print(f1_vtp)

reader = vtkXMLPolyDataReader()
reader.SetFileName(f1_vtp)
Expand Down Expand Up @@ -94,7 +94,7 @@
"selectData": None,
"tooltip": "",
"coneVisibility": False,
"pixel_ratio": 1,
"pixel_ratio": 2,
# Meshes
"f1Visible": True,
}
Expand Down Expand Up @@ -303,6 +303,17 @@ def update_tooltip(pickData, pixel_ratio, **kwargs):
vtk_class="vtkConeSource",
state=("cone", {}),
)
# -----------------------------------------------------------------------------
# Jupyter
# -----------------------------------------------------------------------------


def show(**kwargs):
from trame.app import jupyter

jupyter.show(server, **kwargs)


# -----------------------------------------------------------------------------
# CLI
# -----------------------------------------------------------------------------
Expand Down

0 comments on commit 76e6c8b

Please sign in to comment.