I’m working on a python script and I need access to the Y axis of an object selected by the user, but I’m not sure how to get that. By “Y axis of an object” I mean the same axis/vector you get from the gumball when you have it aligned with an object instead of the world axis.
Thanks Pascal, but I think I’m the one overcomplicating things here.
Essentially I need to rotate some objects around their own local Y axis, instead of the world axis. So, I just need to get that Y axis information somehow, it doesn’t have to be through the gumball necessarily.
If you mean an object in the document, geometry, you’ll need to build that yourself - but in any case at thst gumball frame thing needs investigation - it looks like the rigjht thing but I was probably using it wrong.
There is no such thing, apart from the gumball frame as far as I know. Some objects can provide a plane say with TryGetPplane() but there is no telling how that will be oriented about its Z axis, necessarily, so I don’t know how helpful that is, and in general arbitrary objects will not sucessfully provide a plane.
I believe the only consistent way to track a frame is through setting your own custom user data. When an object is added you’d set it to the CPlane, then apply each transform that happens to the object through the OnTransform method you’d implement, thus tracking the object frame throughout its life. I don’t think this is possible through Python but I could be mistaken.
In Rhino objects don’t really have an object frame nor object origin.
ok therefore no possibility via script, of finding myself with a “geometric physics in Rhino” srf which
indicates the type of plan reported by Gumball. (as happens in Gh when Baking the Plane component)