How to rotate an object with rhinocommon in python?

I am used to use rhinoscriptsyntax but it is seldom for me to use rhinocommon in python. Now I need to rotate the object with rhinocommon since I need to keep the type of the Curve object. But nothing happened when I using the method Transform or Rotate along the guide of the API documentation and other posts on the Forum. I have to say that might be a foolish problem…but I sincerely can’t deal with it by myself, and I find out that it is hard for me to understand some syntax of rhinocommon in Python. Can anyone help😭? (6.5 KB)

You need to assign your transformed geometry to your output. At the end of your script add:

a = geo

Note that your current code will throw an exception when y=0.

1 Like

What an enlightening speech! It seems that I’m not familiar with ghpython. Thank you