Assume that there’s 2 classes of tubes: the main ones and the connectors.
Assume that main tubes have radii R and the connecting ones have radii r. Assume that the coupler requires a distance D. Use some rational “separation” distance delta as well.
Define rnd pts (with various ways: plain random, using “spots”, using some container, using attractors etc etc) and then define main tubes in rnd directions (as far as their min dist - VS all the previous sampled - is > 2*R + delta).
Using various options define connector tubes (as far as any connector axis has a min dist VS all main tube axis > R+r+D+delta and VS all previously sampled connectors > 2*r + delta). If you want a rigid Graph/Truss then things become complicated since rigid means tetrahedra on a per main tubes pair basis (i.e. 2 edges are main tubes axis [with valid dir angles] and the rest 4 are connectors axis). Tetrahedra means far more clash checks for the items used.
If you want some realistic couplers - for obvious reasons - you’ll need to use Instance Definitions (2: one for the coupler half part attached to the main tube and the other for the coupler half part attached to the connector tube) placed via classic Plane To Plane Transform.
If you want an interactive solution (GH is NOT interactive on a per item basis by any means) then you need to swap persistent/volatile tube axis data (stored in a parameter accesed by name) each time that you pick any tube (by index) and define a translation on a start/end pt.
If you relay on fate … just re-execute the solution and use a parameter also accesed by name (persistent data) to store any variation you like (meaning a history of your previous attempts).
Level in C# required for all the above: mid to expert (for 1 and 2).
Here’s a simple (and quite naive … since couplers are far more complicated in real life) coupler demo (t on the white tube axis is steady while t on the blue tube axis grows from 0.2 to 0.8 - connectors are extended acc the extend value [ spot the bools related with reverseDy1/2 direction Vectors]):
BTW: for a minimum rational coupler definition you’ll need these params: