Replace point in a list with null if point is found in another list of points

I need a way to replace points in a list with a null item, if the point (with a tolerance) is found in another list of points and keep the list order and structure.

Points.PruneDuplicates+ from the Springs Package doesn’t work for this situation, because it does not keep the list order.
OOTB Point.PruneDuplicates does not replace/remove both points.
OOTB Geometry.DoesIntersect has no tolerance and some duplicate points are not found.

Anyone a good idea?

Thanks :slight_smile:

Python is the easiest solution for these types of problems. Just keep a list of AlreadyUsed points to compare against.

Hope this helps you build a graph that suits your requirement

replaceWithNull.dyn (12.0 KB)

3 Likes

@Vikram_Subbaiah Thank you!!! works like a charm :slight_smile:

I have changed it a bit: instead of the null item I had to remove the points on the list, because there was a problem with null in a node further downstream.

1 Like