|
![](/i/fill.gif) |
I used this in my lspline3 macro.
Find segment where the desired location (input parameter) is, then:
#local slen=; // segment length
#local l=; // from start of segment to location
#local e=0.01;
#local t1=l/slen; // relative location in segment
#local err=0.001*slen; //tolerance
#local dif=err+1;
#while (abs(dif)>err)
lensp(t1,...,len) // returns length from start of segment to parameter
#local dif=l-len;
#local t2=t1+e;
lensp(t2,...,len2)
#local t1=e/(len2-len)*dif+t1;
#end
t1 is the parameter pointing to location.
_____________
Kari Kivisalo
Post a reply to this message
|
![](/i/fill.gif) |