Model.hm_getdistancefromnearestline#
- Model.hm_getdistancefromnearestline(points, lineList)#
Gets the distance of the given point from the nearest line with IDs specified as arguments.
- Parameters:
points (hwDoubleList) – The list of x, y, z coordinates of the point.
lineList (hwIntList) – List of line IDs.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:closestLineDist (double) - the distance to the closest line
line (Entity) - the ID of the closest line
Examples#
Get closest to the point with coordinates ( 10 , 20 , 30 ) point on the line with ID 13#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getdistancefromnearestline(points=[10.0, 20.0, 30.0], lineList=[13]) print("closestLineDist", result.closestLineDist) print("line", result.line)
Get closest line from the set with IDs 13 14 15#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getdistancefromnearestline(points=[10.0, 20.0, 30.0], lineList=[13, 14, 15]) print("closestLineDist", result.closestLineDist) print("line", result.line)