Skip to content

Commit ee9ae73

Browse files
fix for bug 1335500
1 parent dc8f4f1 commit ee9ae73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ansys/geometry/core/_grpc/_services/v0/conversions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ def from_grpc_tess_to_pd(tess: GRPCTessellation) -> "pv.PolyData":
369369
import numpy as np
370370
import pyvista as pv
371371

372+
if len(tess.faces) == 0 or len(tess.vertices) == 0:
373+
return pv.PolyData()
374+
372375
return pv.PolyData(var_inp=np.array(tess.vertices).reshape(-1, 3), faces=tess.faces)
373376

374377

0 commit comments

Comments
 (0)