ValentinD Posted September 7, 2016 Share Posted September 7, 2016 Hello everyone ! I have some trouble with the foreach loop, and after some search I have not found an answer... I want to connect points from two scatters and do some operation on each pair of points : connect them to a line, resample, noise and set pscale depending of point number of each loop. Here is what I have : A scatter "A" creates two points. For each of thoses points I want to scatter (with scatter "B") another point and connect them together. Here is my two issues : 1- I don't know how to scatter from a sop outside the foreach loop. 2- I connect my points using the add sop setted to "Polygons > By Pattern > Polygon 0 > 0-$N". Will it work on the second iteration ? Here is an image of my network : Thanks for helping ! scatterForEach.hipnc Quote Link to comment Share on other sites More sharing options...
deshu Posted November 4, 2019 Share Posted November 4, 2019 This is the great question and I hate to see it unanswered. Quote Link to comment Share on other sites More sharing options...
Noobini Posted November 5, 2019 Share Posted November 5, 2019 (edited) is this what you want ? not sure about the 0-$N so i changed that to 0-1, I could be wrong. silly me, OP was in 2016, doubt if there would be a reply....oh well someone else might get something out of it. vu_scatterForEach.hipnc Edited November 5, 2019 by Noobini Quote Link to comment Share on other sites More sharing options...
deshu Posted November 6, 2019 Share Posted November 6, 2019 (edited) @Noobini thanks for answering. What I actually meant, is that the topic question remains unanswered - "Foreach question : multiple input". I feel like all the the methods are hacks in some ways. Let's say I've a Geo streams - one lowpoly and one highpoly. Both streams have corresponding 'class' attribute. I want to use for-loop for each piece (by attrib 'class') from the first and the second input simultaneously. The only solution to that seams to be using Delete SOP on the second stream with detail("../metadata", value) at an expression. I feel there should be easier solution. Edited November 6, 2019 by deshu Quote Link to comment Share on other sites More sharing options...
ValentinD Posted November 21, 2019 Author Share Posted November 21, 2019 Hey ! What an old post indeed ! Yes what you said @deshu is the way to go ! 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.