get_closest_pt_index

compas_slicer.utilities.get_closest_pt_index(pt, pts)[source]

Finds the index of the closest point of ‘pt’ in the point cloud ‘pts’.

Parameters:
  • pt (compas.geometry.Point3d)

  • pts (list, compas.geometry.Point3d)

Returns:

int – The index of the closest point