Commands with shift ortho constraint

rhinocommon
getpoint

#1

Hi All,
I am trying to check if in the RhinoCommon SDK there is any automatic way to have a GetPoint that accepts the shift modifier key to constraint the input along the ortho direction (as the Line, Curve and other commands do).

Do I have to implement this myself?

Thanks a lot
Alberto


(Dale Fugier) #2

Hi Alberto,

Well this should be on for all new instances of GetPoint. But you can set this explicitlly by calling GetPoint.PermitOrthoSnap. Note, ortho only works if you set a base point using GetPoint.SetBasePoint.

http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Input_Custom_GetPoint_PermitOrthoSnap.htm

http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Input_Custom_GetPoint_SetBasePoint.htm

Does this help?

– Dale


#3

That’s a good tip :wink: we are not setting the base point in our command, that was the missing step.

Thanks a lot Dale! Have a great day
Alberto