I am building a closed polysurface in GH using an input surface and a numeric parameter. The final volume depends on this input parameter.
I would like to adjust the input parameter until my object reaches a target volume. I can do this manually with a slider but I would like to toggle a button and have it adjust automatically. Better yet, when I change the target volume it adjusts the parameter automatically.
I tried writing a python component, but I am having trouble as it won’t let me feed the volume of the object back to the script: it complains that the object depends on itself.
I feel I am missing a “grasshopper way” of approaching this problem. In “traditional, non-grasshopper” python I would do a for loop, and break out once I am within a chosen tolerance.
Thoughts? Ideas? Thansk!