papsphilip Posted November 15, 2021 Share Posted November 15, 2021 Is there an easy way to identify the dead-end branches of a curve network? so far i have a point wrangle that removes points if their neighbors are less than 2, but that is heavily depended on the iterations and it takes a lot of iterations to clean up a network from branches and keep only the closed loops. Any ideas? Quote Link to comment Share on other sites More sharing options...
papsphilip Posted November 15, 2021 Author Share Posted November 15, 2021 ok i found a solution in case anyone is interested. instead of checking each point i look at the primitives. in a primitive wrangle i look if any of the end points have less than two neighbors. i put that in a for loop with some iterations in case there are branches on branches. like ten iterations. before i had to go up to 100 and more to get rid of all the points, int pts[] = primpoints(0,@primnum); int f = pts[0]; int l = pts[-1]; int fn = neighbourcount(0,f); int ln = neighbourcount(0,l); if(fn<2 || ln<2) removeprim(0,@primnum,1); 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.