Variable size points in a multipipe structure 2024

I have created a multipipe structure from a set of lines interconnected between them. In this network there are two types of channels, the vertical ones that are connected between them at the beginning and end of each line and the horizontal ones that connect the vertical lines right in the middle of each of them. What I am trying to do without success is to be able to configure a radi for each type of channel.

I have tried to apply methods already explained in this forum but I don’t get good results or it just doesn’t work.

Among what I have tried to apply are the following: (19.9 KB)

I have only been using grasshopper for 3 months, surely the code could be optimized much better.