Home > Community > Forums > Custom IC SKILL > Gettting the corrdinates to the top level in SKILL

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Gettting the corrdinates to the top level in SKILL 

Last post Wed, Apr 21 2010 1:07 AM by lrl12skdev. 5 replies.
Started by Kapil 17 Mar 2010 10:23 AM. Topic has 5 replies and 3327 views
Page 1 of 1 (6 items)
Sort Posts:
  • Wed, Mar 17 2010 10:23 AM

    • Kapil
    • Not Ranked
    • Joined on Thu, Jul 24 2008
    • Posts 2
    • Points 55
    Gettting the corrdinates to the top level in SKILL Reply

    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

    Regards,

    Kapil

    Filed under: ,
    • Post Points: 35
  • Wed, Mar 17 2010 10:31 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,022
    • Points 15,575
    Re: Gettting the corrdinates to the top level in SKILL Reply

    Hi Kapil

    You 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 regards
    Quek

    • Post Points: 20
  • Wed, Mar 17 2010 6:45 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 386
    • Points 7,290
    Re: Gettting the corrdinates to the top level in SKILL Reply

    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:

    dbTransformPoint(pt inst~>transform)
    or
    dbTransformBBox(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:

    dbConcatTransform(transform1 transform2)

    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.

    Derek

     

    • Post Points: 5
  • Thu, Mar 18 2010 1:24 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,538
    • Points 15,030
    Re: Gettting the corrdinates to the top level in SKILL Reply

    Hi Kapil,

    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().

     geTransformUserBBox(
      l_bbox
      l_transform
     )
    => l_bBox_new

     dbConcatTransform(
      l_list1
      l_list2
     )
    => l_list_new

     

    Nice answers Derek by the way.

    Regards,

    Lawrence.

    • Post Points: 20
  • Thu, Mar 18 2010 8:48 AM

    • Kapil
    • Not Ranked
    • Joined on Thu, Jul 24 2008
    • Posts 2
    • Points 55
    Re: Gettting the corrdinates to the top level in SKILL Reply

    Thanks a lot Quek,Derek and Lawrence.ill try out the functions and be back .

    Regards,

    Kapil

    • Post Points: 20
  • Wed, Apr 21 2010 1:07 AM

    Re: Gettting the corrdinates to the top level in SKILL Reply

     Hi,

     there is also the function geWindowToEditPoint if you wish to process your skillcode while in EIP mode.

     BR,

    rence

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by Kapil at 17 Mar 2010 10:23 AM. Topic has 5 replies.