From 1225e1707f7ee5ee73d06423f440980b4b0e5d23 Mon Sep 17 00:00:00 2001 From: Julian Suk Date: Tue, 4 Nov 2025 21:37:51 +0100 Subject: [PATCH] fix bug in triangles sanity check --- src/potpourri3d/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/potpourri3d/core.py b/src/potpourri3d/core.py index 19f46f6..0d11f83 100644 --- a/src/potpourri3d/core.py +++ b/src/potpourri3d/core.py @@ -16,7 +16,7 @@ def validate_mesh(V, F, force_triangular=False, test_indices=False): if force_triangular: if isinstance(F, np.ndarray) and F.shape[1] != 3: raise ValueError("faces must be triangular; dimensions should be Nx3") - elif not isinstance(F, np.ndarray) and all(len(polygon) == 3 for polygon in F): + elif not isinstance(F, np.ndarray) and any(len(polygon) != 3 for polygon in F): raise ValueError("faces must be triangular") if test_indices: