solidipes.loaders.pyvista_mesh module

solidipes.loaders.pyvista_mesh.DEFAULT_DATA_ID = '_'

data name given to implicitly added arrays

class solidipes.loaders.pyvista_mesh.PyvistaMesh(**kwargs)[source]

Bases: File

Mesh file loaded with pyvista

add_cell_data(array, name)[source]
add_point_data(array, name)[source]
property cell_data_names
copy_pyvista_data_to_collection()[source]

Add pyvista data to data collection

property data_info

Trigger loading of Pyvista mesh and return info

default_viewer

Fully loaded pyvista mesh

get_cell_data(name)[source]
get_point_data(name)[source]
get_warped(data_id, factor=1.0)[source]

Returns another PyvistaMesh with the mesh points displaced by the given data.

Parameters:
  • data (string) – Name of point data. If data is 1D, the mesh is warped along its normals. Otherwise, the data must have the same number dimensionality as the mesh.

  • factor (float) – Factor to multiply the displacements by. Defaults to 1.0.

property mesh
property point_data_names
property pyvista_mesh
remove_cell_data(name)[source]
remove_point_data(name)[source]
set_cell_values(data_id)[source]

Sets the cell values for plotting to the given data.

Parameters:

data (string) – Name of cell data.

set_point_values(data_id)[source]

Sets the point values for plotting to the given data.

Parameters:

data (string) – Name of point data.

supported_mime_types = {'meshing/AVS': 'avs', 'meshing/GMSH': 'msh', 'meshing/StepFile': 'stl', 'meshing/VTK': ['vtu', 'pvtu', 'vtk']}

List of supported mime types. Override in subclasses.

solidipes.loaders.pyvista_mesh.get_cell_data_from_id_or_array(func)[source]

Decorator to give either data_id or array to method accepting data_id

solidipes.loaders.pyvista_mesh.get_point_data_from_id_or_array(func)[source]

Decorator to give either data_id or array to method accepting data_id