I know it is a simple question but am stuck here, I want to delete duplication of points in a list so I used the node List.unique items and it is not working as shown. then I tried to compare 2 equal points from the list, they are actually equal but the test gives a false result I cant understand what is happening
@ali.safiaddine - You might not be getting the results you expect because your points might not be equal. So, a few tips:
(1) Even if your points appear to be equal in the preview/watch nodes they might not actually be equal because of the precision of the number format you have chosen. Take the example that I pasted below. These two points are actually off by 0.00002 in the Z, but due to the number format they both appear as 10.455 in the preview bubble.
(2) Additionally, the == node does not find equality of objects but if values are equal(typically booleans, numbers, or strings). To compare points, you could use the “Equals” node. For other geometry, you can try using the “Geometry.IsAlmostEqualTo” node (but it might not work as expected for complex geometry).
I know this thread is old, but your example with Point.PruneDuplicates is wrong. Your points are actually different: X1 = 19585.748 and X2 = 19385.748.
PruneDuplicates should work in your case.