Problems with creation of surface offset

When I create offsets from the surface inward, intersections appear that I cannot get rid of. I need a surface shifted inward to have a closed contour repeating the outer surface and not have intersections. When I create offsets outside the surface, they are also not closed, is it possible to make an adaptive offset that would close the edges of the surface when changing the Distance input?



Hello,like this?

OffsetBrep.gh (9.0 KB)