CRhinoSDKObject -> Getting a transform

Hey guys,

sorry for the initial dumb question. I am working on a custom exporter and I am wondering how you can get the transform shown by the Gumball manipulator for any CRhinoSDKObject? I assume that the Gumball computes it somehow, or is it persisted with the Rhino Doc?

Thanks!

Hi Helge,

When Rhino objects are transformed, their underlying geometry is modified to reflect the underlying transformation. That is, Rhino does not maintain any kind of transformation history or stack.

Regarding Gumball, it does maintain a plane as private user data on selected objects. But this is only to locate/relocate itself when needed.

With all this said, what are you trying to do and why?

– Dale

Hey Dale,

I am working on an export pipeline for realtime applications, to bring the surface information into our own realtime engine or Unreal Engine, for example.

For this I would like to automate the identification of instances as much as possible. This is great if the doc uses blocks, of course, but in a lot of cases the data sets I’ve received don’t use blocks that much. After meshing the contextual information between similar elements is lost, so I’d like to perform some modifications to the document prior to meshing.

For this I would like to identify similar elements based on user feedback, and then automatically turn a selection of objects into instances of blocks. For this I will need to be able to construct the transforms for each object. From a user perspective I’d like to use the transforms which you see when you use the gumball, as that is intuitive.

Is there a way to extract the transform the Gumball is based on from a CRhinoSDKObject, ObjRef or uuid?

I am fine with reconstructing the transform myself if it’s possible to get to the user data.

I hope that makes sense - any help is appreciated!

– Helge

Again, Rhino does not maintain object transformations. And, Gumball is nothing more than a way of transforming objects just like make of the command under the Transform menu. The Gumball does not store transforms - it modifies objects based on a transformation…