Foor loop, acsess the Nth 'merge' iteration

   1107   3   0
User Avatar
Member
143 posts
Joined: July 2015
Offline
Hello guys

I have a for loop with a bunch of nodes in it for creating curves.
but I need each curve to look at the merged result of the previous iteration and check if there are more shared points than a threshold or not and if yes, delete this created curve and move on to the next iteration.

I need you geniuses to help me how I can get this data.
for this example, copying the Block Begin node and setting it to "fetch feedback" doesn't work because It returns just the last iteration result not the merged result to that point.

thank you in advance

Attachments:
screenShot.jpg (46.0 KB)

User Avatar
Member
143 posts
Joined: July 2015
Offline
Theoretically, I could use a Solver sop node inside the loop to accumulate every feedback if I set it to.
but couldn't get a solution for that!
User Avatar
Member
8577 posts
Joined: July 2007
Offline
keep your Block End set to By Pieces Or Points, but change Method to Feedback Each Iteration

then keep your Block Begin set to Extract Piece Or Point
but create another Block Begin set to Fetch Feedback, this one will bring back your previous iteration

then either pass data from Fetch Feedback directly to output to skip this iteration or merge with result of this iteration before output which will behave like Merge Each Iteration Gather input

here is a simple example that compares the current piece with geo of all previously merged iterations and if it intersects it will skip (pass previous iter) otherwise merge in the new piece

Attachments:
ts_foreach_piece_conditional_merge.hipnc (206.1 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
143 posts
Joined: July 2015
Offline
Tomas, you're a true savior, never thought of this clever usage of Switch-if node!
Thank you veeeeeeeeery much.
  • Quick Links