Skip to content

Commit b55def1

Browse files
authored
Exception to plot MeshesContainers (#1491)
1 parent a9d68bb commit b55def1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ansys/dpf/core/meshes_container.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def plot(self, fields_container=None, deform_by=None, scale_factor=1.0, **kwargs
105105

106106
random_color = "color" not in kwargs
107107
for mesh in self:
108+
if mesh.nodes.n_nodes == 0:
109+
continue
108110
if random_color:
109111
kwargs["color"] = [random(), random(), random()]
110112
pl.add_mesh(

0 commit comments

Comments
 (0)