wateryfield Posted March 15, 2014 Share Posted March 15, 2014 (edited) Hi, everyone! I get some polygon group such as S1 S2 S3 S4…… How can i delete the group random such as S1 S5 S8…… and S1-S10 in delete node by expression. I can random seletion group by foreach node then delete it. But i can not figure out a simple expression in delete node. I have search for tips form forums, it may somebody already post a same problem, but i failed. Any help. Thanks so much! random_delete_group.hip Edited March 15, 2014 by wateryfield Quote Link to comment Share on other sites More sharing options...
pezetko Posted March 15, 2014 Share Posted March 15, 2014 You can use something like this expression in Group parameter: S*[`int(fit01(rand($F),0,999))`] Quote Link to comment Share on other sites More sharing options...
wateryfield Posted March 16, 2014 Author Share Posted March 16, 2014 You can use something like this expression in Group parameter: S*[`int(fit01(rand($F),0,999))`] Thanks you guys. helpful! And how can i delete such as S1-S5 group, or get a group list . like: S[1-5] But it is not working. Thanks. Quote Link to comment Share on other sites More sharing options...
pezetko Posted March 16, 2014 Share Posted March 16, 2014 (edited) S[12345] This will select groups S1-S5 S?[12345] This will select any group with name 'S' that have then 2 characters and last one is digit in <1,5> range. (S11,S21,S31,S12,S23,S33, SA1, ST5, SR2, etc..) S*[12345] This will select any group with name starting with 'S' where is last digit in <1,5> range (S5, S15, S35, START5, Sun4875 etc..) Look at Pattern matching: http://www.sidefx.com/docs/houdini13.0/expressions/_patterns Edited March 16, 2014 by pezetko 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.