• 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. Attempting to Merge Shapes Created by two rodFillWithRe...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 144
  • Views 8237
  • 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

Attempting to Merge Shapes Created by two rodFillWithRects

Ynishant
Ynishant over 2 years ago

Hi, 

    I'm creating a polygon and filling it with rectangular shapes that are intersecting with each other. I'd like to merge the shapes created by the rodFillWithRects() function. I'm essentially filling an octagon with intersecting rectangles and would like to merge the rectangles to create a series of larger rectangles. Is it possible to use dbLayerOr() to accomplish this? The code snippet is pasted below and I've also pasted images of what I'd like the end layout to look like:

; the code that follows creates the mesh patterns for the slots
mesh_outside_silox = 1.0
radius = 0.5*w - sil_inset - mesh_outside_silox
D = radius/sqrt(2)
d = 2*D - radius
p9 = list(x+radius y+d)
p10 = list(x+d y+radius)
p11 = list(x-d y+radius)
p12 = list(x-radius y+d)
p13 = list(x-radius y-d)
p14 = list(x-d y-radius)
p15 = list(x+d y-radius)
p16 = list(x+radius y-d)

; outer polygon that forms the template for the waffle pattern
poly3 = rodCreatePolygon(
?layer SLOT
?pts list( p9 p10 p11 p12 p13 p14 p15 p16)
)

slots_2 = rodFillWithRects(
?shapeId poly3~>dbId
?fillShapeLPP SLOT
?fillShapeWidth sq_x
?fillShapeLength sq_y
?justification "centerCenter"
?spaceX grid
?spaceY sp_y
?enclosureX 0.01
?enclosureY 0.01
?grid grid
)

slots_3 = rodFillWithRects(
?shapeId poly3~>dbId
?fillShapeLPP SLOT
?fillShapeWidth sq_x+0.01
?fillShapeLength sq_y
?justification "centerCenter"
?spaceX grid
?spaceY sp_y
?enclosureX 0.01
?enclosureY 0.01
?grid grid
)
dbLayerOr(cvId SLOT list(slots_1~>dbId) list(slots_2~>dbId))

                                NOW                                                                    DESIRED RESULT

  • Cancel
  • MorrisDH
    MorrisDH over 2 years ago

    leMergeShapes(setof(shapes geGetEditCellView()~>shapes shapes~>layerName == SLOT))

    If this is for a pcell then this is what I do - there may be a better way.

    merge into another layer

    dbLayerOr(pcCellView "y1" setof(shapes pcCellView~>shapes shapes~>layerName == SLOT))

    delete original shapes

    foreach(obj setof(shapes pcCellView->shapes shapes->layerName==SLOT) dbDeleteObject(obj))

    Change layer of merged shape

    setof(shapes pcCellView~>shapes shapes~>layerName == "y1")~>layerName = SLOT

    SLOT might be an lpp and not a layerName.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ynishant
    Ynishant over 2 years ago in reply to MorrisDH

    Hi Morris, 

                    Thank you! This works and was exactly what I was looking for! I was looking for the pCell version, and all I had to do was replace the layerName with lpp and make a few other changes unrelated to the code snippet I pasted. 

    Regards,

    Nishant. 

    • 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