I am sure this is an old issue but I could not find any threads about it.
I am trying to mark or identify open connected geometry with an attribute but I am having failed miserably.
I am trying this but I cant figure out how to mark the whole object soon as if it finds points with less than 3 neighbors, but I think my logic can be flawed.
int npts=npoints(0);
for(int pt=0;pt<npts;pt++){
int nei = neighbourcount(0,@ptnum);
setpointattrib(0,"nei",@ptnum,nei);
if(nei<4){
setprimattrib(0,"open",@primnum,1);
}
}
I am running this on primitives in a for each loop, so the idea is if it finds any points with less than 4 connection it should mark the whole connected piece as "open", but it isn't work as I expect I am having some faces in the middle of the connected pieces with different values.
I hope it makes sense.
Any tips?
Thanks in advance.