Edited :WIP Code below updated with corrected geo outputs but not working Indexes yet
Ok that’s interesting moving the return gives me a long list of indices, even when both list are the same.
I think my issue is the nesting levels where i am trying to get the unique indices of each geo list only.
The way i have been testing this is cull one item from one list or the other and or jittering one list so the order changes and it has to search further for duplicates but this in-turn makes the loop run longer.
import Rhino.Geometry as rhg
def RemoveDuplicates(geoA, geoB):
index_A =[]
index_B =[]
for i in reversed (range(len(geoA))):
geo = geoA[i]
for j in reversed(range(len(geoB))):
other = geoB[j]
dup = rhg.GeometryBase.GeometryEquals(geo,other)
if (dup == True): geoA.RemoveAt(i),geoB.RemoveAt(j)
else:index_A.append(i),index_B.append(j)
return geoA, geoB , index_A, index_B
unique_A, unique_B, index_A, index_B = RemoveDuplicates(geoA,geoB)