Grasshopper

algorithmic modeling for Rhino

I am trying to modify the ladybug fly component which you can see on github here: https://github.com/mostaphaRoudsari/ladybug/blob/master/src/Ladybug...

Please also see a GH file example attached. Ladybug%20fly%20Example.gh

The point of the ladybug fly component is that once it is set to run: It will force all sliders connected to it, to iterate through all possible values.

I would like to add some code which adds an output variable to the ladybug fly component so that the user can see which iteration the fly is that. (iteration number)

In order to do this I need to get the counter variable equal to iterationNumber immediately AFTER counter is incremented by one on line 271.

So that each time a solution is solved the iterationNumber increased until it hits the maximum number of iterations.

I've tried many different approaches and I'm having a very tough time doing this as I am not so familar with C# also I cannot edit the variable type of ref iterationNumber in the code. Furthermore Print or System.writeLine doesn't work.

How can I go about this? Any help/code that you provided will be acknowledged on Ladybug thank you!

Views: 862

Replies to This Discussion

See Colibri's iterator component. It basically does that and more!

https://github.com/tt-acm/Colibri.Grasshopper/blob/master/src/Colib...

Mostapha do you have a 6th sense? Yes thanks for the tip off but it still doesn't tell me what I wanted to know above!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service