Join lines

Hi,
I’m trying to join couple of lines in to one polyline curve using Grasshopper. Is there a way to join lines only if the angle between them is larger than some limit?

Join all the lines into one polyline. Use Kangaroo 2’s Split At Corners component which “Breaks a polyline into mulitple parts by angle”. If you have Rhino 6 then Kangaroo 2 is already installed.

Thanks a lot for an answer! It works great for a situation like that.
I tried to apply it also to a more complicated situation where there is more than one line joining at the same node. So they wont join in to one polyline. By a human judgement it’s easy to tell which lines should be joined and which not but I’m struggling to achieve it with Grasshopper: