• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. need to get bbox of shapes from a abeLayer.

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 13977
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

need to get bbox of shapes from a abeLayer.

Leonardo Vinci
Leonardo Vinci over 4 years ago

Greetings everyone,

I have an abeLayer (geoLayer:NULL) which has certain number of different different rectangles. I want the bBox or any coordinates of those rectangles. I am unable to fetch their coordinates since I cannot apply bBox function on them since its an abeLayer and not any list or array. 

How can I access the bBox of the shapes for any abeLayer?

I hope you understand my query well.

Thanks,

Leo

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Leo,

    There's no direct function to do it, but it's easy enough to write one - see this earlier post.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Leonardo Vinci
    Leonardo Vinci over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    I dont want all the shapes named in "layerName".

    I already have filtered out some of the shapes of my interest in one of the abeLayer.

    From that abeLayer I want the shapes and not all the shapes of "layerName".

    Thanks,

    Leo

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Leonardo Vinci

    Leo,

    It's a pretty obvious change to the code to make this do what you want - surprised you couldn't just write your own code based on my example. Simply remove the initialisation and retrieval of the layer from the cellView, and you'd get this:

    procedure(abGetAbeLayerBBox(layer)
        let((iter tile ollx olly ourx oury)
            iter=abeTileIterator(layer)
            while(tile=iter->next
                destructuringBind(((llx lly) (urx ury)) tile->bbox
                    ollx=if(ollx min(ollx llx) llx)
                    olly=if(olly min(olly lly) lly)
                    ourx=if(ourx max(ourx urx) urx)
                    oury=if(oury max(oury ury) ury)
                )
            )
            when(ollx
                list(ollx:olly ourx:oury)
            )
        )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AurelBuche
    AurelBuche over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    By looking at your code I realize destructuringBind can also split lists!

    I guess I never tried it that way even though it is the behaviour I have been looking for and always achieved it with a second let...

    It seems extremely convenient but its quite surprising as it is not at all described in the documentation

    I thought destructuringBind was only a macro generating a lambda and applying it to its second argument (I see by expanding it in your case that it is also recursive!?)

    Has it always done that or was it implemented in a recent version? (I plan to use it from now on but I don't want to lose backward compatibility with some previous versions)

    Thanks

    Aurel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to AurelBuche

    Hi Aurel,

    It's always been supported. I'll file a CCR to get the documentation improved - it's not great right now because it doesn't cover any of that and gives a minimal example. This is kind of the point of the word "destructuring" in the function name!

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AurelBuche
    AurelBuche over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    By "split lists" I meant hierarchical ones, I have been using it for a long time with flat ones

    I will use it in more cases thanks to you

    Cheers,

    Aurel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • AurelBuche
    AurelBuche over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    By "split lists" I meant hierarchical ones, I have been using it for a long time with flat ones

    I will use it in more cases thanks to you

    Cheers,

    Aurel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to AurelBuche

    Hi Aurel,

    I filed CCR 2443771 on this. BTW for the benefit of anyone else, there's a video on the support site which covers destructuringBind and gives a few examples of more complex usage: SKILL destructuringBind function (Video) (I pointed the tech pubs folks to that!).

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information