Generate Glass Tubes from any Surface

Hello everyone, might you know the best process to be able to generate these curve profiles from any surface. As I am struggling to remodel manually Everytime the radius of the glass needs to be changed and the spacing between one and the other. Would appreciate any input on the best way to tackle it

鼓起来的灯罩 v0.1.gh (116.3 KB)
Apply it to any untrimmed surface.
No plugin needed.

When this number is 0.5, the shape will be perfect half circle.