9 lines
295 B
Python
9 lines
295 B
Python
import numpy as np
|
|
import pymesh
|
|
|
|
|
|
def surf2surf(V1, F1, V2, F2):
|
|
me1 = pymesh.form_mesh(V1, np.array(F1, np.int32))
|
|
me2 = pymesh.form_mesh(V2, np.array(F2, np.int32))
|
|
return pymesh.distance_to_mesh(me1, me2.vertices)[0].mean() + pymesh.distance_to_mesh(me2, me1.vertices)[0].mean()
|