spateo.tdr.widgets.clip#

Module Contents#

Functions#

_interactive_rectangle_clip(plotter, model, ...)

Add a 2D rectangle widget to the scene.

interactive_rectangle_clip(→ pyvista.MultiBlock)

Pick the interested part of a model using a 2D rectangle widget.

interactive_box_clip(→ pyvista.MultiBlock)

Pick the interested part of a model using a 3D box widget. Only one model can be generated.

spateo.tdr.widgets.clip._interactive_rectangle_clip(plotter, model, picking_list, picking_r_list)[source]#

Add a 2D rectangle widget to the scene.

spateo.tdr.widgets.clip.interactive_rectangle_clip(model: pyvista.PolyData | pyvista.UnstructuredGrid | pyvista.MultiBlock, key: str = 'groups', model_style: Literal[points, surface, wireframe] | list = 'points', model_size: float | list = 8.0, colormap: str = 'Spectral', invert: bool = False, bg_model=None) pyvista.MultiBlock[source]#

Pick the interested part of a model using a 2D rectangle widget. Multiple models can be generated at the same time.

Parameters:
model

Reconstructed 3D model.

key

The key under which are the labels.

invert

Flag on whether to flip/invert the pick.

bg_model

A visualization-only background model to help clip our target model.

Returns:

A MultiBlock that contains all models you picked.

Return type:

picked_model

spateo.tdr.widgets.clip.interactive_box_clip(model: pyvista.PolyData | pyvista.UnstructuredGrid | pyvista.MultiBlock, key: str = 'groups', invert: bool = False) pyvista.MultiBlock[source]#

Pick the interested part of a model using a 3D box widget. Only one model can be generated.

Parameters:
model

Reconstructed 3D model.

key

The key under which are the labels.

invert

Flag on whether to flip/invert the pick.

Returns:

A MultiBlock that contains all models you picked.

Return type:

picked_model