@@ -38,11 +38,9 @@ def trimesh_geodistance(M, source, method="exact"):
3838 V , F = M
3939 V = np .asarray (V , dtype = np .float64 )
4040 F = np .asarray (F , dtype = np .int32 )
41- if method == "exact" :
42- return _geodistance .trimesh_geodistance_exact (V , F , source )
43- if method == "heat" :
44- return _geodistance .trimesh_geodistance_heat (V , F , source )
45- raise NotImplementedError
41+ # Extract single integer from source array if needed
42+ source = int (source ) # Ensure it's a scalar
43+ return _geodistance .trimesh_geodistance (V , F , source , method )
4644
4745
4846@plugin (category = "trimesh" )
@@ -80,8 +78,4 @@ def trimesh_geodistance_multiple(M, sources, method="exact"):
8078 V = np .asarray (V , dtype = np .float64 )
8179 F = np .asarray (F , dtype = np .int32 )
8280 sources = np .asarray (sources , dtype = np .int32 )
83- if method == "exact" :
84- return _geodistance .trimesh_geodistance_exact_multiple (V , F , sources )
85- if method == "heat" :
86- return _geodistance .trimesh_geodistance_heat_multiple (V , F , sources )
87- raise NotImplementedError
81+ return _geodistance .trimesh_geodistance_multiple (V , F , sources , method )
0 commit comments