[Grasshopper] How to use Closest Points to get multiple points closest to a specified point

[Grasshopper] How to use Closest Points to get multiple points closest to a specified point Grasshopper component EN

This article explains how to use Closest Points to get multiple points closest to a specified point.

Closest Points1
Closest Points2

On the Grasshopper, it is represented by either of the two above.


↑Youtube Channel

Retrieve multiple points closest to a specified point

Using Closest Points, you can retrieve multiple points closest to a specified point.

Retrieve multiple points closest to a specified point

Components used: ①Point ②Closest Points

a specified point
multiple points

This time, the reference point for finding points and the multiple points to be found are each set in Point.

近くの複数の点

Connect the reference point to the Closest points(P).

Furthermore, connect the Point of the multiple points being searched to the Closest Points(C).

Furthermore, connect the number of points to be acquired to Closest Points(N).

This time, we are connecting the two.

Then, as shown in the image above, we were able to obtain two points close to the reference point.

change the value of Closest Points(N)

Let’s change the value of Closest Points(N) to 10.

obtain the 10 points closest to the reference point

Then, as shown in the image above, we were able to obtain the 10 points closest to the reference point.

In this way, using Closest Points allows you to retrieve multiple points closest to a specified point.

Output data

Let’s take a look at the data output from Closest Points.

Output data

The acquired point data is output from Closest Points(P).

Closest Points(D) outputs the distance from the reference point to the acquired point.

Closest Points(i)

Additional Component: ①List Item

Closest Points(i) outputs the index numbers of the multiple points found.

Connect the Point of the multiple points that were searched to the List Item(L).

Furthermore, connect Closest Points(i) to List Item(i).

the points obtained earlier were displayed

Then, the points obtained earlier were displayed.

Thus, List Item(i) outputs the index numbers of the multiple points found.

List of Grasshopper articles using Closest Points component↓

Comment

Translate »