Skip to content

Commit 11b8141

Browse files
alec-flexcomputetylerflex
authored andcommitted
Update mesh.py's zero triangle area error message
The current error message suggests using a function in Trimesh that will be deprecated in March 2024, and using it now results in some weird errors. The alternative suggestion I'm works.
1 parent 06f46bf commit 11b8141

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tidy3d/components/geometry/mesh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def _check_mesh(cls, val: TriangleMeshDataset) -> TriangleMeshDataset:
5959
if not all(np.array(mesh.area_faces) > fp_eps):
6060
raise ValidationError(
6161
"The provided mesh has triangles with zero area. "
62-
"Consider using 'trimesh.Trimesh.remove_degenerate_faces' to fix this."
62+
"Consider using numpy-stl's 'from_file' import with 'remove_empty_areas' set "
63+
"to True and a suitable 'AREA_SIZE_THRESHOLD' to remove them."
6364
)
6465
if not mesh.is_winding_consistent:
6566
log.warning(

0 commit comments

Comments
 (0)