User data optimization

Hi,

I have some question regarding User Data. I read this under the User Data Methods;

Important. When storing custom data on an object, the data can be stored on either the object’s geometry (e.g. curve, surfaces, etc), or on the object’s attributes. An object’s attributes maintain it’s layer, color and other non-geometric properties. The difference between the two storage methods is that adding or modifying user data that is located on an object’s geometry will cause Rhino to place a copy of the object on the Undo stack. Thus, if you are working with large geometric object or lots of user data, it is more efficient to store object user data on an object’s attributes.

Can we create new attributes for the geometries? How large is the large? Shall we use document user data with system id that refers to required values?

For example, if I create a “entrance door” object and I attach User Data for each of the timber member of the door.

Hi @onrender,

Where did this info come from? Do you have a link?

– Dale

from Rhino 5 Python help in User Data Methods.

Hi @onrender,

In general, it is best to attach user data to an object’s attributes, rather than it’s geometry, because it tends to survive drastic operations (e.g. split, trim, explode, etc.) better.

That’s a good question. For example, a mesh object with 100,000 faces take up considerably more memory than a point object. But a good rule is to always use attribute user data unless you’ve got some other reason not to.

– Dale