from my past I remember, that we have used coordinate systems in both parts to assemble them with one CS connection.
This is deceptively simple - an axial alaign and a tangent relationship is all that is required.
In part1, I have created new CSYS (oriented as the cutout) and sketch (defining the highest point of the edge of the hole) just for a reference. With this additional geometry, I have then created new plane. When in assembly, I used that plane for mating.
See the attached parts and assembly to see, how I have done this.
There is also no interference between two parts.
The important thing with solving this problem is, to find the highest point of the edge of the hole.
If you still need a movie, let me know.
And also answer to MF.
Rotate a bit more your assembly and you will see, that the part5 is well above the hole in part1. The idea is, that part5 is as close as possible to the edge of the hole.
Given the way in which the hole is cut through the dome my solution is the correct one. If you try to bring the flange top any closer you will have interference between the two parts. Which is why I ran the interferance check.
Even though the subject has an acceptable solution, I will explain my example.
I haveuploaded a movie to youtube:
At the start of the movie, I am just showing, that tangent relationship is giving the proper solution with no intereference. But the parts could be closer to each other.
This is why I was constructing new plane. And if I just select the silhoutte points, this will not be 100% correct. The problem is, that the plane, that goes just through silhouette points, is not perpendicular to the cutout direction.
In the movie you can see, that I have constructed new CSYS. Z-axis is pointing in the direction of the cutout1. Then, I have constructed new sketch14. You can see (at 1:33), that I have created two lines to show the difference in the peak point. You can clearly see, that there is a gap between the endpoint of vertical line and the tangent line. So vertical line is not the correct one in this case.
This is why I have constructed the new plane, using the tangent line.
When positioning the second part with this new plane, there is no interference. And when measuring the minimum distance between parts, it is 0,00mm.