you can do that with pointclouds, it's ideal for averaging out the normal directions
which is probably what you want.
// wrangle1
// change color by proximity to curve points
int handle = pcopen(1,"P",@P,chf("radius"),1);
if(pcnumfound(handle)>0){
@Cd = {1,0,1};
}
// use blast nodes to separte in 2 geometries
// wrangle2
// create normals from average closest points
int handle = pcopen(1,"P",@P,chf("radius"),chi("maxpoints"));
if(pcnumfound(handle)>0){
vector p = pcfilter(handle,"P");
v@N = p-@P;
}
normal_to_points.hipnc
> using 1 point or 40 points for position lookup