Actually, you can also create a negative reinforcement parameter that punishes the algorithm when the curves intersect, which will also be an interesting way to achieve similar results, however if might take longer to converge into a solution!
Since you haven’t uploaded the script, I assume that one object does not fit inside the other:
if there is an intersect, the area is increased to a really large number:
You then try to minimise the summed area.
Yep that’s it! So simple and efficient
minimize bounding of 2 geometries.gh (17.2 KB)