open_viewmin.filter_tree_plot.widgets.plane_widgets#
Utilities for working with PyVista plane widgets
Functions#
|
Add plane widget for clip filter |
|
Add a Pontryagin-Thom surface. |
|
Add slice widget |
|
Create callable that adds a slice widget |
|
|
|
Change normal and/or origin of a plane widget, |
|
Create callable used to configure plane widget |
|
Default normal and origin for slice filter |
|
Add a new FilterFormula with a slice filter |
|
Set up a slice widget |
|
Create callback for updated slice widget |
Module Contents#
- add_filter_widget_clip_plane(plotter, mesh_name)#
Add plane widget for clip filter
- Parameters:
plotter (
FilterTreePlot
)mesh_name (str)
- add_pontryagin_thom_widget(plotter, vectors_name, apolar=True, name=None)#
Add a Pontryagin-Thom surface.
Finds the surface(s) of points where the orientation lies in the plane of directions perpendicular to normal_dir, and colors the surface by angle in this plane. For uses of the Pontryagin-Thom construction in nematic liquid crystals, see: Chen, Ackerman, Alexander, Kamien, and Smalyukh (2013), Generating the Hopf fibration experimentally in nematic liquid crystals. Phys. Rev. Lett. 110, 237801. https://doi.org/10.1103/PhysRevLett.110.237801
Čopar, Porenta and Žumer (2013), Visualisation methods for complex nematic fields, Liquid Crystals, 40:12, 1759-1768. https://doi.org/110.1080/02678292.2013.853109.
Machon and Alexander (2014), Knotted Defects in Nematic Liquid Crystals, Phys. Rev. Lett. 113, 027801. https://doi.org/110.1103/PhysRevLett.113.027801
- add_slice(plotter, scalars_name=None, slice_name=None, widget_name=None, mesh_to_slice_name='fullmesh')#
Add slice widget
- Parameters:
plotter (
FilterTreePlot
)scalars_name (str or None)
slice_name (str or None)
widget_name (str or None)
mesh_to_slice_name (str)
- Returns:
Slice name, widget name
- Return type:
(str, str)
- add_slice_aux(plotter, scalars_name=None)#
Create callable that adds a slice widget
- Parameters:
plotter (
FilterTreePlot
)scalars_name (str or None)
- Return type:
callable
- add_slice_widget_to_slice_mesh(plotter, slice_name=None, widget_name=None)#
- alter_plane_widget(widget_formula, theta=None, phi=None, origin=None, dtheta=0.0, dphi=0.0, d_origin=(0.0, 0.0, 0.0))#
Change normal and/or origin of a plane widget, and update associated mesh (and possibly actor(s)) accordingly
- Parameters:
widget_formula (
WidgetFormula
)theta (float or None)
phi (float or None)
origin ((float, float, float) or None)
dtheta (float)
dphi (float)
d_origin ((float, float, float))
- configure_plane_widget(plotter)#
Create callable used to configure plane widget
- Parameters:
plotter (
FilterTreePlot
)- Return type:
callable
- default_slice_kwargs(plotter)#
Default normal and origin for slice filter
- Parameters:
plotter (
FilterTreePlot
)- Return type:
dict
- new_slice_mesh(plotter, slice_name=None, mesh_to_slice_name='fullmesh', normal=(1.0, 0.0, 0.0), origin=None, **mesh_kwargs)#
Add a new FilterFormula with a slice filter
- Parameters:
plotter (
FilterTreePlot
)slice_name (str or None)
mesh_to_slice_name (str)
normal ((float, float, float))
origin ((float, float, float) or None)
**mesh_kwargs – Keyword arguments to FilterTreePlot.add_filter_formula
- Returns:
New child mesh created by filter formula, or None if no filter formula was created.
- Return type:
pyvista.dataset or None
- setup_slice_widget(plotter, widget_name=None, slice_name=None, mesh_to_slice_name='fullmesh', **mesh_kwargs)#
Set up a slice widget
- Parameters:
plotter (
FilterTreePlot
)widget_name (str or None)
slice_name (str or None)
mesh_to_slice_name (str)
**mesh_kwargs – Keyword arguments to
new_slice_mesh()
- slice_widget_callback(plotter, slice_name)#
Create callback for updated slice widget
- Parameters:
plotter (
FilterTreePlot
)slice_name (str)
- Return type:
callable