Page 1 of 1

MEL question: UV coords of a nurbs cv ?

Posted: Thu Nov 15, 2007 10:14 am
by deadalvs
morning...

is there a way to get the corresponding U and V values [as floats] from a nurbs cv ?

yes, cvs are not lying in the surface itself, but there must be a way to get that value...

any idea ?

thx !

Posted: Mon Dec 10, 2007 12:33 am
by deadalvs
idea in pseudo: (not yet coded)


UV-Coords for one specified CV:
• offset the surface to both sides
• generate linear curve from offset cv (one side) to offset cv (other side)
• create a very small circle
• extrude the circle along the curve
• intersect the original surface with this tube
• get uv-position of every cv of the intersection-curve (get params via getAttr)
• calculate average uv-position as the resulting UV-position

--> the edge / corner cvs will be a little incorrect, but the precision can be increased by creating a smaller tube if needed.

there's a little trick needed when getting the UV-positions of the curve-cvs since they show their local-position (0/0). trick: move the cv to UV 1/1 get the coords and create the difference for the actual UVs on the whole surface...

any questions? just ask...

(well, i guess nobody will need this anyway...)

i should start posting on highend 3d ! :)