Finding Nested Groups - Rotating Nested Groups


#1

I’m sure this topic has been covered many time before but as a bit of a refresher I am trying to figure out the best way to lock down on a specific group that is nested about three deep in other groups.

maingroup -> doorassembly -> door -> doorhw

I can identify the group by its instance name. Once I obtain a handle for that group (doorhw) I would like to rotate it within its parent group relative to the origin of the parent group (door). I would like to fully document how to do something like this so that a good example is provided for other developers for future reference.


#2

The transformation of the group instance IS relative to it’s parent’s coordinate system.
So, create the kind of transform you desire (see the Geom::Transformation class,) and apply it to the instance.

ADD: To rotate around the parent’s origin, just use [0,0,0] or ORIGIN as the base point of the rotational transformation.