Input: straight lines which are connected with each other at start and end points.
Goal: Extrusion of a circle starting in the center (perp frame) of each line towards the endpoint of that line, not intersecting the other extrusions.

I don’t think there’s any need for iterative solving like Kangaroo here.
For a pair of connected lines, you can get the distance you need to offset cylinders by so they don’t overlap using radius over Tan of half the angle between the lines.

Thx. In 2d I’ve used this solution before were 2 edges formed an angle. But in a 3d situation, I think an iterative solution would be preferable. Because 3 or more edges will affect each other. In some situations when 2 or 3 ends are calculated the fourth one has a big gap. I would like to minimize these gaps as another kangaroo goal if possible. Therefor I hoped it would be possible to calculate the best possible solution in order to minimize these gaps. The maximum extrusion is upon the end of the line or upon another extrusion. (collision).

There aren’t any edges with priority. I want to minimize the gaps between one and another. If 3 comes together it is quite ok. But with a fourth or fifth one there will be gaps between some of the tubes. The corners will be welded later on and therefore they need to be as close as possible together.

Won’t this pose a real challenge during assembly because you will have to copy the exact positions of the rods otherwise the geometry would get changed?

Might be better to offset the ends of the rods by the same amount and weld a ball bearing at the ends?