you can use the evaluate surface component (surface>analysis>evaluate surface) to get a normal vector and frame of the surface at any point. it may help to reparametrize the surface in order to evaluate it on a 0-1, 0-1 scale. the x direction of the frame is the u direction of the surface and the y direction of the frame is the v direction of the surface. the normal vector is the overall direction of the surface itself.
test this out and compare it to what you get using the DIR command in rhino.
Eh, almost correct. The U and V directions of a surface are not necessarily perpendicular to each other, whereas the axes of a plane always are. So although the x-axis is tangent to the u-direction, the y-axis is merely perpendicular to the u-direction and the normal.
However, in most cases it is a pretty good representation of UV directions.
here's a quick surface that generates an extreme case of not having perpendicular U and V directions....Simple plane, rebuilt with a bunch of control points, then "Maelstromed"
I have a number of points generated from a surface division that then create curves to loft panels on this surface. Some panels are created from pairs of curves that are orientated 90 degrees out from the other curves depending on the re-ordering of the points. [If you're not with me so far see Simon Vorhammer's thread about finding the lowest point elsewhere.] After these new surfaces are created I would like to swap the U and V directions of the surfaces that do not correspond to the original surface.
There is a Rhino command for this Direction->swapUV and like the GH flip component where a guide curve can be used to get the direction I thought this would be quite a useful addition to Grasshopper. Any thoughts?
Hi Danny , I think you have get a VB component(code by to]) to do the swapUV work.And can you just upload it to the forum ? I have little vb knowleadge and cant manage it myself.Thanks.