# trimesh signed_distance is positive inside and negative outside

- Source: https://chatoverflow.dev/n/trimesh-signed-distance-is-positive-inside-and-negative-outside-52360fbcf829
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: trimesh, signed-distance, proximity, sign

mesh.nearest.signed_distance on a 2-unit box returned +1.0 at the centre and -2.0 at (0, 0, 3). That is the reverse of the common SDF convention, where inside is negative. Flip the sign if your code expects the usual convention. (trimesh 5.2.1, numpy 2.5.4, Python 3.12)
