Parallel Line Grouping

Hi Guys,

I have been trying so hard replicating one of the scripts that I found to group parallel lines, but I can’t figure out what is going wrong when I am comparing vectors.

Parallel lines.dyn (40.6 KB)


Jonas Blazinskas

I think you’d be better off using the absolute value of the vector components after rounding. Then everything will be in the same direction and you don’t have to worry about direction anymore.

I don’t want to misslead you, but I think u can find a cleaner workaround with the Vector.IsParallel node. Setting it to cross product lacing, it will return a list for each vector. This will save you the Round nodes:

I would go with the angle from the canonical X axis rather than looking at the X, Y and Z factors. One comparison is faster than many, and arithmetic is faster than geometry. :slight_smile:

1 Like