Change plane of snapping, python?


#1

Does anyone know how to change the way Rhino snaps to distant geometry when direction is constrained (tab). Now it snaps to perpendicular point, but I am trying to make it stop at certan height.

Is it something accessible through Python script?


(Pascal Golay) #2

Hi Daniel - this should be possible in a script but as a special type of Move command, not as an OSnap that you can use any time, I would say - you’d intersect a line in the constrained move direction with a plane at the elevation you want as the “Move to” point.

-Pascal


#3

Yes, that’s exactly what I was looking for, for example “MoveToCPlane” command that would allow to intersect perpendicular to cplane. Do you know by any chance any example of a script like that?


(Pascal Golay) #4

Hi Daniel - if you’re moving perpendicular to the CPlane, Move > Vertical will do it, just type in “0,0,0” as the move to point. You can make a macro:

! _Move _Pause _Vertical _Pause 0,0,0

-Pascal


#5

Sorry, but what you sad before was what I was looking for to constrain both direction and stop it at certain elevation. Do you know if this would be possible to script?


(Pascal Golay) #6

Hi Daniel - here is a python that does what I think you want-

MoveToElevation.py (1.5 KB)

-Pascal


#7

Amazing, thank you very much for this! It works flawlessly.

One thing that I expected to be different from how Rhino works is that the object should follow cursor as it moves through different elevations, but now it only comes up once command ends. Do you know if it was also possible to make it change in real-time?


(Pascal Golay) #8

Hi Daniel - it is certainly possible, and it would undoubtedly be good for my few remaining brain cells to sort that out and make it work, but realistically, I can’t imagine I’ll have time to move it to the top of my list, I’m scrambling as it is.

-Pascal


#9

no worries, thank you anyway. that’s a great help