"Geometry.Rotate" The rotation of the problem


#1

For selected objects, how to rotate the selected object.
IEnumerable Sel_obj = doc.Objects.GetSelectedObjects(false, false);
Every object in the traversal of “Sel_obj”, then “Geometry.Rotate” to perform a rotation, in the Rhino object is not rotating, why?


(Menno Deij - van Rijswijk) #2

In the example below objects are translated; rotation can be done in a similar way. Basically: don’t transform the geometry, but transform the object that contains the geometry.


#3

If you transform the geometry you have to use doc.objects.replace the old geometry. If you have an ObjRef you can transform the object directly.


#4

Thank you very much.
The problem has been solved