I want to swap the UV directions of a surface according to its dime nsion and get its SurfaceFrame. However the SurfaceFrame does not swap its X and Y axis with the swaped UV directions. As far i cant see any reason for this, especially when the SurfaceFrame says:
Returns a plane based on the normal, u, and v directions at a given surface U,V parameter.
thank you for your reply and sorry for my description. I shouldn’t make posts on a Friday afternoon. The problem i have isn’t very hard to explain, so here is second attempt.
The .py file i posted is a part of a longer script so i will try to break it a little bit down. I want to make a script that can terminate the position of points or rather objects to a reference surface. Therefor i get the surfaceframe of these reference surface. With a simple XformCPlaneToWorld i can transform any located point and see in witch Octant the point is located relative to that reference surface.
In my final script the reference surface will be one side of a cube-like polysurface. If i claim one surface of that cube as the reference surface, the script should allow me to identify the “right” and "left and "front (and so on…) - surface of that cube.
The only thing that has to be controlled is the orientation of the surfaceframe. The rotation around its Z-axis has to be controlled. Now as far as i understood rs.surfaceframe, the X-axis of this frame will be aligned with the U-direction of the surface.
I want to use these information to remap the UV-direction of the surface so that U will be aligned within the long axis of the surface (my objects are quite rectangular shape).
I expected that the X-axis of the surfaceframe should be now always aligned to the longer dimension of the reference surface (even if that does not work for any domains like u already mentioned).
But the result work out a little bit different. The X-axis of the surfaceframe will be always aligned to the original U direction of the Surface, like it was created. Swapping the the UV directions in Rhino wont swap the X and Y-direction of the surfaceframe. Maybe u have any idea why its this way and how i can handle it,