Split curves

unhandled

(David S. Mavrov) #1

I have crazy problem spliting lines or curves. I need to split multiple lines and curves at their intersection points. I need a solution which works for variety of angles between the lines. I need to keep all the lines in their respective branches also. Nothing I have read or tried has achieved this result so far. The only thing which works is creating a surface and them spliting it and extracting the lines this way. However this takes so much computational time that for very large files it takes up to 10 min. Same data could be split in Rhino in seconds.

Split Curves.gh (40.9 KB)


(David S. Mavrov) #2

This does the trick, but I can’t seem to sort my curves back into their coresponding branches or better still… keep the tree structure as it is.

Split Curves_v2.gh (46.4 KB)


#3

Like this?

Split Curves_v2_re.gh (52.8 KB)


(David S. Mavrov) #4

Damn… yes! Ok, I have no idea how to sort the data like this. Very nice trick. I need to study this method very well. HS_Kim for the win!


(David S. Mavrov) #5

Then why there is a problem here?
Maybe the best option is to somehow make this without flattening the tree. But I have zero idea how to do that…

ShatterMultiple_re.gh (14.9 KB)


(David S. Mavrov) #6

Actually, I found a fix. I just need to move the initial geometry on a given vector, pass it trough the solution and then move it in back in th eopposite direction and all works like charm. Thank you again!

Can you explain why grouping the result does the trick when we unflatten the tree? I can’t understand the logic behind it.


#7

When if you are to use Unflatten Tree, The item counts between Input “T” and guide input “G” should be identical…
That’s why the Groupappeared on the scene in this case…