diffCheckOrg / diffCheck

diffCheck is a CAD-integrated tool for evaluating digital timber fabrication processes.
GNU General Public License v3.0
1 stars 1 forks source link

Removing signed distance for cloud-to-cloud #32

Closed 9and3 closed 2 weeks ago

9and3 commented 2 weeks ago

As suggested by @eleniv3d in #31 I removed the signed distance from cloud-to-cloud distance since it only makes sense for mesh-cloud computation (water tight and distinction between inside/outside). The use case is changed as such:

#! python3

import diffCheck
from diffCheck import diffcheck_bindings
import diffCheck.df_cvt_bindings
import diffCheck.df_geometries

df_mesh = diffCheck.df_cvt_bindings.cvt_rhmesh_2_dfmesh(i_rh_mesh)
df_cloud = diffCheck.df_cvt_bindings.cvt_rhcloud_2_dfcloud(i_rh_cloud)

mesh_to_cloud_distances = df_mesh.compute_distance(target_cloud=df_cloud, is_abs=True)
print(f"Max distance mesh-to-cloud: {max(mesh_to_cloud_distances)}")
print(f"Min distance mesh-to-cloud: {min(mesh_to_cloud_distances)}")

cloud_to_cloud_distances = df_cloud.compute_distance(target_cloud=df_cloud)
print(f"Max distance cloud-to-cloud: {max(cloud_to_cloud_distances)}")
print(f"Min distance cloud-to-cloud: {min(cloud_to_cloud_distances)}")