davedjohnson Posted July 22, 2005 Share Posted July 22, 2005 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 Quote Link to comment Share on other sites More sharing options...
Slapdaddy Posted July 22, 2005 Share Posted July 22, 2005 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. Quote Link to comment Share on other sites More sharing options...
davedjohnson Posted July 22, 2005 Author Share Posted July 22, 2005 So I know how to go through each face in the gdp, but how do I add edges? And once I do, how do I know how many faces shared it? Dave Quote Link to comment Share on other sites More sharing options...
sibarrick Posted July 23, 2005 Share Posted July 23, 2005 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); Quote Link to comment Share on other sites More sharing options...
davedjohnson Posted July 23, 2005 Author Share Posted July 23, 2005 here's a few bits and bobs I've been using.const GEO_Point Quote Link to comment Share on other sites More sharing options...
sibarrick Posted July 23, 2005 Share Posted July 23, 2005 sorry GEO_Closure connectedPrims(*gdp); 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.