[Grasshopper] How to use Cull Duplicates to remove duplicate points

[Grasshopper] How to use Cull Duplicates to remove duplicate points Grasshopper component EN

This article explains how to use Cull Duplicates to remove duplicate points.

Cull Duplicates1
Cull Duplicates2

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


↑Youtube Channel

Delete overlapping points

Cull Duplicates can be used to remove overlapping points or points that are very close together.

The points we will use this time

The points we will use this time

In this article, we will use these points this time

Basics of Cull Duplicates

Cull Duplicatesの基本
Click to Zoom

Components used: (1) Point (2) Cull Duplicates

First, let’s look at the basics of Cull Duplicates.

Cull Duplicates(P) on the left side is used to connect data containing multiple points.

In this case, multiple points are set in Point.

Cull Duplicates(T) is used to input tolerance values, details of which will be explained later in this section.

Cull Duplicates(P)
Click to Zoom

Cull Duplicates(P) on the right side outputs point data after duplicate points have been deleted.

As shown in the image above, two overlapping or very closely located points have been reduced to one.

I端子とV端子
Click to Zoom

Cull Duplicates(I) outputs the original Index number or -1.

-Except for -1, you can see that the Index number is output, surrounded by a black border.

If the number is -1, the numerical value of the coordinates of that point is averaged among the nearby coordinates and changed.

Cull Duplicates(V) displays 1 if the point is not related to the deleted points.

Conversely, if it was related, it will display 2.

How to delete three types of points

How to delete three types of points
Click to Zoom

Cull Duplicates has three different ways to delete points.

By right-clicking on Cull Duplicates, you can set it to one of the three, “Leave One,” “Cull All,” or “Average.

Initially, it is set to Average.

Leave One

Leave One
Click to Zoom

By setting to “Leave One,” you can leave only the first point in the list among the duplicate points.

In the image above, the red border is the duplicate point.

And the blue area is the first point that will eventually remain.

Cull All

Cull All
Click to Zoom

By setting Cull All, all duplicate points can be removed.

In this case, all duplicate points circled in red are eventually removed.

In the other settings, one point is output, but in this case, neither of the duplicate points are output.

Average

Average
Click to Zoom

The Average setting outputs a point that is the average of the coordinates of the overlapping points.

Since the coordinates of two points are averaged, a single point is output as a result.

In the case of the image above, a point {1,0,0} is output since 1,0,0 at the same coordinates are the same when averaged.

Furthermore, in the case of {0,0,10} and {0,0,10.1}, a point with coordinates {0,0,10.05} averaged is output.

Set the numerical value of Cull Duplicates(T) and set the tolerance.

T端子の数値を設定し、許容値を設定する
Click to Zoom

Tolerance values can be set by setting the numerical value of Cull Duplicates(T).

Once the tolerance value is set, you can set how much deviation is considered a duplicate.

In the case of the image above, 0.5 was entered for Cull Duplicates(T) and the tolerance was set to 0.5.

Then, if the distance is within 0.5, it is now considered a duplicate.

Therefore, 1 and 1.3 and 0.5 and 0.52, which were not removed earlier, are now reflected.

List of Grasshopper articles using Cull Duplicates component↓

Comment

Translate »