Get gumball custom location


We are making a RhinoCommon exporter plugin for Rhino 5/6 and are looking for a way to access the “custom gumball location” (if present) for the exported objects.

To be clear, what I am looking for is the position + orientation ( plane ) information stored in the object when we “Relocate the Gumball”. We would like to treat this data as a “custom pivot” when exporting meshes.

From my understanding the gumball does not store any data except when relocating it as explained in this post: CRhinoSDKObject -> Getting a transform

The object’s description suggest this information may be stored in RhinoObject.Geometry.UserData:

However when trying to access the User data like this:

foreach (var CurrentUserData in MyRhinoObjectWithRelocatedGumball.Geometry.UserData)

CurrentUserData is either null or an empty SharedUserDictionary.

What would be the right way to get the data of a relocated gumball?

Thank you.

Hi @benoit.deschenes,

What you seeing is some private, custom data added by Rhino itself. There is no way of getting to this data using RhinoCommon.

Just curious, why do you need this information, especially for exporting?


– Dale

Hi @dale,

Thank you for clearing that up. To be clear, is that where the gumball custom relocation info is stored? If not, is there a way to access the custom gumball relocation information in RhinoCommon?

The format we are exporting to consider the meshes and their instances in the scene as different assets. So we need to have a transform for each instance/object and we prefer not to have it baked into the meshes’ vertices.

We are already getting good results by using the bounding box of each object, but we want to get the custom gumball position as well in order to customly define a pivot point when possible (e.g., some door-like meshes would benefit greatly from not having their pivot in the center of the door/BoundingBox, but on the hinges instead).

From the other posts about the gumball, I understand it is simply a tool and does not display any information about the object, and that it should not be treated like so. Even so, we would have like to access the custom gumball position because it looks and behave like a custom pivot point and some of our users use it as such.

Thank you for your time.

Hi @benoit.deschenes,


Yes, Rhino stores a CRhinoGumballFrame on objects that have had their frame relocated (e.g. are not using the default location). The RhinoCommon-equivlaent to this is a GumballFrame struct.

Like I mentioned, there isn’t any access to this custom data from any of our tool kits, including RhinoCommon. I’ve logged an issue to add a method to RhinoObject to obtain this…


– Dale

1 Like

RH-58174 is fixed in the latest WIP