bonassus Posted November 18, 2021 Share Posted November 18, 2021 how can i create a group from a range of points based on point number. I can make a group with f@group_s1 = @ptnum<30; but how do i get 31 though 60? f@group_s2 = @ptnum>30&&<=60; does not work. Quote Link to comment Share on other sites More sharing options...
Ziyad Posted November 18, 2021 Share Posted November 18, 2021 Your code is correct, you're adding points below 30 into f@group_s1, and points greater than 30 & lower than 60 (so 31 to 60) are added to f@group_s2. Although in this case the point 30 is neither in @group_s1 nor @group_s2, because both conditions are only targeting numbers lower than 30 and higher than 30. To fix that just add the "=" sign to either the "@ptnum <= 30" for @group_s1 or "@ptnum >= 30" for @group_s2. Quote Link to comment Share on other sites More sharing options...
Fenolis Posted November 19, 2021 Share Posted November 19, 2021 You can also use the Group by Range node. Quote Link to comment Share on other sites More sharing options...
bonassus Posted November 19, 2021 Author Share Posted November 19, 2021 14 hours ago, Ziyad said: Your code is correct, you're adding points below 30 into f@group_s1, and points greater than 30 & lower than 60 (so 31 to 60) are added to f@group_s2. Although in this case the point 30 is neither in @group_s1 nor @group_s2, because both conditions are only targeting numbers lower than 30 and higher than 30. To fix that just add the "=" sign to either the "@ptnum <= 30" for @group_s1 or "@ptnum >= 30" for @group_s2. Thanks for the correction. I left out the @ptnum in the second half of my expression. Seems kind of obvious now. Much appreciated. 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.