Closest_points_points missing from compas


#1

Previous versions of compas included a closest_points_points function within compas.numerical to return the shortest distances between two sets of points. Has this function been removed permanently from the framework?


#2

Maybe a question for Tom on where it went, but the same functionality can be achieved with:

from scipy.spatial.distance import cdist

from numpy import argmin

ind = argmin(cdist(X, Xt), axis=1)

ind will then be the indices of the closest points for each point.


#3

the function that used to be in compas.numerical (closest_points_points) is now in compas.geometry and has been renamed to closest_points_in_cloud_numpy.

it has been decided that functions are no longer grouped into compas.numerical, simply because they depend on Numpy/Scipy --that is what the suffix _numpy is now for.

instead, functions are now defined/made available where it makes the most sense: it is a distance function and has therefore been added to compas.geometry…


#4

admittedly, the new name deviates from the typical naming conventions…