# Matching Lists by only X,Y coordinates

Hi everyone,

I have 2 lists of points and I’m trying to find a way how to compare these two by only X & Y coordinates (both lists have different Z values).

Let’s say I have two lists of points:

List1
Point (0,0,1)
Point (1,1,1)
Point (2,2,1)
Point (3,3,1)
Point (4,4,1)

List2
Point (0,0,2)
Point (1,1,2)
Point (2,2,2)
Point (3,3,2)

Output should be items from List1:
Point (0,0,1)
Point (1,1,1)
Point (2,2,1)
Point (3,3,1)

Any ideas? I have a headache at this moment and can’t really solve this by myself.

Thanks.

*I have tried to compare these lists by changing Z value to 0 and it worked out, but in the end of the day I was stuck while trying to get the right Z values back.

Here is a example:

Points check.dyn (30.4 KB)

Thanks, @architectcoding. I need to test it out with my inputs.

Could you please shortly introduce these nodes that contains python script?
It’s pretty much straight forward, but I need to make sure I got it right.

Is it possible to use Code Block instead?

I think I did it. Seems like everything works as I wanted.
Thank you for your input here. I will mark your post as a solution.

1 Like