Rationalizing Offsets Between Two Lines

Dear All,

I am required to maintain certain offsets off lines within a set corridor, however when the corridor is too narrow to maintain the offsets I’d like the lines to space themselves equally within this area then maintain the specific offset after this pinch point. Can anyone think of a method in Dynamo? I’m thinking it may be a job for an optimization algorithm as I can’t think of a conventional solution at present:

You could combine both the left and right side into a Polycurve, then use a Curve.PointAt_____ method to determine an equal number of points along each line, take the midpoint between any two points, and draw a spline/arc/line though those. Give it a shot and see where you get.