I can see some reasons why it would “behave like a bat on crack” .
Also, some additional tweaks are possible.
Anyway, i’m playing with things i don’t know.
It’s still the usual “pick random code from google results and mash up everything”.
I’ll edit this post later.
Here it is!
Everything is a bit better now:
- cursor in/out detection corrected to Grasshopper window instead of canvas:
- it’s now possible to manually drag/zoom the canvas while the script is running;
- added inputs for pan and zoom sensitivity.
The interesting thing is, like in rhino where we can use the 3d mouse while selecting functions or keypressing, her is the same… can sort of feel like actually have 2 1.5 hands!
(I can’t edit first post, but it would be good to remove the old version… or replace it)
This is still the same initial BAD code: it gets 3d connexion inputs by using a “decoy” viewport and aggressively resets it, and updates grasshopper canvas all the time!
This surely affect negatively rhino and grasshopper UI performance.
Stability is not known, I’ve played with it just during the coding +10 minutes.
It should be considered only as proof of concept.
Anyway, I hope it will be useful in some way.