Swap the U and V direction of a surface?

I’d like to be able to swap the U and V directions of a surface.
The " Swap Surface Directions" component from Pufferfish seemed to be perfect, but it swaps the trimming data which is absolutely not what I want…

Swap UW issue.gh (3.2 KB)

var bf = s.Faces[0];
bf.Transpose(true);
A = bf;

Swap UV.gh (48.4 KB)

1 Like

Awesome !

RhinoCommons only mentions .Tranpose as a method for surfaces, which would remove the trim altogether. Transpose is not available as a method for Brep faces, although the C# component obviously still works. Any idea why?

The BrepFace class inherits from the Surface class, which implies that any method designed to operate on surfaces is also applicable to BrepFaces.

Thanks for the quick reply. Forgive my ignorance, but I seem to be losing trim information when using the surface Transpose method on the Brep face - it returns an untrimmed surface. I can retrim, but the trim would somehow have to be transposed as well. Am I missing something here or is the C# function inherently doing something the Python equivalent isn’t capable of?