• 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 21531
  • 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
Parents
  • 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
Reply
  • 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
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