primarclen() on NURBS surface

   823   0   1
User Avatar
Member
214 posts
Joined: Jan. 2016
Offline
Please, is it possible to calculate arclenght for imported NURBS surfaces (in real units) along the U and V with the primarclen() function? I could convert the NURBS to rows and columns and calculate on those curves. Do I have to?

My initial code for the surface.
(I have a UV Texture node before this wrangle, set to rows&columns)

int divs       = chi("divs");
int primuvmode = chi("primuvmode");
vector2 uv_start, uv_surface;
float   u, v;

uv_surface = set(v@uv[0], v@uv[1]);

// U
uv_start = uv_surface * {0,1};
u        = primarclen(0, uv_start, uv_surface, @primnum, divs, primuvmode);

// V
uv_start = uv_surface * {1,0};
v        = primarclen(0, uv_start, uv_surface, @primnum, divs, primuvmode);

v@arclen = set(u, v, 0);
  • Quick Links