• 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. Finding shapes outside prBoundary

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 17362
  • 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

Finding shapes outside prBoundary

pham777
pham777 over 10 years ago

I used this code from Cadence on my layout:

procedure(CCSFindShapesOutsidePrBoundary(@optional (cv geGetWindowCellView()))
  let((temp_list prShapeID realShapes (finalShapes nil)(rest nil))
 
    realShapes=cv~>shapes
    prShapeID=dbCreatePolygon(cv leGetEntryLayer() cv~>prBoundary~>points)

    foreach(shape realShapes
temp_list=dbLayerXor(cv leGetEntryLayer() list(shape) list(prShapeID))
if(length(temp_list)==1 then
    mapcar('dbDeleteObject temp_list)
else
    printf("\n shape with bBox %L is outside prBoundary object\n"
    shape~>bBox)
   finalShapes=cons(shape finalShapes)
   mapcar('dbDeleteObject temp_list)
) ;if length
      ) ;foreach shape
   
    foreach(x realShapes if(!member(x finalShapes) then rest=cons(x rest)))
    foreach(x rest
  if(temp_list=dbLayerAnd(cv leGetEntryLayer() list(x) list(prShapeID))
  then     
     mapcar('dbDeleteObject temp_list)
else
printf("\n shape with bBox %L is outside prBoundary object\n"
x~>bBox)
finalShapes=cons(x finalShapes)
    ); if temp_list
);foreach x
   
   dbDeleteObject(prShapeID)
   finalShapes
  ) ;let
) ;procedure

but got the error:

*Error* dbCreatePolygon: Polygon needs at least 3 points - nil

Is there something wrong with this code ?  It seems that cv~>prBoundary~>points return nil.

Please help,

Thanks,

HP

  • Cancel
Parents
  • dmay
    dmay over 10 years ago

    If you are using Cadence 6.1.x and the cv~>prBoundary~>points is nil, then you don't have a prBoundary. The code should check for this.

    if(cv~>prBoundary then
      do the main body of code
    else
      do alternative - possibly return all shapes
      at least print error message about missing boundary
    ) 

    Derek 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 10 years ago

    If you are using Cadence 6.1.x and the cv~>prBoundary~>points is nil, then you don't have a prBoundary. The code should check for this.

    if(cv~>prBoundary then
      do the main body of code
    else
      do alternative - possibly return all shapes
      at least print error message about missing boundary
    ) 

    Derek 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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