Problems with surface morph distorting model

Hello people,

I’m designing a tool to standardize the modelling from a 2D profile. I want that everytime a 2D sketch is inputted, you automatically get the 3D model from it.
I have a Brep that I want to morph to a surface. That’s ok but something is not right with the U and V and I can’t quite figure out why.
As you can see in the picture the resulting surface is distorted, how can I fix it? Even though I try to make it work for these parameters, if I change some parameters (such as the curvature of the surface) the same problem happens once again.
I would also like for this solution to keep consistency with any other 2D I input.
I am really stuck.
Thank you! (28.8 KB)

Wasn’t internalised properly, sorry! (34.7 KB)


I cannot use your file as it have some plugins I haven’t.
It seems your surface needs to be UV-swapped.
You can use RhinoCommon in a simple C# script ( .Transpose ) , see attached. (1.2 KB)

Hello, I have UV swapped however that does not seem to be the problem. Even though it might work for the parameters I set it for, if I want to change something in them the problem happens again!
Thanks for the help anyways, i’ll look into the C# script.