You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 6, 2021. It is now read-only.
First of all, thanks for such a wonderful and helpful script.
It seems that right now, there's no way to break or Ctrl-C a Python script -- for example, an infinite "while(True)" loop will run forever, consequently crashing Rhino. Of course, I'm not running infinite loops, but this means that a loop with faulty logic will crash Rhino and Grasshopper, erasing any progress done since the last time saved.
Am I missing something, and is there a way to just break a Python script running inside the Python Grasshopper Component?
Activity
saeranv commentedon Jun 29, 2014
You can code in an Esc break: http://www.grasshopper3d.com/forum/topics/make-a-custom-component-cancel-able?commentId=2985220%3AComment%3A883361 , introduced to me by @mostaphaRoudsari .
You can see an example for Python here, I used it for one of the Ladybug components: https://github.com/mostaphaRoudsari/ladybug/blob/master/src/Ladybug_SolarFan_alt.py#L801
ETA: It looks like it will work as long as you embed it within a loop, but not for recursive calls.
chojje commentedon Apr 6, 2018
@saeranv the link above is broken, where can I find this?