import rhinoscriptsyntax as rs
def closestPt():
point = rs.GetObject("select point",rs.filter.point, True, True)
if not point: return None
point = rs.coerce3dpoint(point)
curve = rs.GetObject("Select curve", rs.filter.curve, True, True)
if not curve: return None
cmd = " _ClosestPt" + " " +str(point)
rs.Command(cmd, False)
if __name__=="__main__":
closestPt()
这样就可以啊
|