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:
  • points (hwTriple) – The list of x, y, z coordinates of the point.

  • surf_ids (hwIntList) – List of surface IDs.

Returns:

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)