Hello,
I made a for loop to find nearpoints by attribute and i'm stuck in for some hours.
here is the problem:
for (i=0;i<=maxh;i++)
{
if (@posh==i) {
i@sp=nearpoints(1,'@yop2==24',@P,2);
}
}
“yop2” is a point attribute on a second mesh plugged in my 2nd entry attribute wrangle.
when i write nearpoints(1,'@yop2==24',@P,2); i'm getting a good answer but it's only correct when i=24.
when i'm trying to write nearpoints(1,'@yop2==i',@P,2); i'm getting a bad answer / not correct , not working.
is there a way to write ‘i’ attribute correctly in my nearpoints vex?
plan is on my main mesh to snap points correctly with this ‘yop2’ attribute. if i'm just using a nearpoints(1,@P,2);
its getting the points but sometimes the first point of the array is not good.
in my case for example:
nearpoints(1,@P,2,2) my array is -105,104,etc..-
nearpoints(1,'@yop2==24',@P,2) my array is -104,72,..-
i'm looking for the point 104 when @yop2=24. and i want to test it for @yop2 starting to 0 to 31 ( thats my for loop).
maybe i'm too direct, could anyone help me?
Greetings,
Fred