@xiix.xoox wrote:
I want to show line to location of mouse, when mouse move line to redraw. I can’t do that. Please help me.
import Rhino import rhinoscriptsyntax as rs import scriptcontext as sc def handle_mouse_move(object, e): try: ptS=[] t= e.WindowPoint.X, e.WindowPoint.Y ptS.append(t[0]) ptS.append(t[1]) ptS.append(0) ptS=rs.coerce3dpoint(ptS) print ptS #Show line begin 0 to location ptS except Exception as exp: print(exp) def GetLoMouse(): getter = Rhino.Input.Custom.GetPoint() getter.AcceptNothing(True) getter.PermitObjectSnap(False) getter.PermitOrthoSnap(False) getter.PermitConstraintOptions(False) getter.MouseMove += handle_mouse_move getter.Get(True, False) if __name__ == '__main__': GetLoMouse()
Posts: 10
Participants: 3