Compare between 2 list containing points and remove unique one

Dears,

I created a custom node to create automatic dimension for every side of the room boundary.

But unfortunately some lines are divided in more than one segment.

By comparing the intersection points with the boundary points that should give me the unique points that should be removed from the boundary points to solve that issue.

I tried to compare between 2 lists , combine both lists in one and delete all duplicates or exclude the extra points to redraw the boundary again but it’s not working.

Hope you can help

Auto dimension-Python v1.dyn (10.5 KB)

If I understood you correctly, you need a List.UniqueItems node as shown below.

Hope this helps!

I think you might want to use the SetDifference node.

Thanks for the reply I tried to use both Set difference node and list.UniqueItems, however its supposed to give me only one point but I got more than 13 one

Point.PruneDuplicates perhaps?

Thanks everyone for your support, I was able to work it out using intersection and list map node.

But when I use the offset.curve node some lines goes in yz plane instead of xy.

Any suggestions Auto dimension-Python v1.dyn (14.8 KB)

UniqueItems is supposed to give quite a lot of output:
If your input would be: a,a,a,b,c,c,d,e,f,f,g,g
Your input would be a,b,c,d,e,f,g

Uniqueitems simply removes the duplicates.

With the SetDifference node it’s already only looking as if these were two unique item lists.

If the input into list 1 were to be a,a,b and the input into list 2 were just a, the output would just be b and not a, b. Next to that. It looks t the things that are in list 1 and aren’t in list 2, not the other way around. so if you were to put a,b into list 1 and a,c into list 2 the output would just be b.

To explain, could you give an example of what kind of inputs you’d give and what kind of outputs you’d want out of that.

Dear Paul thanks for explaining that, I really appreciate it.

The idea was to input list 1 a,b,c,d and list 2 a,b,c so the output would be (d) but will it work if the indices are not in the same order like a,b,c,d and c,b,a for example

In that case SetDifference should work. As I said earlier, do realize that it only picks the ones that are in list 1 and aren’t in list 2, not those that are in list 2 and aren’t in list 1.