Blackshadow Posted January 13, 2018 Share Posted January 13, 2018 Hi, i've two geometry with a scatter node applied and i wont connect these point using an add node by color attribute create with a color node after scatter node. so... geo 1 geo2 scatter1 scatter2 color1 color2 merge add Now i need to calculate the distance between the connected poit. How can I do? Thanks Quote Link to comment Share on other sites More sharing options...
Sepu Posted January 13, 2018 Share Posted January 13, 2018 in wrangle connect your 2 streams and use the distance function vector mypt = point(1, "P", 0); f@dist = distance(@P, mypt); http://www.sidefx.com/docs/houdini/vex/functions/distance.html Quote Link to comment Share on other sites More sharing options...
Blackshadow Posted January 13, 2018 Author Share Posted January 13, 2018 (edited) Ok, i suppose that I have to connect my two streams in the first and second imput of attributewrangle, right? Sorry my ignorance... And furthermore, if i would to delete the longest line of a certain value, how can select these line? (line created with the connection of points) Edited January 13, 2018 by Blackshadow i forgot a piece of the message Quote Link to comment Share on other sites More sharing options...
Sepu Posted January 13, 2018 Share Posted January 13, 2018 Not on my computer right now but yes you have connect your 2 streams in the wrangle. for the other question you could do an if statement and do something along this lines. if(@dist > ch("threashold")){ removepoint(0, @ptnum); } Quote Link to comment Share on other sites More sharing options...
Blackshadow Posted January 13, 2018 Author Share Posted January 13, 2018 Ok i really thank you for the help! I tried and it works! Really thank you! Quote Link to comment Share on other sites More sharing options...
coltonmil Posted January 16, 2018 Share Posted January 16, 2018 Just wanted to add a quick something to this: you can actually access another input's attributes without having to use the point function. Appending opinput# before the attribute allows you to designate which input to access. v@opinput1_P would access the second input's P attribute for instance. So you could actually get the distance with a single line f@dist = distance(@P, v@opinput1_P); 1 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.