Jump to content
ValentinD

Foreach question : multiple input

Recommended Posts

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 :

 foreach.PNG

 

Thanks for helping ! 

scatterForEach.hipnc

Share this post


Link to post
Share on other sites

This is the great question and I hate to see it unanswered.

Share this post


Link to post
Share on other sites

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.

 

Scatter.jpg

vu_scatterForEach.hipnc

Edited by Noobini

Share this post


Link to post
Share on other sites

@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 by deshu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×