Hi @dale,
Is it possible to have GetCursorPos return additional info of the OSnap point from the cursor (if it would normally snap to something).
Also, how about being able to Set cursor position from this method (or a new SetCursorPos one…)
Sorry, no. Rhino.GetCursorPos just calls the Windows GetCursorPos function. To know about osnaps and stuff, you would need to pick a point using Rhino.GetPoint.
As far as a SetCursorPos, sure its possible. Why would you want to do this?
I was looking for a way to get the Snap point “real-time”. I am placing some objects interactively in a continuous loop using GetCursorPos + PointPick, but I see no way to use Rhino Osnaps with it. With GetPoint sure, I can do it but it’s not real-time anymore. Would there be any other doable way to report ‘what would I snap to’ at the cursor point?
As for SetCursorPos - for now I can have a poor-man’s snap (using meshes) - basically with PointPick I get the point on mesh and from there can get the mesh face and its vertices - if within given tolerance, I can ‘snap’ to them. But for what I am doing would be better if the cursor jumped there too.
I am probably trying to push it too much with RS but I am amazed of what already is possible with good old RhinoScript + resorting to some tricks.
Another good reason for SetCursorPos - while using dynamic object placement @ cursor I need sometimes to do some changes/access popup menu etc. and keep the object in place. In that case I want to remember where the cursor is, do whatever is needed, and then move it back to the same point so the object does not change its place. In this sample video ( http://www.screencast.com/t/rHfxAGsC8 ) I’m using Command-like scale, and also by ZoomSelected on the placed object – currently setting back the cursor pos. with a workaround with AutoIt or DynamicWrapperX2 external modules but in the long run that will make it difficult to share the working script.
Also, if you had any new ideas how to respect snapping with GetCursorPos-like method, that would be very helpful as well.
Could we have an additional argument added to PointPick to ignore groups? (sort of Ctrl+Shift+LMB equivalent?).
Currently when objects are grouped there is no way to get only the ones under the cursor.
How is the snapping with GetCursorPos idea going ?
Sorry for my ignorance, but I still don’t see what setting the position of the Windows cursor is going get you. Perhaps you can clear up your expectation for me…
but I will prepare more. There is a few more things apart from this one that open up a lot of possibilities for more interactive mouse/keyboard interactions with RhinoScript