The 2d case is simple. You generate the segments. You find the intersections. Then you can easily outline the shape of the connecting joint in the 2d embedded graph. However, in 3d or n-d with a whole new variety of directions (corridors from above and bellow), it is more complicated and I'd like to hear some advice. The corridors themselves are simple. The challenge is the "connecting room" between them (you can imagine that room as convex hull of the red in blue dots). This is the goal here.
One way to overcome this, is using voxels and then leaving only the exterior of the connected corridors. This is not optimal however. Is there any simply way to generate the room in the center without complex binary operations?