Let Rhino believes a geometry is moving but not practically moving it

Hey,

I’ve been trying to let Rhino believes that a geometry is moving, but I don’t want to really move it. The purpose is just sending a signal, so the “geometry modified” event can be triggered, or periodic curve won’t break when I edit grips.

My simplest approach is nudge it as small as it can, so it is:

Transform zeroXform = Transform.Translation(new Vector3d(double.Epsilon, 0, 0));

Short answer is - it works every time. But when I ask opinions from LLMs, they all tell me this is dangerous for many reasons (they are bitwise identical, semantic misleading, unstable across APIs, etc).

So, I wonder if this is really the case? Should I avoid doing this?

Looking forward to any insights!

You might try Transform.Identity.

– Dale

Hi Dale,

Thank you for the quick reply!

After testing, I found Transform.Identity won’t trigger RhinoDoc.AddRhinoObject as the way that a real nudge does, unfortunately.

But it did inspire me on the periodic curve case. A straightforward copy of the Point3d works. So, I guess it only monitors if it is still the same struct, it is not based on real location.

Why not move it and then move it back?

Because this will trigger the event twice.

true. What about a 360 degree rotation? Also bitwise identical?

Yeah - just gave it a quick test, the same.

I think I am gonna stay with my Epsilon trick, since no side effect is shown for now. :slightly_smiling_face: