Skip to content

Commit

Permalink
Update mesh.py's zero triangle area error message
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alec-flexcompute authored and tylerflex committed Jan 12, 2024
1 parent 06f46bf commit 11b8141
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tidy3d/components/geometry/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def _check_mesh(cls, val: TriangleMeshDataset) -> TriangleMeshDataset:
if not all(np.array(mesh.area_faces) > fp_eps):
raise ValidationError(
"The provided mesh has triangles with zero area. "
"Consider using 'trimesh.Trimesh.remove_degenerate_faces' to fix this."
"Consider using numpy-stl's 'from_file' import with 'remove_empty_areas' set "
"to True and a suitable 'AREA_SIZE_THRESHOLD' to remove them."
)
if not mesh.is_winding_consistent:
log.warning(
Expand Down

0 comments on commit 11b8141

Please sign in to comment.