patis Posted December 8, 2020 Share Posted December 8, 2020 (edited) Hi there! I'm troubled. I want to clean up the lines only left red lines (delete only shared green lines) Is there any way to fix this with AttributeWrangle or other? Thank you Cleanup Lines.hipnc Edited December 8, 2020 by patis Quote Link to comment Share on other sites More sharing options...
patis Posted December 8, 2020 Author Share Posted December 8, 2020 (edited) Hi, It was solved by using neighbourcount Thank you! int primPoints[] = primpoints(0,@primnum); foreach( int point; primPoints) { int neighbourcount = neighbourcount(0,point); if (neighbourcount>2)removeprim(0,@primnum,0); } Edited December 8, 2020 by patis Quote Link to comment Share on other sites More sharing options...
Follyx Posted December 9, 2020 Share Posted December 9, 2020 but what is going on if 2 red lines are next to each other? ;-) Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 10, 2020 Share Posted December 10, 2020 On 12/8/2020 at 3:19 PM, patis said: Hi, It was solved by using neighbourcount Thank you! int primPoints[] = primpoints(0,@primnum); foreach( int point; primPoints) { int neighbourcount = neighbourcount(0,point); if (neighbourcount>2)removeprim(0,@primnum,0); } shouldn't the test be neighbourcount>1 ? Quote Link to comment Share on other sites More sharing options...
patis Posted December 10, 2020 Author Share Posted December 10, 2020 Hi! I modified code. int primPoints[] = primpoints(0,@primnum); foreach( int point; primPoints) { int neighbourcount = neighbourcount(0,point); if (neighbourcount>1)removeprim(0,@primnum,1); } regards. 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.