I have a mesh of triangles stored in numpy. Some triangles are duplicates and I want to remove them. An example of my numpy array:
# Some points
a=(-2,-2,0)
b=(1,-2,0)
c=(1, 1,0)
d=(-2,1,0)
e=(-2,-2,1)
f=(1,-2,1)
g=(1,1,1)
h=(-2,1,1)
# Some triangles
t1=(a,b,c)
t2=(c,d,a)
t3=(e,f,g)
t4=(g,h,e)
# The numpy array with duplicated t1 and t3
points=numpy.array([t1,t2,t3,t4,t1,t3])
I tried using intersect1d and unique but could not figure out a way to remove all triangles which occure more than once. What am I missing?