nithish24 Posted May 28, 2021 Share Posted May 28, 2021 Hi guys , I'm trying to delete the boundary primitives of a grid after using convert line node as shown in the pictures below with the help of VEX for procedurally deleting the boundary primitives of a grid . Thanks in Advance. Quote Link to comment Share on other sites More sharing options...
Alain2131 Posted May 29, 2021 Share Posted May 29, 2021 Hi ! You can do an Edge Group on the grid before the convertline, set to "Include by Edges - Unshared Edges". This'll select the contour of the grid. The convertline sadly gets rid of all groups, but with a Group Copy, you can copy it back after the convertline. You'll need to set the "Group Name Conflict" to "Overwrite" on the Group Copy node. Then, a Dissolve will delete the edges as you want. Blast or Delete won't work with this method. Quote Link to comment Share on other sites More sharing options...
Alain2131 Posted May 29, 2021 Share Posted May 29, 2021 ... or, if you're adamant on doing it with VEX, here's my take on it int pts[] = primpoints(0, @primnum); int count = 0; foreach(int pt; pts){ count += neighbourcount(0, pt); } if(count <= 6) removeprim(0, @primnum, 1); Basically, the idea is to get how many points are connected to the current primitive's points. There should be less neighboring points on the contour compared to in the "middle". In a Wrangle set to Run Over Primitives, get all the current points. Then, for each points, add up the neighbourcount. Looking into the Geometry Spreadsheet, we can see that the two lowest numbers are 5 and 6. So, if the count is 6 or lower, removeprim(0, @primnum, 1). It feels a bit cleaner with only one node, but it's a bit more complicated. It's up to you what you prefer more ! I'm sure there are plenty of other ways. Quote Link to comment Share on other sites More sharing options...
nithish24 Posted May 31, 2021 Author Share Posted May 31, 2021 @Alain2131 thanks man for the detailed solution. 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.