Hi all!
Ultra-late evening (or early morning) madness here… I’ve got a flash!
Creating an out-of-screen active viewport and use the movement from there to move the gh canvas!
Very WIP, but still somehow useful … at least to understand if a proper plug-in should be made (or is it already?)
Some comment inside code.
Please BEWARE! Code not greatly stable…
Well, at some point, the view sways suddenly, and I have to hunt for my definition.
Also, it’s way too sensitive, and I have been using a 3D mouse for 15 years.
Maybe you could add a “sensitivity” input so that I don’t have to change that in the 3D Connexion settings which work fine for me in CAD and that I don’t want to change each time I go from GH to Rhino
There’s also the issue that I can’t access the tools in the menus…
Hi Riccardo, have you made a new version of this ?
Or maybe could you help me find out why it behaves like a bat on crack with my system ?
I don’t expect to live long enough to see GH2, so I set back my hopes on your hack…
Hi Osuire.
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.
Edit:
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!
Lame gif:
3dconnexion_plugin_V0.6.gh (12.9 KB)
(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.
I realized this tool can’t be seen as not-beta, so a version numbering >1 is needed. The first should be considered 0.2 … (Sadly I can’t edit first post…)
You can edit the code at “zoomsens” and change values.
I’ve seen default max zoom-in is 50 and max zoom-out is 0.05 … i wouldn’t go smaller than 0.01… try changes when you have nothing to lose on rhino/gh
That’s meant to appear.
Read the description, you can hide that by moving it out of the screen.
To be hones, anyway, I’ve made this tool just to try how it would be… personally i’m not sure i would activate this, even if with a good performance.
I like that the 3dmouse let me navigate the 3d space anytime, whatever the windows rhino display over the viewport… grasshopper not excluded!
The face that we can navigate the 3d space while working on grasshopper is priceless.
This is why i’ve added the last functionality:
not updating canvas if decoy viewport is unchanged, indeed, it make sense.
left and right mouse buttons: while you click and hold both simultaneously, the script will be temp disabled.
That’s “Linked viewport” option. I’ve never used it…
It seems that every viewport with parallel projection is automatically linked to the others.
Not sure how to avoid this for a single viewport…