Masoud Posted October 18, 2018 Share Posted October 18, 2018 Hi; In VEX, I want to select boundary edge loops, based on a points group. Here is my point wrangle codes: int Array[]; if(inpointgroup(0,"PointsGroup",@ptnum)==1) { append(Array,@ptnum); foreach(int ix; Array) { int ShEdges = pointhedge(0,ix); if (hedge_isprimary(0,ShEdges)==1) { setedgegroup(0,"SelEdgesGroup",hedge_srcpoint(0,ShEdges), hedge_dstpoint(0,ShEdges),1); } } } The problem is, it selects only some edges like image bellow. Any ideas would be appreciated. Thanks BoundryEdges_01.hip Quote Link to comment Share on other sites More sharing options...
julian johnson Posted October 18, 2018 Share Posted October 18, 2018 if (i@group_PointsGroup) { int ph = pointhedge(0,@ptnum); while (ph != -1) { if (hedge_equivcount(0, ph) < 2) { int src = hedge_srcpoint(0, ph); int dst = hedge_dstpoint(0, ph); setedgegroup(0, "edges", src, dst, 1); break; } ph = pointhedgenext(0, ph); } } Just tried this in H17 and seemed to work OK in a point wrangle.. 1 Quote Link to comment Share on other sites More sharing options...
Masoud Posted October 18, 2018 Author Share Posted October 18, 2018 Thank you Julian, it works fine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.