Grasshopper

algorithmic modeling for Rhino

boolean button for anemone, conditional exits for nested loops

I am trying to understand how to use nested loops in anemone. 

I have an event that runs util it hits a condition at which point it outputs a True to exit the loop. Ideally though this would only stay true for a seconds so that as this loop is nested inside another larger loop the whole cycle wont grind to a halt. I guess I'm looking for something like the button component where when you click it it only turns true for a second then once released reverts to its alternate state.... but for this to be triggered by another component rather than a user... Is there a way to do that in GH>?

Thanks for any advice. M

Views: 2029

Replies to This Discussion

Yep, that's exactly why you have the E (exit) input in the Loop End component. Set it to True to halt the running loop. Additionally you will need to set the Loop End to "Output after the last", so it won't trigger the "master" loop each time.

Mateusz, thanks for your reply. I am trying to turn a curve into arcs using anemone. I have it working for the first segment and am hoping to loop through the rest of the curve... It seems though that once the arc jumps out of the set boundary it triggers a false by testing points for inclusion in a brep... this false is supposed to mimic a while loop... but the False makes the whole thing stop .I would like it to just temperately trigger the false so that the loop keeps running....but on the next iteration... I thought if could get past this hurdle I could add another D1 which was the arc segment and feed it back so that the loop iteratively continues... I should really just learn me some python.... :) heres the file. any thoughts super appreciated!.....

this updated file is a step closer but i think its held up by the boolean that throws a false and doesn't change...

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service