Please give me some idea as to how we can get the corrdinates of the bBox lying down the hierarchy with respect to the top level coordinate reference ?? using SKILL
Hi KapilYou can use dbTransformBBox. Suppose "x" is the id of a lower hierarchical instance. You can do it as follows:dbTransformBBox(x~>bBox x~>transform)Best regardsQuek
In reply to Quek:
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~>bBoxbox2 = 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:
dbTransformPoint(pt inst~>transform)ordbTransformBBox(bBox inst~>transform)
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.
geEditToWindowPoint( w_windowId l_editCellViewPoint )=> l_windowCellViewPoint
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.
Also you can use geTransformUserBBox() similar to dbTransformBBox(). Also, you may be interested in concatenating transforms if you are processing more than one level of hierarchy, so for this there is a dbConcatTransform().
Nice answers Derek by the way.
In reply to skillUser:
Thanks a lot Quek,Derek and Lawrence.ill try out the functions and be back .
In reply to Kapil:
there is also the function geWindowToEditPoint if you wish to process your skillcode while in EIP mode.