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
edges
bool
Yes
Show the edges of the displayed mesh elements. Set to False to display the mesh without element edges.
domain
int | list[int] | None
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
None
Boundary IDs identifying the surfaces to display. Only triangular elements belonging to the selected boundaries are shown.
Output Arguments
plotter- Type
pyvista.PlotterPyVista 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
showis called before a mesh file is assigned.ResolutionLoad a mesh file before calling
show. tanager:meshmessage: ShowDomainBoundaryConflict - Condition
Both
domainandboundaryare specified.ResolutionSpecify either
domainorboundary, but not both. tanager:meshmessage: ShowEmptyDomainList - Condition
An empty list is assigned to
domain.ResolutionSpecify one or more valid domain IDs, or omit
domain. tanager:meshmessage: ShowEmptyBoundaryList - Condition
An empty list is assigned to
boundary.ResolutionSpecify one or more valid boundary IDs, or omit
boundary. tanager:meshmessage: ShowInvalidDomain - Condition
A specified domain ID is not present in the mesh.
ResolutionUse
mesh.domainto identify valid domain IDs. tanager:meshmessage: ShowInvalidBoundary - Condition
A specified boundary ID is not present in the mesh.
ResolutionUse
mesh.boundaryto identify valid boundary IDs.