I've got a difficult problem, which I tried to solve for a while now.
I simpliy want to extrapolate uv coordinates.
For example I have a mesh which has a part which is textured and a connected part, which is not. The untextured part has no uv coordinates. Now I want to extrapolate the uv coordinates to that part, so I can texture it too.
The following images show what I mean:
Picture A is the starting mesh. The right part is the textured, the left the "untextured".
Picture B shows the mesh which the new texture. The texture coordinates have not been adjusted jet.
Picture C shows the final mesh, which I want to have (it's one face loop more, than pic A).

I just used a mesh made from quads, so it is easier to see what I mean, but it should also work with a non symmetrical meshes and different face counts on both sides (so I cannot easily mirror, I could do that myself).
I know that this is possible, because Blender can do that. (That's how I created these images)
I already tried a lot and came up with two algorithms (each ~600 lines) which do work with some meshes, but if the mesh is curved or more complicated, they both produce a lot of distortion:

Please help me!