• 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. Compare two lists having coordinates of shapes

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 15014
  • 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

Compare two lists having coordinates of shapes

cs03
cs03 over 10 years ago

I want to compare two lists having coordinates of shapes.

let-

listA=(  ((1 2) (3 4))   ((5 6) (7 8))  ((9 10) (11 12))  )             :- listA has coordinates of 3 shapes

listB=( (1 2) (3 4) )                                                            :-listB has coordinates of 1 shape

I want to compare coordinates of shape of listB with coordinates of every shape of listA,  such that if shape of listA is inside the shape of listB or overlapping it should be retained only and if not (outside the shape of listB or intersecting it) it should be discarded.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    It's not clear what your lists are supposed to be representing - since they only seem to have two coordinates per shape. If that was just a simple example and they were supposed to be point lists of polygons, I'd say the simple solution would be to do:

    setof(shape listA dbPointArrayAnd(cvId shape listB))

    Otherwise if they were supposed to be bounding boxes (for rectangles, say), then you could compare the coordinates simply within the setof loop to see if the rectangles overlap (just a few simple comparisons, which I'll leave as an exercise for you because I'm too lazy to type them myself :) )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • cs03
    cs03 over 9 years ago

    Thanks for your suggestions 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