How to rotate object

i use:rs.RotateObject(obj,starpointCrv,corner) to rotated the object but not true.
I need it rotated round the curve with corner+= 90.
How get plane to rotate it.

Something like this perhaps:

import rhinoscriptsyntax as rs

rect=rs.GetObject("Select rectangle",4,preselect=True)
crv=rs.GetObject("Select curve")

insec=rs.CurveCurveIntersection(rect,crv)
if insec:
    r_pt=insec[0][1]
    crv_param=insec[0][5]
    plane=rs.CurvePerpFrame(crv,crv_param)
    rs.RotateObject(rect,r_pt,-90.0,plane.ZAxis,False)
1 Like

Thank you


It don’t run with the circle curve input

Hmm, change

crv_param=insec[0][5] to crv_param=insec[0][7]