I am observing an unexpected difference in how the ReplaceRhinoObject event is populated when using the Trim and Extend commands in Rhino.
When an operation triggers this event, I expect the old and new object information to clearly reflect the change.
1. Trim Command Behavior (Expected):
When I use the Trim command, the event is triggered, and I see the following GUID assignment:
-
OldRhinoObject.Idis set to an existing GUID (let’s call it X). -
NewRhinoObject.Idis set to the same GUID X.
Note: Although the GUID is the same, I understand this event signifies the replacement of the original object with a modified version retaining the same ID. This behavior seems consistent with how a modification-in-place is often handled.
2. Extend Command Behavior (Unexpected):
When I use the Extend command, the event is also triggered, but the GUID assignment is different:
-
OldRhinoObject.Idis set to an existing GUID (Y). -
NewRhinoObject.Idis set toGuid.Empty(or all zeros).
My Question:
Why does the Extend command set the NewRhinoObject.Id to Guid.Empty, while the Trim command sets it to the same GUID as the old object?
Is this an expected difference in event handling for these two specific commands, and if so, what is the reasoning behind it? Or is this potentially an issue where the new object’s ID is not being properly reported during an Extend operation?
Any insight into the proper interpretation of the ReplaceRhinoObject event for Trim vs. Extend would be greatly appreciated!