Grasshopper

algorithmic modeling for Rhino

Hello all!

I would like to batch-run a number of simulations within Grasshopper. More specifically, I would like to: (a) automate a bunch of sliders, whose input values are fed directly from a CSV file, and (b) store the corresponding simulation output/s for each simulation run.  

I have written a Python script within Rhino Python Editor that does the above and works like a charm. Now, my scope is to implement the same within a GH Python component where a user may indicate the sliders (to be automated) and simulation outputs (to be stored), by simply plugging them as inputs of the GH Python component. The batch simulation would then be activated via a boolean toggle.  

When implementing the above logic within a GH Python component, I ran into the following problems:

  1. The component seems to end up in a recursive loop
  2. The simulation output values stored in the 'deflection' and 'weight' components, respectively, seem to reflect only the last generated values (refer to attached image).

After reading other forum posts, I am aware of the issue with calling a new solution within another solution, however still feel uncertain about the way forward (especially since most posts discuss in terms of C# not Python). 

I would greatly appreciate any form of help :-)

Cheers

Zack

Views: 345

Attachments:

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service