spateo.tdr.models.morpho_models.uniform_model#

Module Contents#

Functions#

construct_space(, grid_num, Tuple[int]]] = None, ...)

Construct a model(space-model) with uniform spacing in the three coordinate directions.

construct_bounding_box(, grid_num, ...)

Construct a bounding box model of the model.

spateo.tdr.models.morpho_models.uniform_model.construct_space(model: Union[pyvista.DataSet, pyvista.MultiBlock], expand_dist: Union[int, float, list, tuple] = (0, 0, 0), grid_num: Optional[Union[List[int], Tuple[int]]] = None, key_added: Optional[str] = 'space', label: str = 'space', color: str = 'gainsboro', alpha: float = 0.5) pyvista.UniformGrid[source]#

Construct a model(space-model) with uniform spacing in the three coordinate directions. The six surfaces of the commonly generated space-model are exactly the boundaries of the model, but the space-model can also be expanded by expand_dist.

Parameters
model

A three dims model.

expand_dist

The length of space-model to be extended in all directions.

grid_num

Number of grid to generate.

key_added

The key under which to add the labels.

label

The label of space-model.

color

Color to use for plotting space-model.

alpha

The opacity of the color to use for plotting space-model.

Returns

A space-model with uniform spacing in the three coordinate directions.

spateo.tdr.models.morpho_models.uniform_model.construct_bounding_box(model: Union[pyvista.DataSet, pyvista.MultiBlock], expand_dist: Union[int, float, list, tuple] = (0, 0, 0), grid_num: Optional[Union[List[int], Tuple[int]]] = None, key_added: str = 'bounding_box', label: str = 'bounding_box', color: str = 'gainsboro', alpha: float = 0.5) pyvista.PolyData[source]#

Construct a bounding box model of the model.

Parameters
model

A three dims model.

expand_dist

The length of space-model to be extended in all directions.

grid_num

Number of grid to generate.

key_added

The key under which to add the labels.

label

The label of space-model.

color

Color to use for plotting space-model.

alpha

The opacity of the color to use for plotting space-model.

Returns

A bounding box model.