algorithmic modeling for Rhino
Hi all,
I've created a python component that prompts the user for a point input and then creates a circle at that specific point.
The thing is, I would like the component to run only when I "turn it on", i.e double click the Boolean toggle and change it to true.
It's working, but not as expected. When I change the boolean toggle to True, the user is asked to input a point by clicking. When the user clicks to create a point, he is then asked again to do so, and only then is the circle created. See attached file.
Anyone has a clue why this duplicity is happening?
This may seem a very basic thing, but I can't get it to work properly no matter what I've tried (including while statements and other methods which didn't work).
Thanks,
Yuval
Tags:
Hi Yuval,
As I understand it, the code suspends mouse events till the end of the solution.
The first click in Rhino viewport "releases" the mouse and the second actually picks the point.
It looks that this solves the problem of an extra click:
Hi Michael,
This works perfectly - I had a hunch regarding what's happening but couldn't figure it out.
Many Thanks!
Yuval
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by