VEX selecting border edges

Recommended Posts

Is there a way in vex to select border edges of a cube ?

Thanks

Share on other sites

What do you mean with border edges? In my opinion a cube doesnt have border-edges, while a grid has. The edges that isnt connected to any other geometry. But if you mean border edges like the hard angle, thats something different. Both are doable in vex, but different aproaches.

Edited by ThomasPara

Share on other sites
41 minutes ago, ThomasPara said:

What do you mean with border edges? In my opinion a cube doesnt have border-edges, while a grid has. The edges that isnt connected to any other geometry. But if you mean border edges like the hard angle, thats something different. Both are doable in vex, but different aproaches.

Yes I mean edges

Share on other sites

Set a normal node to 'points' and put this in an attribute wrangle:

```if( max( abs(v@N) ) < 0.9 ){
int nbs[] = neighbours(0, @ptnum);
foreach(int nb; nbs){
if(nb > @ptnum){
vector nml = point(0, 'N', nb);
setedgegroup(0, 'outer_edges', @ptnum, nb, max(abs(nml)) < 0.9);
}
}
}```

box_edges.hiplc

Share on other sites
2 hours ago, konstantin magnus said:

Set a normal node to 'points' and put this in an attribute wrangle:

```
if( max( abs(v@N) ) < 0.9 ){
int nbs[] = neighbours(0, @ptnum);
foreach(int nb; nbs){
if(nb > @ptnum){
vector nml = point(0, 'N', nb);
setedgegroup(0, 'outer_edges', @ptnum, nb, max(abs(nml)) < 0.9);
}
}
}```