• 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 Design
  3. Selecting shapes contained in/inside shape

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 126
  • Views 1806
  • 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

Selecting shapes contained in/inside shape

ajk68
ajk68 over 4 years ago

Hi,

I am looking for a way to select all shapes contained within another shape.

I have a list of candidate shapes and I want to test to see which ones are inside a polygon shape (in this case an annular gate polygon).

So far I have:

geSelectArea(window_id gate_shape~>points gate_shape~>objType)
gatecont_shapes=geGetSelectedSet(working_cellview)
geDeselectAll(window_id)

I don't really want to select and deselect as this might clear selections that have already been made. Is there a way to do this outside of the graphic editor suite of commands?

Another issue with this is that it selects everything within the polygon (not just a candidate shape). I could filter the list, but given the above issue (selection in GE), it's somewhat a secondary problem.

Thanks.

Art

  • Cancel
  • henker
    henker over 4 years ago


    There are several possibilities, e.g. the Layer Boolean Functions, specifically 'dbLayerInside', should do what you are asking. There is also the 'Advanced Boolean Engine' with 'abeLayerInside' as equivalent, which might be more efficient. The manual way reduces to the point-inside-polygon problem known from computational geometry.

    If that selecting/deselecting troubles you, you could also:
    set = geGetSelectedSet(); store current selection
    ;; do whatever you want with the selection
    geSelectFigs(set); restore selection

    Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to henker

    Another possibility would be to check whether all the points on the candidate polygons are inside the target polygon's points - this function can check a single point. However, I've just realised that if you have a polygon representing a ring (i.e. it's got a hole in the middle) then you could have a rectangle which has all four points within the ring, but it covers the hole in the middle. You could check for that remaining case by using dbPointArrayAndNot to determine whether there are any residual parts not within the ring. In fact that might be a simpler way of checking in the first place (if you don't want to create temporary shapes). The abe functions that henker suggested would be another good alternative that works through the hierarchy (if that matters) and they also don't create temporary shapes.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ajk68
    ajk68 over 4 years ago in reply to henker

    I think I'll use your geSelectFigs(set) idea. 

    Using boolean type functions, I'm not sure how I get the overlap of a shape with a layer...

    • 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