If I create a cageEdit and get one point, Get the ID, Move it with translate and get the ID again. Now its changed. Why?
Without creating a new cage. Just keep the selecting point.
Dim t As DocObjects.ObjRef = Nothing
Rhino.Input.RhinoGet.GetOneObject("Sel Cage Point", False, DocObjects.ObjectType.AnyObject, t)
Grip objects are created as needed (dynamically) and, thus, do not have static object ids.
Oke thats clear. I thought maybe it was some kind of bug but this sound logic.
Then I just need to get the new created objects after I move the cagePoints
What you can do is to store the index of the grip object. That should stay the same.
Quoting from my own C# code that is part of a larger piece of code - I hope it makes sense. The idea is to store the selected grip indices in an int array called
RhinoObject srfObj = _srfObject.Object();
srfObj.GripsOn = true;
Result res = RhinoGet.GetMultipleObjects("Select movable grips [ENTER to move all]", true, ObjectType.Grip, out gripRefs);
if (res != Rhino.Commands.Result.Success)
args.Result = res;
args.Close = true;
if (null != gripRefs && gripRefs.Length > 0)
_movableGripIndices = new int[gripRefs.Length];
for (int i = 0; i < gripRefs.Length; ++i)
ObjRef g = gripRefs[i];
RhinoObject obj = g.Object();
if (null == obj)
GripObject grip = obj as GripObject;
if (null == grip)
_movableGripIndices[i] = grip.Index;
_movableGripIndices = null;