Model.hm_getdistancefromnearestsurface#
- Model.hm_getdistancefromnearestsurface(points, surf_ids)#
Gets the distance of the given point from the nearest of the surfaces with IDs specified as arguments.
- Parameters:
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:closest_surf_dist (double)
surf_id (int)
Examples#
Get closest to the point with coordinates ( 10 , 20 , 30 ) point on the surface with ID 13#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getdistancefromnearestsurface(points=[10.0, 20.0, 30.0], surf_ids=[13]) print("closestLineDist", result.closestLineDist) print("surf_id", result.surf_id)
Get closest surface from the set with IDs 13 14 15#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getdistancefromnearestsurface(points=[10.0, 20.0, 30.0], surf_ids=[13, 14, 15]) print("closestLineDist", result.closestLineDist) print("surf_id", result.surf_id)