Comparing line geometry

Hi all,

I’m trying to group structural framing by geometry on plan for tagging purposes further down the line. I have a python node that compares the x & y coordinates of the beams to determine whether the beams are vertically aligned, horizontal aligned or sloped on plan.

This seems to work fine and when I use the list.GroupbyKey I’m able to group the lines in these 3 groups. The problem occurs further down the graph when I try to map these groups to the beams.

I’ve tried using == node to filter out Boolean mask and I’ve also tried the “isalmostEqualTo” node and both give me results I’m not expecting. They both give me 2 true values when I’m expecting 4. I’ve even tried converting the object to string and comparing them that way and it still doesn’t behave.

Please see snippet below I’ve also attached the script.

Any help would be greatly appreciated.
LINE TEST.dyn (20.4 KB)

Thank you


It’s ok I’ve sorted it, I’ve made a work around instead of putting a list of geometry in the list.groupbyKey I put the elements directly in and that’s sorted them by alignment.