I read somewhere either here or in the docs, that it was best to store UserDictionary data in a RhinoObject's Attributes instead of on the Geometry, as this was more “resilient” and McNeel always tried really hard to preserve those. (Can’t find it now… Maybe I’m incorrect?)
I changed all my code to use Attributes, a while ago, but now I have a problem of Boolean operations that don’t preserve the Attributes.
Is there an event I can hook into and handle it myself?
Should I use the RhinoObject.Geometry.UserDictionary instead? What’s best for which use case?
Generally Boolean operations create new objects with a new ID, so I guess the attributes are not automatically transferred. However, it would seem that it should be possible to get this info and attribute it to the new object as it is being added to the document.
Generally Boolean operations create new objects with a new ID, so I guess the attributes are not automatically transferred.
Which makes sense, because it’s impossible to guess which of the objects attributes to transfer.
However, it would seem that it should be possible to get this info and attribute it to the new object as it is being added to the document.
That’s what I’m hoping for but I couldn’t find any events in the docs that covers this. As far as I can tell the Add event, and then two Delete events are fired (for two pieces of geometry being booleaned together), but I can’t really link those two together.