The same as “ShrinkTrimmedSrf” in rhino.
Extending the surface with c# would result into the original untrimmed surface, extended.
(People probably use plugins for this kind of stuff… )
if your new surface have 4 borders, it’s doable.
If it is a pentagon or such, that’s a problem.
Usually I use grasshopper to pick multiple edges (tangent each-other) to make a new single surface that have theirs normals, thus making it possible to use commands like NurbSurface or loft.
Edit:
related Using polysurfaces-edges as a single edge