Jump to content

How could I select edges between selected points in VEX?


Masoud

Recommended Posts

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

Capture.JPG

BoundryEdges_01.hip

Link to comment
Share on other sites

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..

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...