• 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. Is there a way to get outer points of selected polygons...

Stats

  • Locked Locked
  • Replies 14
  • Subscribers 144
  • Views 21525
  • 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

Is there a way to get outer points of selected polygons?

kbhow
kbhow over 14 years ago

Hi,

Is there any SKILL codes which able to get the outer points of selected objects?

I was trying to create a new function which may required to get the outer points of selected objects (polygon/rectangle/instances and etc). I want to get a list of points where i can use it to create a polygon which cover all selected objects.

Example, let say i have selected 10 polygons, and i want a function to return me a list of outer points of my selected object. Can someone help?

Thanks

How

  • Cancel
  • kbhow
    kbhow over 14 years ago

    Hi Stefan,

    Cool. This way never get into my mind, but i believe this will solve my problem. I'll play around with this approach.

    Thanks a lot.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago
    Hi How,

    If all the shapes have orthogonal edges (i.e. only 90 degree angles), then all you'd have to do is create an additional vertex between each pair of adjacent points on the convex hull (assuming they do not already share the same X or Y coordinate) representing an "L" shape (the L would have to be towards the inside of the resulting polygon). Not _too_ difficult to do that.

    Otherwise you'd probably need to do this:

    1. Merge all the shapes (do an Or of them all)
    2. Collect all the points and a reference to the merged shape it came from.
    3. Compute the convex hull of all the points
    4. For each point in the convex hull, find the original vertex on the merged shapes and then take the line from that vertex to the adjacent point on merged shape, and do this again for the adjacent point on the convex hull, and find the intersection of the two lines to create the additional point.

    The last step needs to be done carefully to ensure you get the intersection of the right pair of lines, but it shouldn't be too hard.

    So fundamentally it's a refinement of the convex hull, rather than a completely different algorithm.

    Regards,

    Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StefanSL
    StefanSL over 14 years ago

     Hi How,

    if one of the initial shapes is located far off, you may run into a problem,
    using the same value for upsizing and downsizing can result in
    more than one shape, cause the downsize step could remove the interconnect
    again. You should check the result of your operation if
    it's really just one shape.

    regards

    Stefan

     

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

    To be slightly pedantic, even if it is effectively one shape, it's possible that the dbLayer functions may return more than one shape if there are too many points.

    There's an optional argument to dbLayer* functions which specifies the maximum number of vertices - and the default is (I think, if my memory is correct) 200. Beyond that it automatically splits into pieces. This was done because some formats historically have limits on the number of vertices (e.g. stream format had a historical limit of 200 points per polygon).

    So counting the number of shapes produced may not be sufficient to detect gaps if there are lots of vertices in the resulting shape (if it has an outline like the coast of Norway ;-> ). That said, I believe that the upper limit is enormous (not even sure there is an upper limit) in OA versions is very high; in CDB the upper limit of number of vertices per polygon is 4000 (I think). So you may be able to use Stefan's approach still if you have a relatively small set of data to find the "hull" for.

    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