Jump to content

Working With Edges


Recommended Posts

Is there an easy way to find an edge loop? I have a closed polygonal surface that I delete a few polygons from. This leaves a hole. I want to fill the hole, but I'm having trouble finding the points that make up the edge/boundary.

Dave

Link to comment
Share on other sites

I tackled the same problem recently and I found it easiest to make my own edge structure by running through all the faces in the gdp and adding edges. Any edge that did not share 2 faces had a problem. 1 face and it is part of the hole. 3 or more and you don't have well behaved mesh.

Link to comment
Share on other sites

here's a few bits and bobs I've been using.

const GEO_Point       *pt0,*pt1;
const GEO_Primitive   *tri;
GB_PointRefArray      prefarr(gdp,0);
GB_EdgeGroup          edgeGroup(*gdp,"tmpedge");
UT_IntArray              primlist(2);


//set pt0 and pt1 here
connectedPrims.findPolysUsingEdge(*pt0, *pt1, primlist, prefarr);
   
tri=gdp->primitives()( primlist(1) )
tri->getVertexCount(); 

edgeGroup.add((GB_Element*)pt0,(GB_Element*)pt1,prim);

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