Model.hm_comparegetdistancecount#
- Model.hm_comparegetdistancecount()#
Returns the number of distances found. This must be preceded by a call to a relevant hm_compareentities function and
Model.hm_comparefinddistances().- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:numberOfDistances (int)
Example#
Find the number of transformations for the recursive comparison of surfs with IDs 1 - 20 and 101 - 120#import hm import hm.entities as ent model = hm.Model() surf1 = hm.Collection(model, ent.Surface, list(range(1, 21))) surf2 = hm.Collection(model, ent.Surface, list(range(101, 121))) model.hm_compareinit() model.hm_compareentitiesrecursive( source_surfaces=surf1, target_surfaces=surf2, tolerance=0.1, result_type=2, review_results=False, ) model.hm_comparefinddistances(max_distance=1.0, review_results=True) _, result = model.hm_comparegetdistancecount() num_distances = result.numberOfDistances print("num_distances", num_distances) model.hm_compareend()