• 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. how to fill rectangles in bbox

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 143
  • Views 17710
  • 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

how to fill rectangles in bbox

venuuuuu
venuuuuu over 13 years ago

hi all,

i need to fill the rectangles(contacts) in bbox of layer which i selected in my layout. i find a syntax for this function but its not working. The code is

 cv = geGetWindowCellView()
x= geGetSelectedSet()
rodFillBBoxWithRects(      
     ?cvId cv
     ?layer list("CONT" "drawing")
     ?fillBBox x~>points
     ?width .16
     ?length 0.16
     ?gap "distribute"
     ?spaceX .22
     ?spaceY .22
        )

then CIW shows

  *WARNING* rodFillBBoxWithRects: ?fillBBox: list must have at least 2 elements - (((20.9 10.8) (17.4 10.8) (17.4 5.0) (12.7 5.0) (12.7 8.6) (17.4 8.6) (17.4 10.8) (10.3 10.8) (10.3 6.6) (8.4 6.6) (8.4 3.4) (3.4 3.4) (3.4 10.1) (8.4 10.1) (8.4 8.2) (10.3 8.2) (10.3 10.8) (2.4 10.8) (2.4 2.7) (20.9 2.7)))
*WARNING* rodFillBBoxWithRects: command failed
 

 please give me your advise and codes are most welcome.

thankq

venu

 

 

 

 

  • Cancel
  • cessej
    cessej over 13 years ago

    Your x is a list of object(s), take a car of x first.. car(x)~>points and fillBBox must be a value list of 2 points

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • venuuuuu
    venuuuuu over 13 years ago

     hi cessej,

     Yes i was trying the way that you just mentioned. It works good with all ur help.

    i used  car(x)~>bBox

    But it works only for rectangle bBox. i need to fill the contacts in polygon also. what the changes required to do this.

    THANKYOU

    venu.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • cessej
    cessej over 13 years ago

    I don't know if there's available solution in the forum. If I'll do that, I'm going to fracture the polygon into tiles, get the min bounding box of tiles to have a collection of rectangle bBox

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • venuuuuu
    venuuuuu over 13 years ago

    cessej,

    how  i get x coordinate from list which is obtain from polygon. i can get x coordinate from bBox. the list is like this.

    (((20.9 10.8) (17.4 10.8) (17.4 5.0) (12.7 5.0) (12.7 8.6) (17.4 8.6) (17.4 10.8) (10.3 10.8) (10.3 6.6) (8.4 6.6) (8.4 3.4) (3.4 3.4) (3.4 10.1) (8.4 10.1) (8.4 8.2) (10.3 8.2) (10.3 10.8) (2.4 10.8) (2.4 2.7) (20.9 2.7)))
    I need to get 20.9 to my variable.

    THANYOU

    venu

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    For the previous question, you could use dbLayerTile to break into tiles.

    For this latest question, the requirements aren't clear. You oculd use caaar() to get 20.9, that gets the first number in the first sub list of the first sub list - but I wasn't sure if that's what you wanted.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • venuuuuu
    venuuuuu over 13 years ago

     hi,

    yes i got the tiles. but i can't fill the contacts in every rectangle.   i can do it for single rectangle. what's the problem.

     leSetEntryLayer( list("y4" "drawing"))
    leSetAllLayerVisible(nil)
    geSelectAllFig()
    a= geGetSelectedSet()
    dbLayerTile(cv "y4" a  )
    foreach(a
    rodFillBBoxWithRects(      
         ?cvId cv
         ?layer list("CONT" "drawing")
         ?fillBBox car(a)~>bBox
         ?width .16
         ?length 0.16
         ?gap "distribute"
         ?spaceX .22
         ?spaceY .22
            ))

     THANYOU

      venu

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Venu,

    You're not using the results of the dbLayerTile - you are simply using the bounding box of the first selected shape; you'd have to use the bBox of each tile - so you'd need to iterate over the return value of the dbLayerTile() function. Note this may still not be quite what you want because you're going to have to ensure that the boundaries between the tiles are handled well, but it may be sufficient for your needs.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • venuuuuu
    venuuuuu over 13 years ago

     hi,

      I was able to fill the contacts in each bBox with all your help. Now i need bBox is enclose on  contacts is 0.09. i write following code for that. But it shows error.

     geDeselectAllFig()
    leSetEntryLayer( list("y4" "drawing"))
    leSetAllLayerVisible(nil)
    geSelectAllFig()
    a= geGetSelectedSet()
    dbLayerTile(cv "y4" a  )
    geDeselectAllFig()
    leSetEntryLayer( list("y4" "drawing"))
    leSetAllLayerVisible(nil)
    geSelectAllFig()

    foreach(x geGetSelectedSet()

    if((x~>objType == "rect")
    then
    y1=yCoord( upperRight(x~>bBox))-0.09
    y2=yCoord( lowerLeft(x~>bBox))+0.09
    x1=xCoord( upperRight(x~>bBox))-0.09
    x2=xCoord( lowerLeft(x~>bBox))+0.09
    b= list((x2:y2) (x1:y1))
    rodFillBBoxWithRects(      
         ?cvId cv
         ?layer list("CONT" "drawing")
         ?fillBBox b~>bBox
         ?width .16
         ?length 0.16
         ?gap "distribute"
         ?spaceX .22
         ?spaceY .22
          )))

    THANKYOU

    venu

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    First of all, actually giving the error message would help understand what the problem is. Without running the code, I can see a couple of problems:

    1. Why are you doing all this entry layer adjustment and selection? dbLayerTile returns a list of new objects, so you can just do result=dbLayerTile(...) and then do foreach(x result ...) instead of using geGetSelectedSet()
    2. You are building a bounding box in the variable b (too many brackets, so should just  be list(x2:y2 x1:y1) ), and that's a list, so doing b~>bBox makes no sense. That would make sense if b was a shape database object. So instead you should just pass ?fillBBox b

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • venuuuuu
    venuuuuu over 13 years ago

     Thanks andrew,

    i done it with all ur help.

    Thank you

    Venu

    • 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