Rotate Object using a vector

Hi, I have a polygon and I want to rotate it to a particular plane. Is this possible on Rhino?

@Helvetosaur @nathancoatney

Make the plane a surface, use the Orient command.

The command is not available on Rhinoscriptsyntax, and how do I get the U and V in the AddPlaneSurface command?

I see, I missed the tag about scripting. In Rhinocommon it is a Transform called ChangeBasis.

Here it is in Rhinoscriptsyntax:

https://developer.rhino3d.com/api/RhinoScriptSyntax/#transformation-XformChangeBasis

https://developer.rhino3d.com/api/RhinoScriptSyntax/#transformation-XformChangeBasis2

2 Likes

You can also do this (assuming you have the plane of the polygon):

import rhinoscriptsyntax as rs

xform=rs.XformRotation1(old_plane,new_plane)
transformed=rs.TransformObjects(objs,xform)
1 Like