Can´t identify colinears curves

Hi all!
I’m strugling with a graphic to get room boundaries and generate finish walls from them. I can get the lines and create walls easily. The thing is I want to clean the results a bit as some boundaries are made of some colinear segments. I want to make this segments as one line so the wall doesn’t get divided where could be only one straight wall.
I collected the boundaries and grouped them by it’s normalized vectors. After that i want to determine if these lines share the startpoint or the end point to be sure they are colinears and not just paralell lines.
I’ve made a node using design script that looks is working but the results are worng and I can’t figure out why.


this is de design script. cont1 and cont2 are lists of start and end points respectively.

On the right side watch node are the results. The other watch nodes are the lists fed to the design script node. As you can see I get all false results in the third sublist despite the point in list 2 being in list 1. (z coordinates are all 0,0).
Any idea of what I’m doing wrong?
Thank you in advance.

I’ve made a test with simpler lists and as far as i can see the code works:


It’s the same code and same list structure. Don’t know what’s happening.

edit: This test made think about decimal places of the points coordinates and if what dynamo is not showing could cause the error. Put a round node after the points and… it works!!


1 Like