Match Rebar and its point

Hi there,
I am trying to finish my Script related to Rebar and stuffs.
The situation is like this: I have list of rebars (4 in this case), I got the curves out from them (4 curves), got the Middle points (4 points), did some filters and ended up with only 2 points.
The problem is now I cannot tell Dynamo which points belong to which Rebar, I know it’s hard for Dynamo to handle this case but i am totally new with Python. Is there any way to get the right result?
Thank you guys for helping me out.

Use the same filter you used on the points to filter rebar elements as well.

Hi, thank Jacob. Unfortunately we cannot go that way. I am thinking about Filter.is.on.curve? but haven’t firgured out.

Why not? Can you post your entire graph by camera export?

Hi Jacob,
Thank you for following the topic. I actually changed the way I use the script and it worked, thank you for your suggestion.