Group lines parallel to each other

I found this topic Group Parallel Lines by Direction and Distance
But i want to group lines parallel to each other, and don’t care about the length, anyone there can help with that? :slight_smile:

Hi @nichlas.aa.holm,

There is a Group Parallel Lines custom node in the Genius Loci package.

1 Like

Hi @nichlas.aa.holm ,

You could also get the direction of the lines using the Line.Direction node. Then use those values as the keys in a List.GroupByKey node (together with the lines themself).

PS: It could be that rounding of those values is necessary.

It seem to work, but how does i round a vector?? :slight_smile:

I tried that node, its don’t work. It just return “null”, without any error message.

You could use the Vector.AboutAxis node to measure your vectors against the X-Axis, revolving around the Z-axis. This should result in doubles from 0-360.

1 Like

I have found the dot product to be the most efficient way of doing this. Use vector.dot node and group by key.

3 Likes

Hello, you can try with node element get rotation, if you have problem with goup parallel line

Cordially
christian.stan

1 Like