1313import diffCheck
1414from diffCheck import diffcheck_bindings
1515from diffCheck import df_cvt_bindings
16+ from diffCheck import df_error_estimation
17+
1618import diffCheck .df_util
1719
1820class CloudToMeshDistance (component ):
@@ -28,6 +30,9 @@ def RunScript(self,
2830 :param i_cloud_target: target point cloud to align to
2931
3032 :return o_distances : list of calculated distances for each point
33+ :return o_mse: the average squared difference between corresponding points of source and target
34+ :return o_max_deviation: the max deviation between source and target (Hausdorff Distance)
35+ :return o_min_deviation: the min deviation between source and target
3136 """
3237 if i_cloud_source is None or i_cloud_target is None :
3338 ghenv .Component .AddRuntimeMessage (RML .Warning , "Please provide both objects of type point clouds to compare" )
@@ -38,9 +43,12 @@ def RunScript(self,
3843 df_cloud_target = df_cvt_bindings .cvt_rhcloud_2_dfcloud (i_cloud_target )
3944
4045 # calculate distances
41- o_distances = cloud_2_mesh_distance (df_cloud_source , df_cloud_target )
46+ o_distances = df_error_estimation .cloud_2_cloud_distance (df_cloud_source , df_cloud_target )
47+ o_mse = df_error_estimation .compute_mse (df_cloud_source , df_cloud_target )
48+ o_max_deviation = df_error_estimation .compute_max_deviation (df_cloud_source , df_cloud_target )
49+ o_min_deviation = df_error_estimation .compute_min_deviation (df_cloud_source , df_cloud_target )
4250
43- return o_distances
51+ return o_distances , o_mse , o_max_deviation , o_min_deviation
4452
4553
4654if __name__ == "__main__" :
0 commit comments