RhinoCommon Rotate like Normal Command

Is it possible to create a command like the normal Rotate command in rhino where I can give 1st point, 2nd point and let the user choose 3rd where he can see the object rotate like the normal command?

Or do I need to use rhinoscript?

Yep, it sure is.

Rhino’s Rotate command consists of 3 point picking operations (center of rotation, first reference point, and second reference point). The first reference and second reference point pickers are Rhino.Input.Custom.GetPoint-inherited classes that implement DynamicDraw events. The second reference point picker is even fancier, as it knows how to show objects transforming dynamically.

I’ve typed up a sample that works similar to that of Rhino’s Rotate command (which is written in C++). I have not tested this thoroughly, but it seems to work…


Sweet. Sadly enough I’m a vb.net user xD
Looks a bit complicated though. For sure if I’m searching for how to determine the angle.
And I thought I was good at math :stuck_out_tongue: