Actually, the bBox of an instance is already transformed. The bBox of the master of the instance is not. Thus, the following two values should be the same (Supposing inst is the database id of the instance):
box1 = inst~>bBox
box2 = dbTransformBBox(inst~>master~>bBox inst~>transform)
box1 == box2
Basically, to understand how to translate the coordinates up the hierarchy, you need to know a few things and a few commands.
A transform is a list of information about an instance in the hierarchy. It consists of the xy coordinate, rotation and magnification of an instance in the cell that it is placed.
Here is a sample transform: list(list(89.0 275.5) "R90" 1.0)
You can access the transform of an instance using: inst~>transform
Any shape or instance one level down in that instance can have its points transformed to top level coordinates using:
When you have multiple levels of hierarchy, you will need to concatenate the transforms from each instance in the hierarchy path to get one transform. You can do this with:
Start with the lowest transform in the hierarchy and concat it with the next level transform. Take the new transform and concat it with the next higher level transform and repeat this until you get to the top level. You can then transform points from objects within the lowest level instance all the way to the top.
Two other useful commands for interactive use when editing in place are geEditToWindowPoint and geWindowToEditPoint.
Translates coordinate values when you are using edit in place. geWindowToEditPoint applies the top-level cellview's coordinates to the cellview being edited; geEditToWindowPoint does the reverse.