Skip to main content

Mesh.show

Description​

Visualizes a finite-element mesh in an interactive three-dimensional view, allowing its structure and individual regions or boundary surfaces to be inspected.

By default, the entire volume mesh is displayed. Domain IDs can be used to display selected three-dimensional regions, while boundary IDs can be used to display selected surface elements. The displayed elements are colored according to their mesh IDs.

Mesh edges can be shown or hidden to examine the element structure or obtain a clearer view of the selected geometry.

Syntax​

obj

obj A Mesh object containing the finite-element mesh.

plotter = obj.show()

plotter = obj.show() Displays the entire volume mesh with element edges.

plotter = obj.show(property_name = property_value)

plotter = obj.show(property_name = property_value) Displays the volume mesh under specified condition.

Input Arguments​

NameTypeRequiredDefaultDescription

edges

bool

Optional

Yes

Show the edges of the displayed mesh elements. Set to False to display the mesh without element edges.

domain

int | list[int] | None

Optional

None

Domain IDs identifying the three-dimensional regions to display. Only tetrahedral elements belonging to the selected domains are shown. If omitted, the entire volume mesh is displayed.

boundary

int | list[int] | None

Optional

None

Boundary IDs identifying the surfaces to display. Only triangular elements belonging to the selected boundaries are shown.

Output Arguments​

plotter

Type pyvista.Plotter

PyVista Plotter containing the displayed mesh, which can be used for further visualization customization.

Examples​

mesh.show(domain=[2, 3], edges=False)
mesh.show(boundary=1)

Notes​

domain and boundary cannot be specified together because they select different element types.

Use mesh.domain and mesh.boundary to inspect the available IDs before selecting regions or surfaces for visualization.

Errors / Exceptions​

Error / Exceptions List
tanager:meshmessage:EmptyMeshFile
Condition

show is called before a mesh file is assigned.

Resolution

Load a mesh file before calling show.

tanager:meshmessage:ShowDomainBoundaryConflict
Condition

Both domain and boundary are specified.

Resolution

Specify either domain or boundary, but not both.

tanager:meshmessage:ShowEmptyDomainList
Condition

An empty list is assigned to domain.

Resolution

Specify one or more valid domain IDs, or omit domain.

tanager:meshmessage:ShowEmptyBoundaryList
Condition

An empty list is assigned to boundary.

Resolution

Specify one or more valid boundary IDs, or omit boundary.

tanager:meshmessage:ShowInvalidDomain
Condition

A specified domain ID is not present in the mesh.

Resolution

Use mesh.domain to identify valid domain IDs.

tanager:meshmessage:ShowInvalidBoundary
Condition

A specified boundary ID is not present in the mesh.

Resolution

Use mesh.boundary to identify valid boundary IDs.