Wish - retain transforms

I would like to have transforms similar to 3ds Max added to the properties of Groups or individual objects (Points, Lines, Surfaces, Meshes). These transforms should be part of the general properties of objects or groups, allowing immediate Trim or detachment of certain sub-objects, rather than being part of a Block.

When saving a 3dm file and reopening it, selecting the object or group should display the Gumball in its previously rotated direction. Although size and non-uniform scaling are not critical, saving the rotation values would be convenient for work.

If making such changes to the 3dm file structure is too disruptive, it would be helpful to be able to designate Parent-Child relationships between objects. This would allow us to create a dummy object, designate it as a Block, and make it a parent, enabling consistent direction adjustments.

I’ve moved this to a new topic @Kyle8 as it seemed unrelated to instant aliases and I think deserves its own thread.

The frame the gumball uses for object mode is stored in the object attributes and can be manipulated with the ObjectFrame and SetObjectFrame methods.

Hi, sorry for necrobump, but this topic seems most relevant to ask.

I tried to set Gumball to a desired position via SetObjectFrame like:

var obj = doc.Objects.FindId(id);
obj?.SetObjectFrame(frame);

However, no matter how hard I try, I always get a DocumentCollected exception. Is there any special recipe for using it? The only case where I don’t get an exception is when I try to set it before I add the object to the Doc, but then switching the gumball to object mode shows another arbitrary position and rotation of the gumball.

Actually, I had success only with:
RhinoApp.RunScript( $"_-GumballRelocate {o.X},{o.Y},{o.Z} {xPt.X},{xPt.Y},{xPt.Z} {yPt.X},{yPt.Y},{yPt.Z}", false);

But that’s obviously not the way it should be. Is there any reasonable way to just set the existing/normal gumball frame/plane via code instead of by hand?

Sorry about that. Looks like that function was implemented incorrectly. I opened RH-94175 to get it sorted. In the meantime this should work.

var obj = rhObj.Object();
obj.Attributes.SetObjectFrame(Rhino.Geometry.Plane.WorldXY);
obj.CommitChanges();

Thanks for that. I’d like to ask also about World mode - as it is only initially sticked to WorldXY and can be edited - is there a direct call to override it?

In general, my point is that when I introduce a custom object that is by definition stuck to one plane (e.g., a fence pole), I’d like always to ‘OnSelect’ set gumball to its “natural” plane - I think this is kinda similar to what block does in object mode. I’d like to mimic this for certain types of my objects by default, regardless of mode - is that possible?

*I don’t need any fancy grip with sepatate conduits - default gumball is perfect in those cases just want to “stick” it sometimes

There’s no SDK method to provide a different orientation for the other gumball modes. The best you can do is script the GumballRelocate command when the gumball is in the different modes. Those relocations are saved on the object.

RH-94175 is fixed in Rhino 8 Service Release 31